Skip to content

Commit

Permalink
Ensure we use the right OpenGL libs.
Browse files Browse the repository at this point in the history
After c512578 , even though we're no longer compiling OpenGL ES
support when Qt wasn't compiled to use Qt, we were still linking OpenGL
ES libs on systems with OpenGL ES development packages installed.  This
change should ensure we use OpenGL ES libs only when using a Qt version
compiled against OpenGL ES, and use non-ES libs when using a Qt version
compiled against non-ES OpenGL.

This seems like it should work for all systems--Qt using OpenGL with
OpenGL installed on the system (regardless of whether OpenGL ES is
installed) or Qt using OpenGL ES with OpenGL ES installed (regardless of
whether non-ES OpenGL is installed)--but I haven't tested it on an
OpenGL ES compile, so please let me know if you encounter difficulties.

Refs #10336
  • Loading branch information
sphery committed Feb 23, 2012
1 parent e2f74e9 commit 1f464e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mythtv/configure
Expand Up @@ -4183,7 +4183,13 @@ if enabled x11; then
fi

if enabled x11; then
check_libx gl_lib GLES2/gl2.h glClear -lGLESv2 || check_libx gl_lib GL/gl.h glBegin -lGL || check_libx gl_lib GL/gl.h glBegin -lopengl32 || disable opengl
if disabled opengles; then
# Qt was compiled without OpenGL ES support, so GLES2 isn't usable
check_libx gl_lib GL/gl.h glBegin -lGL || check_libx gl_lib GL/gl.h glBegin -lopengl32 || disable opengl
else
# Qt was compiled with OpenGL ES support, so OpenGL support requires ES
check_libx gl_lib GLES2/gl2.h glClear -lGLESv2 || disable opengl
fi
fi

# Quartz video is Mac only and requires Carbon which is 32bit only
Expand Down

0 comments on commit 1f464e9

Please sign in to comment.