graphics: Bug fix: wrong argument in VertexAttribPointer

This commit is contained in:
Hajime Hoshi 2016-10-22 20:47:33 +09:00
parent f21f6d357e
commit af4130c0d6

View File

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