[vlc-devel] [PATCH 1/4] opengl: Fix the ES 1 vs 2 version check
Martin Storsjö
martin at martin.st
Tue Mar 12 19:02:06 CET 2013
The version string for ES 1 is "OpenGL ES-CM 1.x" or
"OpenGL ES-CL 1.x". For ES 2 it is "OpenGL ES 2.0", while it
seems to be only "3.x" for ES 3.
Since the code is built for either ES 1 or ES 2 (only Apple
support targeting both at the same time, from the same built
object code - but we only use ES 2 on iOS), simplify
this down to a compile time decision.
---
modules/video_output/opengl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index c67cc19..4277581 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -382,12 +382,10 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
vgl->supports_npot = HasExtension(extensions, "GL_ARB_texture_non_power_of_two") ||
HasExtension(extensions, "GL_APPLE_texture_2D_limited_npot");
-#if USE_OPENGL_ES
+#if USE_OPENGL_ES == 2
/* 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. */
- const unsigned char *ogl_version = glGetString(GL_VERSION);
- if (strverscmp((const char *)ogl_version, "2.0") >= 0)
- vgl->supports_npot = true;
+ vgl->supports_npot = true;
#endif
GLint max_texture_units = 0;
--
1.7.10.4
More information about the vlc-devel
mailing list