mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-13 22: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
|
return a.total
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (a *arrayBufferLayout) addPart(part arrayBufferLayoutPart) {
|
||||||
|
a.parts = append(a.parts, part)
|
||||||
|
a.total = 0
|
||||||
|
}
|
||||||
|
|
||||||
// enable starts using the array buffer.
|
// enable starts using the array buffer.
|
||||||
func (a *arrayBufferLayout) enable(context *context) {
|
func (a *arrayBufferLayout) enable(context *context) {
|
||||||
for i := range a.parts {
|
for i := range a.parts {
|
||||||
@ -117,7 +122,7 @@ func init() {
|
|||||||
if d > 4 {
|
if d > 4 {
|
||||||
panic("opengl: the array buffer layout is too small")
|
panic("opengl: the array buffer layout is too small")
|
||||||
}
|
}
|
||||||
theArrayBufferLayout.parts = append(theArrayBufferLayout.parts, arrayBufferLayoutPart{
|
theArrayBufferLayout.addPart(arrayBufferLayoutPart{
|
||||||
name: "A3",
|
name: "A3",
|
||||||
num: d,
|
num: d,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user