Porting to linux problems

We ( oldman and i ) are trying to port programs from windozz to linux, we got a lot o problems. It only works under kde2.2. I think is becouse qt uses mesa. In other xwindows the view port seams empty (black).
When i use glxinfo… direct rendering: no
The only thing that works is the clear color
I am using a voodoo 4 with kernel 2.4.5 Xfree 4.2 with dri, drm and glx, mesa 3.5 and glut 3.7 .

The first step should be to enable DRI . Check that your DefaultDepth in XF86Config-4 is supported. Also check that you have “enable IRQ for VGA” set to yes in the BIOS settings.

Make sure you don’t use Mesa. If you have XFree installed with DRI support, you don’t need the ‘Mesa’ standalone package installed, since X is bundled with its own GL implementation (based on Mesa, true ).

It depends on your distro, but it is often a bad idea to have both Mesa and XFree installed when you want hardware acceleration. It should conflict, since both would want to install their client-side lib in /usr/lib/libGL.so … (Mesa would call its backend, while X’s would talk with the glx module).

If you could explain yourself better we would appreciate a lot. You say to simply, not install mesa… compile the kernel to use DRI and setup the xfree to use it?

I never saw anything like that… we will make this way… or die trying.

I don’t want to go into distro details, but using XFree+DRI should be as simple as installing the right packages.

The whole story :

  • Mesa is an openGL implementation that provides different renderer : it can render via Xlib, via glide (for 3DFX), via GGI, etc.
    It is a regular library that links to your program and does all the job (state management, TnL, rendering) in your program’s process context.

However this is unsufficient for 3D hardware rendering. First pb, your app is not privileged (ie. run as ‘root’) and cannot access your hardware directly. Second pb, you need to cooperate with the 2D driver : the X server and your app cannot access the video hardware simultaneously

  • That’s where DRI comes in : it moves the GL implementation to the server side (the ‘glx module’). The X server is privileged enough to talk to hardware directly, 2D and 3D can cooperate, and at last you also have a transparent network protocol to render on any X server with glx capability.

Physically, the GL user library (libGL.so) is pretty different : in indirect mode, it only send your GL commands via the X protocol. In direct mode, it’s more tricky, but to simplify things you can consider that the library talks to the ‘glx module’ directly (since client and server are on the same machine, that’s all direct rendering is about).

The XFree DRI thing is an openGL implementation, it’s actually the Mesa code compiled to run on the server side. The libGL.so client side library becomes more or less a ‘wrapper’.

  • Conclusion : some distro sometimes makes it akward, but ‘native Mesa’ should not be installed together with XFree 4. Debian uses ‘xlibmesa’ as a package name, to stress the fact that this is an implementation of Mesa that fit into XFree4. It does conflict with the straigt ‘mesa’ package.

That’s why you need to carefully read glxinfo strings. Wonder what libGL.so is installed (Mesa or XFree/DRI) in /usr/lib. I can’t tell you the exact string you should read, I’m using Nvidia’s drivers, which are the ‘third way’ (not Mesa, not DRI) !

As for DRI setup, there is plenty of documentation and howto.

Thank you very much! We would stay stucked with this if none gived us this advice. I tought Mesa was able to interact with DRI… not that DRI was a built-in MESA. Now I think we can manage to make it work.

We did just you said. We had removed all mesa librarys from the sistem and reinstaled Xfree, after that we instaled dri for tdfx. It worked. Now we are going to make Oldman’s Radeon 7500 work in his linux…

Thanks for all.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.