mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-09 20:47:26 +01:00
internal/graphicsdriver/opengl: bug fix: total must be reset
This commit is contained in:
parent
d570406735
commit
7142a3bcd9
@ -66,6 +66,11 @@ func (a *arrayBufferLayout) float32Count() int {
|
||||
return a.total
|
||||
}
|
||||
|
||||
func (a *arrayBufferLayout) addPart(part arrayBufferLayoutPart) {
|
||||
a.parts = append(a.parts, part)
|
||||
a.total = 0
|
||||
}
|
||||
|
||||
// enable starts using the array buffer.
|
||||
func (a *arrayBufferLayout) enable(context *context) {
|
||||
for i := range a.parts {
|
||||
@ -117,7 +122,7 @@ func init() {
|
||||
if d > 4 {
|
||||
panic("opengl: the array buffer layout is too small")
|
||||
}
|
||||
theArrayBufferLayout.parts = append(theArrayBufferLayout.parts, arrayBufferLayoutPart{
|
||||
theArrayBufferLayout.addPart(arrayBufferLayoutPart{
|
||||
name: "A3",
|
||||
num: d,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user