mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +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
|
offset := 0
|
||||||
for _, p := range a.parts {
|
for _, p := range a.parts {
|
||||||
size := p.dataType.SizeInBytes() * p.num
|
c.VertexAttribPointer(program, p.name, p.num, p.dataType, p.normalize, total, offset)
|
||||||
c.VertexAttribPointer(program, p.name, size, p.dataType, p.normalize, total, offset)
|
offset += p.dataType.SizeInBytes() * p.num
|
||||||
offset += size
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user