mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphics: Bug fix: wrong argument in VertexAttribPointer
This commit is contained in:
parent
f21f6d357e
commit
af4130c0d6
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user