gamnit: update users of glGet* functions
authorAlexis Laferrière <alexis.laf@xymus.net>
Sun, 26 Jun 2016 13:00:22 +0000 (09:00 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Sun, 26 Jun 2016 13:11:21 +0000 (09:11 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/textures.nit

index d644d60..3b72a51 100644 (file)
@@ -98,7 +98,7 @@ class GamnitRootTexture
 
        private fun load_from_pixels(pixels: Pointer, width, height: Int, format: GLPixelFormat)
        do
-               var max_texture_size = glGetIntegerv(gl_MAX_TEXTURE_SIZE)
+               var max_texture_size = glGetIntegerv(gl_MAX_TEXTURE_SIZE, 0)
                if width > max_texture_size or height > max_texture_size then
                        error = new Error("Texture {self} width or height is over the GL_MAX_TEXTURE_SIZE of {max_texture_size}")
                        return