internal/ui: use MaxVertexCount instead of IndicesCount

Updates #2460
This commit is contained in:
Hajime Hoshi 2023-03-23 19:43:53 +09:00
parent 81581df2b9
commit c7214ef6fb

View File

@ -133,7 +133,7 @@ func (i *Image) WritePixels(pix []byte, x, y, width, height int) {
i.dotsBuffer[[2]int{x, y}] = clr i.dotsBuffer[[2]int{x, y}] = clr
// One square requires 6 indices (= 2 triangles). // One square requires 6 indices (= 2 triangles).
if len(i.dotsBuffer) >= graphics.IndicesCount/6 { if len(i.dotsBuffer) >= graphics.MaxVertexCount/6 {
i.flushDotsBufferIfNeeded() i.flushDotsBufferIfNeeded()
} }
return return