From: Ethan G. <ee...@fa...> - 2009-10-27 09:39:27
|
On Tue, 27 Oct 2009 11:33:21 +0800 Chia-I Wu <ol...@gm...> wrote: > On Tue, Oct 27, 2009 at 01:45:56AM +0100, Florent Monnier wrote: > > In my Linux system I have installed the proprietary drivers for my video card, > > But I would like to test a program with the Mesa rendering. > > (Because the driver doesn't seems to support glsl and I would like to test a > > program with it) > > So I have tryed to do what I have done before with other libs, which is I have > > installed Mesa with ./configure --prefix=/tmp/Mesa and then after the install > > I do: export LD_LIBRARY_PATH=/tmp/Mesa/lib > > Then I run my program in the same session. With other libs this works fine, > > but here my program still run with the hardware accelerattion. > > So you guess the question, how can I test a program with Mesa without > > uninstalling my hardware drivers ? > With LD_LIBRARY_PATH set, you can > > $ ldd <your-program> > > to verify the libraries from mesa are used. If it already is, and you > are under X, you can run > > $ glxinfo > > to see if it is doing direct rendering, and which renderer is used. > > If glxinfo reports direct rendering, you can make sure the software DRI > driver is used by setting LIBGL_ALWAYS_SOFTWARE=1. > > Another way is to use a Xlib-based GLX emulation. You can configure > mesa with > > $ ./configure --with-driver=xlib > > to have a libGL.so that does not talk GLX. When I wanted to test software rendering I didn't know of the LIBGL_ALWAYS_SOFTWARE varibale. I configured Mesa like that, but rather than mess with my system Mesa I configured it to install under /opt like so: $ ./configure --prefix=/opt/mesa-standalone --with-driver=xlib Then when I want to test if something works with Mesa I use a Bourne shell feature to set $LD_LIBRARY_PATH just for the one program: $ LD_LIBRARY_PATH=/opt/mesa-standalone/lib program args -- Ethan Grammatikidis Those who are slower at parsing information must necessarily be faster at problem-solving. |