Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed bug 1591 - Renderer maximum texture size is incorrect when GL_A…
Browse files Browse the repository at this point in the history
…RB_texture_rectangle is active
  • Loading branch information
slouken committed Sep 23, 2012
1 parent 7839db2 commit 099a419
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/render/opengl/SDL_render_gl.c
Expand Up @@ -361,14 +361,16 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
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 */
Expand Down

0 comments on commit 099a419

Please sign in to comment.