[vlc-commits] vout/opengl: don't check extension on OpenGLES
Thomas Guillem
git at videolan.org
Tue Jan 3 15:33:01 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 23 16:03:05 2016 +0100| [5a033c14fa05f408543753ca119c2e475e2e3cc3] | committer: Thomas Guillem
vout/opengl: don't check extension on OpenGLES
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5a033c14fa05f408543753ca119c2e475e2e3cc3
---
modules/video_output/opengl/vout_helper.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 326705b..4d0b6a6 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -175,8 +175,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
return NULL;
}
- const char *extensions = (const char *)glGetString(GL_EXTENSIONS);
#if !defined(USE_OPENGL_ES2)
+ const char *extensions = (const char *)glGetString(GL_EXTENSIONS);
const unsigned char *ogl_version = glGetString(GL_VERSION);
bool supports_shaders = strverscmp((const char *)ogl_version, "2.0") >= 0;
#else
@@ -240,13 +240,13 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
# define glClientActiveTexture vgl->api.ClientActiveTexture
#endif
- vgl->supports_npot = HasExtension(extensions, "GL_ARB_texture_non_power_of_two") ||
- HasExtension(extensions, "GL_APPLE_texture_2D_limited_npot");
-
#if defined(USE_OPENGL_ES2)
/* OpenGL ES 2 includes support for non-power of 2 textures by specification
* so checks for extensions are bound to fail. Check for OpenGL ES version instead. */
vgl->supports_npot = true;
+#else
+ vgl->supports_npot = HasExtension(extensions, "GL_ARB_texture_non_power_of_two") ||
+ HasExtension(extensions, "GL_APPLE_texture_2D_limited_npot");
#endif
/* Initialize with default chroma */
More information about the vlc-commits
mailing list