From af4130c0d6664c4df7890d66077701d5b3441b36 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 22 Oct 2016 20:47:33 +0900 Subject: [PATCH] graphics: Bug fix: wrong argument in VertexAttribPointer --- internal/graphics/program.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/graphics/program.go b/internal/graphics/program.go index d362fd751..f83015d3e 100644 --- a/internal/graphics/program.go +++ b/internal/graphics/program.go @@ -50,9 +50,8 @@ func (a *arrayBufferLayout) enable(c *opengl.Context, program opengl.Program) { } offset := 0 for _, p := range a.parts { - size := p.dataType.SizeInBytes() * p.num - c.VertexAttribPointer(program, p.name, size, p.dataType, p.normalize, total, offset) - offset += size + c.VertexAttribPointer(program, p.name, p.num, p.dataType, p.normalize, total, offset) + offset += p.dataType.SizeInBytes() * p.num } }