add Picture.IsNil method

This commit is contained in:
faiface 2016-12-17 19:17:27 +01:00
parent 12a6bd1e25
commit 24608a6068
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ func (p Picture) Delete() {
p.texture.Delete()
}
// IsNil returns true if a picture is no picture.
func (p Picture) IsNil() bool {
return p.texture == nil
}
// Texture returns a pointer to the underlying OpenGL texture of a picture.
//
// Note, that the parent of this texture is pixelgl.NoOpDoer.