mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
graphics: Bug fix: invalid calc of num of quads
This commit is contained in:
parent
34e85b0041
commit
b2be6681d4
@ -133,7 +133,7 @@ func (q *commandQueue) Flush(context *opengl.Context) error {
|
||||
}
|
||||
// NOTE: WebGL doesn't seem to have Check gl.MAX_ELEMENTS_VERTICES or gl.MAX_ELEMENTS_INDICES so far.
|
||||
// Let's use them to compare to len(quads) in the future.
|
||||
if maxQuads < len(vertices)/QuadVertexSizeInBytes() {
|
||||
if maxQuads < len(vertices)*2/QuadVertexSizeInBytes() {
|
||||
return fmt.Errorf("len(quads) must be equal to or less than %d", maxQuads)
|
||||
}
|
||||
numc := len(g)
|
||||
|
Loading…
Reference in New Issue
Block a user