Funny experiments with colored floors

This commit is contained in:
Anuken
2025-07-12 19:22:53 -04:00
parent e53201347f
commit 88b2f9c2bc
3 changed files with 112 additions and 3 deletions

View File

@@ -514,7 +514,14 @@ public class FloorRenderer{
@Override
protected void draw(Texture texture, float[] spriteVertices, int offset, int count){
throw new IllegalArgumentException("cache vertices unsupported");
if(spriteVertices.length != spriteSize){
throw new IllegalArgumentException("cached vertices must be in non-mixcolor format (20 per sprite, 5 per vertex)");
}
float[] verts = vertices;
int idx = vidx;
System.arraycopy(spriteVertices, offset, verts, idx, spriteSize);
vidx += spriteSize;
}
}
}