Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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 76f21ebe52f7ae4d5e8e7e5c0f946e54851a5a8d
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/render/opengles/SDL_render_gles.c
@@ -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;
}

0 comments on commit 76f21eb

Please sign in to comment.