summaryrefslogtreecommitdiff
path: root/cogl/cogl-renderer.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-07-18 18:07:06 +0100
committerNeil Roberts <neil@linux.intel.com>2011-07-19 15:12:10 +0100
commit03c4b20931438cc0387b1b8fe2dca26aafefbb0f (patch)
tree48000c3df61b76d4dedd3582715ac8fb6c57cae2 /cogl/cogl-renderer.c
parenteb578e4e0c8e385fbf77193690a0adb05de27f53 (diff)
downloadcogl-03c4b20931438cc0387b1b8fe2dca26aafefbb0f.tar.gz
Specify the full filename when g_module_open'ing the GL library
Instead of using g_module_build_path with the short name of the GL library (eg, "GL") and relying on glib to add the suffix and prefix, the configure script now directly encodes the full name including the version number (eg, "libGL.so.1"). This is necessary because distros don't always install the non-versioned suffix for the library. The GLES libraries are left without the version suffix because it's not clear what should be placed here and I can't find any documentation from Khronos to clarify this. Mesa seems to install a file called libGLESv2.so.2 but the IMG SDK doesn't install any versioned library. There is an example of dynamically loading libGLESv2 in the Chromium source code and that does not use the version suffix even though it does use the version suffix for GL. This implies that it's at least fairly normal to load the unversioned name for GLES. https://bugzilla.gnome.org/show_bug.cgi?id=654593
Diffstat (limited to 'cogl/cogl-renderer.c')
-rw-r--r--cogl/cogl-renderer.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index 8b76a77e..be73adfe 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -177,9 +177,6 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
{
const char *driver_name = g_getenv ("COGL_DRIVER");
const char *libgl_name;
-#ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY
- char *libgl_module_path;
-#endif
#ifdef HAVE_COGL_GL
if (driver_name == NULL || !strcmp (driver_name, "gl"))
@@ -218,14 +215,9 @@ _cogl_renderer_choose_driver (CoglRenderer *renderer,
#ifndef HAVE_DIRECTLY_LINKED_GL_LIBRARY
- libgl_module_path = g_module_build_path (NULL, /* standard lib search path */
- libgl_name);
-
- renderer->libgl_module = g_module_open (libgl_module_path,
+ renderer->libgl_module = g_module_open (libgl_name,
G_MODULE_BIND_LAZY);
- g_free (libgl_module_path);
-
if (renderer->libgl_module == NULL)
{
g_set_error (error, COGL_DRIVER_ERROR,