From c7214ef6fb15091cd3637d6611742b3076abfc2f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Thu, 23 Mar 2023 19:43:53 +0900 Subject: [PATCH] internal/ui: use MaxVertexCount instead of IndicesCount Updates #2460 --- internal/ui/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/ui/image.go b/internal/ui/image.go index 2acc47b27..9b57b8f59 100644 --- a/internal/ui/image.go +++ b/internal/ui/image.go @@ -133,7 +133,7 @@ func (i *Image) WritePixels(pix []byte, x, y, width, height int) { i.dotsBuffer[[2]int{x, y}] = clr // One square requires 6 indices (= 2 triangles). - if len(i.dotsBuffer) >= graphics.IndicesCount/6 { + if len(i.dotsBuffer) >= graphics.MaxVertexCount/6 { i.flushDotsBufferIfNeeded() } return