mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
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
This commit is contained in:
parent
0871b7b43d
commit
ba5130fe01
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue