From 6aef42d6fa624a0144a887b2a432905f6a183766 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 14 Jan 2015 10:31:09 +0900 Subject: [PATCH] Bug fix: limit for the number of vertices --- internal/graphics/internal/shader/draw.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/graphics/internal/shader/draw.go b/internal/graphics/internal/shader/draw.go index 2673aecfb..9e6a00519 100644 --- a/internal/graphics/internal/shader/draw.go +++ b/internal/graphics/internal/shader/draw.go @@ -59,7 +59,8 @@ func DrawTexture(c *opengl.Context, texture opengl.Texture, projectionMatrix *[4 return nil } // TODO: Change this panic if image.DrawImage allows more than quadsMaxNum parts. - if quadsMaxNum < quads.Len() { + // TODO: Kinder message + if quadsMaxNum < 4*quads.Len() { return errors.New(fmt.Sprintf("len(quads) must be equal to or less than %d", quadsMaxNum)) }