mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
Bug fix: limit for the number of vertices
This commit is contained in:
parent
665ef46064
commit
6aef42d6fa
@ -59,7 +59,8 @@ func DrawTexture(c *opengl.Context, texture opengl.Texture, projectionMatrix *[4
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// TODO: Change this panic if image.DrawImage allows more than quadsMaxNum parts.
|
// TODO: Change this panic if image.DrawImage allows more than quadsMaxNum parts.
|
||||||
if quadsMaxNum < quads.Len() {
|
// TODO: Kinder message
|
||||||
|
if quadsMaxNum < 4*quads.Len() {
|
||||||
return errors.New(fmt.Sprintf("len(quads) must be equal to or less than %d", quadsMaxNum))
|
return errors.New(fmt.Sprintf("len(quads) must be equal to or less than %d", quadsMaxNum))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user