src/render/opengl/SDL_render_gl.c
changeset 6449 fa00544b1374
parent 6414 df50b0d6c1c3
child 6494 309599be5c2a
--- a/src/render/opengl/SDL_render_gl.c	Sun Sep 23 01:37:44 2012 -0700
+++ b/src/render/opengl/SDL_render_gl.c	Sun Sep 23 01:50:35 2012 -0700
@@ -361,14 +361,16 @@
         renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
     }
 
-    data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
-    renderer->info.max_texture_width = value;
-    data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
-    renderer->info.max_texture_height = value;
-
     if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle")
         || SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
         data->GL_ARB_texture_rectangle_supported = SDL_TRUE;
+        data->glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB, &value);
+        renderer->info.max_texture_width = value;
+        renderer->info.max_texture_height = value;
+    } else {
+        data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
+        renderer->info.max_texture_width = value;
+        renderer->info.max_texture_height = value;
     }
 
     /* Check for multitexture support */