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

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed OpenGL ES 1.1 on Android
From Gabriel Jacobo:
What I did notice is that calling
data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value); doesn't produce any
result in Android GLES1.1 if the active framebuffer is the default one, ie,
whatever is in value stays unmodified.
  • Loading branch information
slouken committed Feb 1, 2012
1 parent 9b71b5d commit 76f21eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/render/opengles/SDL_render_gles.c
Expand Up @@ -349,15 +349,18 @@ GLES_CreateRenderer(SDL_Window * window, Uint32 flags)
}
#endif

value = 0;
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
renderer->info.max_texture_width = value;
value = 0;
data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
renderer->info.max_texture_height = value;

if (SDL_GL_ExtensionSupported("GL_OES_framebuffer_object")) {
data->GL_OES_framebuffer_object_supported = SDL_TRUE;
renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;

value = 0;
data->glGetIntegerv(GL_FRAMEBUFFER_BINDING_OES, &value);
data->window_framebuffer = (GLuint)value;
}
Expand Down

0 comments on commit 76f21eb

Please sign in to comment.