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 } }