mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
Add assertion
This commit is contained in:
parent
4e4cd85a35
commit
984d572cb0
@ -153,8 +153,10 @@ func (context *Context) DrawTexture(
|
|||||||
func (context *Context) DrawTextureParts(
|
func (context *Context) DrawTextureParts(
|
||||||
textureID graphics.TextureID, parts []graphics.TexturePart,
|
textureID graphics.TextureID, parts []graphics.TexturePart,
|
||||||
geometryMatrix matrix.Geometry, colorMatrix matrix.Color) {
|
geometryMatrix matrix.Geometry, colorMatrix matrix.Color) {
|
||||||
|
|
||||||
texture := context.textures[textureID]
|
texture := context.textures[textureID]
|
||||||
|
if texture == nil {
|
||||||
|
panic("invalid texture ID")
|
||||||
|
}
|
||||||
|
|
||||||
context.setShaderProgram(geometryMatrix, colorMatrix)
|
context.setShaderProgram(geometryMatrix, colorMatrix)
|
||||||
C.glBindTexture(C.GL_TEXTURE_2D, texture.id)
|
C.glBindTexture(C.GL_TEXTURE_2D, texture.id)
|
||||||
|
Loading…
Reference in New Issue
Block a user