View Full Version : Need help on how to use acceleration in linux
Hi, i'm writing because i want to know the ways i can use accelerated OpenGL under linux. I Have a ATI Rage 128, DRI enabled and Hardware acceleration running.
I need to write a small 3D application that runs accelerated in Linux but
i don't know how to do it. I know well c++ and math of 3D graphics, but
i'm new to Linux and DRI, GLX, GLUT, etc are terms new to me.
Can you tell me how can i write an application that runs accelerated?
-i heard Mesa, but i think is a software rendering
-i know that with DRI i have acceleration, but is it the only standard?
-are there many ways to have acceleration under linux or is there an
thanks to all
01-01-2002, 07:23 PM
I'm planning to write an Howto on this very subject, since many people are confused by GL architectures and implementations under Linux (it is indeed not trivial !). Let's try to make it short for now :
* you have Mesa3D, which is an OpenGL implementation with state management and different rendering back-ends. Mesa3D can render with Xlib or GDI (ie. working in offscreen buffers and blitting), glide (the old way for 3DFX), D3D (yeees, OpenGL wrapping D3D is possible!) and others. Since Mesa is a user-side library, it can't be tied easily to the hardware and the windowing sytem.
Mesa3D is a regular DLL (libMesaGL.so) and is mostly used for software rendering and glide front-end for 3DFX (deprecated however).
* that's where DRI comes in : this architecture extends the traditionnal scheme where X (and thus glX) calls must travel along the X connection. When the client and the server are on the same computer (most cases actually !), there should be the shortest path between the GL calls and the actual 3D hardware driver. The second important pb is the cooperation between the 2D and 3D drivers which cannot be done if the 3D driver is not included in the server side of X (where the 2D driver lives).
DRI components are :
- user-side library, ie. libGL.so and GLX X-extension
- X server GL modules (DRI, GL driver and GLcore common stuff) which include the actual 3D hardware driver and the communication modules
- a Linux kernel module (the DRM for Direct Renderer Manager) for unified hardware access
Programming with OpenGL is the same experience : you still use GL and GLX headers the same way. The only tricky thing is the DRI setup, and it seems you're done http://www.opengl.org/discussion_boards/ubb/smile.gif
NOTE : don't mix straight Mesa3D library and DRI ! This is where most setup pb comes from ("my GL apps are slow", etc), when libGL.so is the Mesa3D implementation (using software rendering) and not the DRI's one (being a front-end for the GL driver living in the server side). I know, DRI is _based on_ Mesa, but _is not_ Mesa !
* the third way : utah-glx. Briefly : it's a hack for 3D hardware rendering on XFree 3.3.x. Deprecated, but there's still development. http://utah-glx.sf.net
01-01-2002, 07:24 PM
Ops, forgot the most important : sample code (that works with any GL archictecture, DRI for isntance) is there ->
NeHe's tutorials are famous.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.