From 24608a60685b385b7da627342b84fa911f7c09e9 Mon Sep 17 00:00:00 2001 From: faiface <faiface@ksp.sk> Date: Sat, 17 Dec 2016 19:17:27 +0100 Subject: [PATCH] add Picture.IsNil method --- picture.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/picture.go b/picture.go index 0d59cab..8915eaa 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. -- GitLab