gamnit: if a texture fails to load, use the checker texture
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 9 Jun 2017 14:48:09 +0000 (10:48 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 12 Jun 2017 18:39:11 +0000 (14:39 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/textures.nit

index ad176a5..df3e0b6 100644 (file)
@@ -209,6 +209,9 @@ class TextureAsset
 
                load_from_platform
 
+               # If no pixel data was loaded, load the pixel default texture
+               if gl_texture == -1 then load_checker 32
+
                loaded = true
        end