From b2be6681d4b6fef6c17476788d731408fe05824b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 2 Nov 2016 02:08:12 +0900 Subject: [PATCH] graphics: Bug fix: invalid calc of num of quads --- internal/graphics/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/graphics/command.go b/internal/graphics/command.go index addcf8fc6..75b05182a 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -133,7 +133,7 @@ func (q *commandQueue) Flush(context *opengl.Context) error { } // NOTE: WebGL doesn't seem to have Check gl.MAX_ELEMENTS_VERTICES or gl.MAX_ELEMENTS_INDICES so far. // Let's use them to compare to len(quads) in the future. - if maxQuads < len(vertices)/QuadVertexSizeInBytes() { + if maxQuads < len(vertices)*2/QuadVertexSizeInBytes() { return fmt.Errorf("len(quads) must be equal to or less than %d", maxQuads) } numc := len(g)