Hi all,

A bit of a general question, does anyone know how to run an OpenGL program with mesa instead of the platform's OpenGL driver? Is it supposed to require a recompile?

I want to run osgviewer using mesa to compare this with my machine's OpenGL drivers. I'm doing this on MacOS X, BTW, compiled by configuring in CMake to build with makefiles.

I tried two things, without recompiling (i.e. compiling with the platform's OpenGL but using mesa at runtime) and recompiling (i.e. using mesa both at compilation and at runtime), and I'm getting the same results for both...

I set:

$LD_LIBRARY_PATH=(mesa lib path):$LD_LIBRARY_PATH
$DYLD_LIBRARY_PATH=(mesa lib path):$DYLD_LIBRARY_PATH

so that osgviewer finds the mesa .so's first before the platform-installed ones, but then I get this message:

$ osgversion
dyld: Symbol not found: _gll_noop
Referenced from: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
  Expected in: /sw/lib/mesa/libGL.1.dylib
 in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
Trace/BPT trap
$ osgviewer --window 50 50 800 600 cow.osg
dyld: Symbol not found: _gll_noop
Referenced from: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
  Expected in: /sw/lib/mesa/libGL.1.dylib
 in /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
Trace/BPT trap

It looks like the binary is still looking for OpenGL in /System/Library/Frameworks/OpenGL.framework (in both cases), which I would have thought wouldn't happen if I compile with mesa... And it also looks like the mesa lib is missing a symbol...

In the CMake window, I can't see any reference to /System/Library/Frameworks/OpenGL.framework (I've replaced all of them with the equivalent mesa libs/include paths). I'm pretty novice at Linux/Unix development, I'm sure there's a way to check which shared libraries an executable will look for at runtime?

Another detail, the mesa I'm using was downloaded with fink, it's version 7.0.2-2. It's from November 2007. Perhaps I should uninstall that and build mesa 7.8.2 (June 2010) from source? I think I'll do this while I wait for a reply on this thread. Nov 2007 seems a really long time ago :-)

Has anyone done this? Could anyone offer some guidance?

Thanks,

J-S
--
______________________________________________________
Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to