Android quirk:Some devices don't report GL_OES_framebuffer_object but support it
authorGabriel Jacobo <gabomdq@gmail.com>
Fri, 16 Aug 2013 14:38:04 -0300
changeset 7644 037e5a9af745
parent 7643 bae07d884b52
child 7645 cc775832d501
Android quirk:Some devices don't report GL_OES_framebuffer_object but support it
src/render/opengles/SDL_render_gles.c
--- a/src/render/opengles/SDL_render_gles.c	Fri Aug 16 12:51:29 2013 -0400
+++ b/src/render/opengles/SDL_render_gles.c	Fri Aug 16 14:38:04 2013 -0300
@@ -375,7 +375,8 @@
     data->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &value);
     renderer->info.max_texture_height = value;
 
-    if (SDL_GL_ExtensionSupported("GL_OES_framebuffer_object")) {
+    /* Android does not report GL_OES_framebuffer_object but the functionality seems to be there anyway */
+    if (SDL_GL_ExtensionSupported("GL_OES_framebuffer_object") || data->glGenFramebuffersOES) {
         data->GL_OES_framebuffer_object_supported = SDL_TRUE;
         renderer->info.flags |= SDL_RENDERER_TARGETTEXTURE;