Commit 4f6b2427 authored by Martin Storsjö's avatar 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: default avatarMartin Storsjö <martin@martin.st>
parent ec037dba
......@@ -382,11 +382,9 @@ 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;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment