Add a structure to cache detected GL capabilities
[neverball] / share / image.c
index 42a937a..8ee9ccb 100644 (file)
@@ -120,12 +120,10 @@ static GLuint make_texture(const void *p, int w, int h, int b)
     int W = w;
     int H = h;
 
-    GLint max;
+    GLint max = gli.max_texture_size;
 
     void *q = NULL;
 
-    glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max);
-
     while (w / k > (int) max || h / k > (int) max)
         k *= 2;