From: Matthew Waters Date: Thu, 7 May 2015 05:25:10 +0000 (+0700) Subject: glmemory: properly detect (hopefully) the correct ext_rg/arb_rg variant X-Git-Tag: 1.19.3~511^2~1989^2~881 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc587ce1f153b6db3ee00e8813664460eb79151b;p=platform%2Fupstream%2Fgstreamer.git glmemory: properly detect (hopefully) the correct ext_rg/arb_rg variant GL_EXT_texture_rg is only valid for GLES2. GLES3 uses similar wording to the GL_ARB_texture_rg which requires a sized internal format that the GL_EXT_texture_rg does not require. https://www.khronos.org/registry/gles/extensions/EXT/EXT_texture_rg.txt https://www.opengl.org/registry/specs/ARB/texture_rg.txt --- diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index 254e617..a4dc7dc 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -320,7 +320,7 @@ _sized_gl_format_from_gl_format_type (GstGLContext * context, GLenum format, case GL_RG: switch (type) { case GL_UNSIGNED_BYTE: - if (ext_texture_rg) + if (!USING_GLES3 (context) && USING_GLES2 (context) && ext_texture_rg) return GL_RG; return GL_RG8; break; @@ -329,7 +329,7 @@ _sized_gl_format_from_gl_format_type (GstGLContext * context, GLenum format, case GL_RED: switch (type) { case GL_UNSIGNED_BYTE: - if (ext_texture_rg) + if (!USING_GLES3 (context) && USING_GLES2 (context) && ext_texture_rg) return GL_RED; return GL_R8; break;