[vlc-commits] opengl: Fix the ES 1 vs 2 version check
Martin Storsjö
git at videolan.org
Wed Mar 13 18:04:12 CET 2013
vlc | branch: master | Martin Storsjö <martin at martin.st> | Tue Mar 12 16:02:55 2013 +0200| [4f6b24275253a315bc9a29d58fc0541bb6d90bca] | committer: Martin Storsjö
opengl: Fix the ES 1 vs 2 version check
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 mostly 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.
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f6b24275253a315bc9a29d58fc0541bb6d90bca
---
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;
More information about the vlc-commits
mailing list