Fixed bug 1591 - Renderer maximum texture size is incorrect when GL_ARB_texture_rectangle is active
This commit is contained in:
parent
82b0ec31cd
commit
48b953ddbe
1 changed files with 7 additions and 5 deletions
|
@ -361,14 +361,16 @@ GL_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||||
renderer->info.flags |= SDL_RENDERER_PRESENTVSYNC;
|
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")
|
if (SDL_GL_ExtensionSupported("GL_ARB_texture_rectangle")
|
||||||
|| SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
|
|| SDL_GL_ExtensionSupported("GL_EXT_texture_rectangle")) {
|
||||||
data->GL_ARB_texture_rectangle_supported = SDL_TRUE;
|
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 */
|
/* Check for multitexture support */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue