diff --git a/picture.go b/picture.go index 0d59cab3281227e707bcb6015cbb86627d393914..8915eaa4cff6c99f7cd3915701155e196ededa10 100644 --- a/picture.go +++ b/picture.go @@ -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.