lib/gamnit: make `all_root_textures` public
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 12 Dec 2015 04:48:18 +0000 (23:48 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 14 Dec 2015 16:00:01 +0000 (11:00 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/examples/globe/src/globe.nit
lib/gamnit/textures.nit

index 3fedd6c..53a3d2d 100644 (file)
@@ -342,7 +342,7 @@ redef class App
                assert gl_error == gl_NO_ERROR else print gl_error
 
                # Prepare to draw
-               for tex in [texture_seas, texture_earth, texture_night, texture_elevation, texture_clouds] do
+               for tex in all_root_textures do
                        tex.load
                        glTexParameteri(gl_TEXTURE_2D, gl_TEXTURE_MIN_FILTER, gl_LINEAR)
                        glTexParameteri(gl_TEXTURE_2D, gl_TEXTURE_MAG_FILTER, gl_LINEAR)
index ee66213..2e693d2 100644 (file)
@@ -177,7 +177,8 @@ class GamnitSubtexture
 end
 
 redef class Sys
-       private var all_root_textures = new TextureSet
+       # All declared root textures
+       var all_root_textures = new TextureSet
 end
 
 # Group of `Texture`