OpenGL and Linux

me and some friends are working on this gaming console. the OS is a homemade linux, based off of the LFS guide. i need to know what packages i need to have loaded into the OS to run OpenGL games, and other OpenGL applications. i would also like to know how i can start to code OpenGL games and applications. such as where can i find some good tutorials/books, and if i need to get/download binarys/librarys/engines/applications. help would be much appreciated :

I do not mean this to sound bad, but you could have
easily asked us to write the games for you! I am
forced to believe that you posted here without having
really researched anything.

Let me stop the criticism and help you. OpenGL is
available on linux machines through X11 (windowing
system) DRI for most 3D accelerated hardware. I code
everything in X11, but I am sure you can do similar
things on the framebuffer, etc. To get OpenGL working
under X11, you will need the X system version 4 and
above installed. Go to dri.sourceforge.net to get
some info. You will also need to learn how to
program the Xlib, so google that too. It is very
nice, although some would recommened that you do
not use X11 for gaming – they are wrong.

There are libraries that will help you write an
application or game by hiding all the book keeping
and handling of the main code. Search for SDL.

Finally, there are many different forums (fora sp?)
regarding game development. Gamedev.net, etc.
Thanks for coding for GNU/Linux. Good luck.

well if you’d like to, you can code a racing game for us :stuck_out_tongue:
anywho, i’m gonna be looking into all the stuff you mentioned tonight, have to finish assembling the system. thnx for the help :smiley:

  • Invista Studios Crew

But AFAIK Xlib should be exchanged with a newer interface to X11. So maybe its not the best solution. DRI isn’t the default for OpenGL in Linux, the best drivers(in the sense of speed and features) are from nvidia and the do not use DRI. There is no default.

Originally posted by marco:
But AFAIK Xlib should be exchanged with a newer interface to X11. So maybe its not the best solution. DRI isn’t the default for OpenGL in Linux, the best drivers(in the sense of speed and features) are from nvidia and the do not use DRI. There is no default.
No default?

For 3D graphics the default is OpenGL. For OpenGL bring-up, he default is GLX. DRI is not seen from the graphics developer’s standpoint, only from the driver developer, and person installing X.

For a cross-platform OpenGL bringup library, there are several libs, and no real default, glut, SDL, etc.

Originally posted by amendol:
[b] [quote]Originally posted by marco:
But AFAIK Xlib should be exchanged with a newer interface to X11. So maybe its not the best solution. DRI isn’t the default for OpenGL in Linux, the best drivers(in the sense of speed and features) are from nvidia and the do not use DRI. There is no default.
No default?

For 3D graphics the default is OpenGL. For OpenGL bring-up, he default is GLX. DRI is not seen from the graphics developer’s standpoint, only from the driver developer, and person installing X.

For a cross-platform OpenGL bringup library, there are several libs, and no real default, glut, SDL, etc.[/b][/QUOTE]I mean default in the kernel driver space.

DRI is the default method of writing 3d drivers for Linux. What other method is available?

NVidia’s hw/driver does perform very well, but only NVidia has access to the code, and only NVidia can write drivers to this API.

I have not seen a scientific analsys of the DRI performance VS NVidia, but you can not conclude that the NVidia direct rendering is supieor to the DRI without an apples to apples comparison, and such a comparison is impossible until either the NVidia HW spec is released, or the NVidia direct rendering software is released. Neither will happen…

Ok, lets say so. Nvidia is producing the best driver under linux. They are closed but that is a other story. So if you want used GLSL you use nvidia. Nvidia isn’t using DRI. So IMHO DRI isn’t the default. There is no default. Is ATI using DRI, I mean the closed driver one?

Well, yes, as far as I know, the NVidia drivers are the best performing, but I personally don’t believe that it is the DRI component that makes them the best. I believe that it’s the hardware, and the time and effort that they spent making the drivers. If they had chosen to use the DRI, I believe that their drivers would perform the same. – This is all just speculation though.

As far as considering them to be the default: I have a hard time being able to consider NVidias internal direct rendering system the default when it can’t be used by any other card. AFAIC a library, or interface is only a default is everyone uses it.

I agree that NVidia 3d hardware is, for the most part, the default 3d hardware for Linux–just because theirs is the best hardware that has good drivers.

Having said this, I have not looked at xig’s driver/hardware combinations recently, and 3DLabs have some cards with Linux drivers coming out soon.

DRI means “Direct Rendering Infrastructure”. It’s a set of APIs that a client-side driver can use to communicate with the X-server and the kernel to coordinate access to the hardware. It also specifies the set of APIs used by libGL.so to communicate with the client-side driver. With the exception of the Nvidia drivers and the “quirky” Matrox Parhelia drivers, all drivers for Linux and BSD use DRI. Certainly all of the drivers that ship with XFree86 and X.org X-servers do. :wink:

Since I’m one of the main developers of open-source drivers, and I’ve done a LOT of work on libGL.so, I have a pretty good idea how it all works. :wink:

As far as what needs to be installed to make it work, that depends a bit. You usually just need X installed and a recent kernel. If you’re going to use a close-source driver, you need to install whatever package the driver vendor ships. Keep in mind that the current ATI drivers don’t work with X.org. They’ve got a fix, and it should be available in their December driver release.

nvidia does not use DRI, there are a few reasons, but the number one being that most of the code from the nividia driver is shared between the windows driver and the unix drivers. This means better quality and consistency… this is also why nvidia has the best performing linux 3D accelerated drivers (any enhancement for windows also helps the unix drivers). This is not to put down DRI… just why nvidia does not use DRI. In fact, there are now some benchmarks where OpenGL is faster under linux than windows… I’d say that is a success.

And just to add, nvidia already supports the Xorg Xserver with OpenGL fully accelerated. Just download the latest drivers from www.nvidia.com

Cheers,
–Ben

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