Commit a7413ead authored by Felix Paul Kühne's avatar Felix Paul Kühne

opengl: enforce use of non-power-of-2-textures when drawing using Open GL ES...

opengl: enforce use of non-power-of-2-textures when drawing using Open GL ES 2, since those are supported by specification

Hence, checks for extensions adding this feature will fail.

This solves a green line issue on Apple's ES2 platform
parent 4b44a0ef
......@@ -382,6 +382,14 @@ 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
/* 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
GLint max_texture_units = 0;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_units);
......
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