Commit a6a09908 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

opengl: fix version comparison

parent e4fa5567
...@@ -245,9 +245,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt, ...@@ -245,9 +245,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
} }
const char *ogl_version = glGetString(GL_VERSION); const unsigned char *ogl_version = glGetString(GL_VERSION);
float f_ogl_version = atof(ogl_version); bool supports_shaders = strverscmp((const char *)ogl_version, "2.0") >= 0;
bool supports_shaders = f_ogl_version >= 2.0f;
GLint max_texture_units = 0; GLint max_texture_units = 0;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max_texture_units); 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