From abed162e91e0e6c55109d133a78b5135133339ee Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 3 Jan 2015 16:25:17 +0900 Subject: [PATCH] Bug fix: initial capacity of vertices --- internal/graphics/internal/shader/drawtexture.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/graphics/internal/shader/drawtexture.go b/internal/graphics/internal/shader/drawtexture.go index 024baa750..40a7d989e 100644 --- a/internal/graphics/internal/shader/drawtexture.go +++ b/internal/graphics/internal/shader/drawtexture.go @@ -73,7 +73,7 @@ func DrawTexture(c *opengl.Context, texture opengl.Texture, projectionMatrix *[4 c.VertexAttribPointer(program, "vertex", stride, uintptr(float32Size*0)) c.VertexAttribPointer(program, "tex_coord", stride, uintptr(float32Size*2)) - vertices := make([]float32, 0, quads.Len()) + vertices := make([]float32, 0, stride*quads.Len()) for i := 0; i < quads.Len(); i++ { x0, y0, x1, y1 := quads.Vertex(i) u0, v0, u1, v1 := quads.Texture(i)