PDA

View Full Version : Setting up OpenGL dev libraries under linux



05-12-2004, 11:53 AM
Hi,

I have several basic questions concerning OpenGL under linux.

First of all: I know there are several implementations of OpenGL available like MESA or TinyGL. But why should I use these instead of the SGI libraries? I've seen files in /usr/lib/ like libGL and libGLU, I guess those are the SGI libraries?

Second, all the include files are missing. Where can I get them? OpenGL.org doesnt feature any downloads afaik.

Thanks in advance.

ce110ut
05-12-2004, 02:05 PM
Originally posted by <matthias>:
Hi,

I have several basic questions concerning OpenGL under linux.

First of all: I know there are several implementations of OpenGL available like MESA or TinyGL. But why should I use these instead of the SGI libraries?do you have an SGI card/workstation? if so, then it would be wise to use the SGI libraries. mesa3d was implemented so that computers without graphics cards can do opengl. [read: emulate]



I've seen files in /usr/lib/ like libGL and libGLU, I guess those are the SGI libraries?no, they are from your X server [be it X or xfree86]



Second, all the include files are missing. Where can I get them? OpenGL.org doesnt feature any downloads afaik.which include files? opengl include files? if so, your graphics card vendor supplies them [assuming they support linux]


Thanks in advance.no problem :D

:regards:

jide
05-12-2004, 07:29 PM
Originally posted by <matthias>:
Hi,

I have several basic questions concerning OpenGL under linux.

First of all: I know there are several implementations of OpenGL available like MESA or TinyGL. But why should I use these instead of the SGI libraries? I've seen files in /usr/lib/ like libGL and libGLU, I guess those are the SGI libraries?

Second, all the include files are missing. Where can I get them? OpenGL.org doesnt feature any downloads afaik.

Thanks in advance.If you have a common linux machine, then, there's no way OpenGL libs are SGI ones.
Unfortunately you surely don't have any.

For your headers, you'll need to find them on your linux distribution CD. Or download Mesa that is a GPL implementation (understand free) of OpenGL under Linux. You may also need your graphics card drivers (Nvidia,ATI?) that will provide GL libraries and headers (at least for Nvidia). They won't be free. They won't be the SGI's ones. But they'll work better than Mesa.

Hope this helps.

05-12-2004, 10:36 PM
And is MESA available for Windows too? My application is supposed to work under Linux as well as under Microsoft Windows.

brcain
05-13-2004, 05:40 AM
You may also need your graphics card drivers (Nvidia,ATI?) that will provide GL libraries and headers (at least for Nvidia). They won't be free.What do you mean by "won't be free"? If you have an nVIDIA card there's no fee for downloading drivers or nVIDIA extensions.

brcain
05-13-2004, 05:47 AM
Originally posted by <matthias>:
is MESA available for Windows too?Why do you want to use Mesa?

jide
05-13-2004, 07:15 AM
Originally posted by brcain:

You may also need your graphics card drivers (Nvidia,ATI?) that will provide GL libraries and headers (at least for Nvidia). They won't be free.What do you mean by "won't be free"? If you have an nVIDIA card there's no fee for downloading drivers or nVIDIA extensions.I don't mean money. But free and open sources.

ce110ut
05-13-2004, 10:03 AM
Originally posted by <matthias>:
And is MESA available for Windows too? My application is supposed to work under Linux as well as under Microsoft Windows.yes it is. I forgot the link but you can easily search for it.

:regards:

05-13-2004, 08:44 PM
Why do you want to use Mesa? Well, I will have to use the same library on both Systems (Linux AND Windows) right? I've read somewhere that the MESA API can differ slightly to SGI's so I have to link against the MESA libs on both systems.

In the meantime I've downloaded MESA 6.0.1, works fine. Any idea why Debian (Woody) is delivered with MESA 3.x.x.x? This version is *ancient*, it's from 1999 or 2000 at best. I know Debian has a very conservative package selection, but this libs are from the stoneage.

ce110ut
05-14-2004, 06:00 AM
Originally posted by <matthias>:
Well, I will have to use the same library on both Systems (Linux AND Windows) right? I've read somewhere that the MESA API can differ slightly to SGI's so I have to link against the MESA libs on both systems.linking with mesa would be seamless if your users/clients have their own opengl drivers/libs. just to be sure, I'm gonna compile an opengl binary on my box that uses nvidia [geforce ti4200] and running it on my other box [mesa]. I'll post if what I claimed is true.



In the meantime I've downloaded MESA 6.0.1, works fine. Any idea why Debian (Woody) is delivered with MESA 3.x.x.x? This version is *ancient*, it's from 1999 or 2000 at best. I know Debian has a very conservative package selection, but this libs are from the stoneage.don't know why that is - for gentoo linux, the most current one [that is masked] is 3.5. weird...

:regards:

amendol
05-14-2004, 12:20 PM
OpenGL is a cross-platform library. For the different platforms, ie windows vs linux, you will need to recompile the code but with a few simple porting fixes. You should be fine with which ever OpenGL library works best with the given system.

--ie on Linux just go ahead and use which ever OpenGL you need to get acceleration for your graphics card. If you have an NVidia card, then use their driver, ATI, then use theirs.

--On windows do just the same, install whichever OpenGL driver you need to get things to work.

You will have some simple porting problems, such as varibles being initialized to zero on one system and random on the other. The performance will be slightly different on the different systems, and there might be different bugs, but all-in-all doing the work to port will end up making your code cleaner.

+ you may want to choose a nice cross-platform window wrapper to get your OpenGL window -- you might try Qt, or glut, or some other. This will make it so you don't have to do any special #defines for the given platform, just type make and it will all work...

Jamie