Skip to content

Commit

Permalink
Use the correct size when initializing the colored tris index buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Jun 9, 2024
1 parent e79b54f commit 2ecb149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/kha/graphics4/Graphics2.hx
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ class ColoredShaderPainter {

triangleIndexBuffer = new IndexBuffer(triangleBufferSize * 3, Usage.StaticUsage);
var triIndices = triangleIndexBuffer.lock();
for (i in 0...bufferSize) {
for (i in 0...triangleBufferSize) {
triIndices[i * 3 + 0] = i * 3 + 0;
triIndices[i * 3 + 1] = i * 3 + 1;
triIndices[i * 3 + 2] = i * 3 + 2;
Expand Down

0 comments on commit 2ecb149

Please sign in to comment.