PDA

View Full Version : X + Mesa the only option?



SED
02-19-2002, 11:40 AM
It seems any info I can muster up on Opengl and X involves using Mesa. Ive been wanting to try my hand at OpenGL with X. I've coded OpenGL with the M$ implementation, using GLUT, Win32 and MFC.
Basically Id just like a nudge in the right direction. Something along the lines of getting an RC up within an X window, without using Mesa or GLUT. It seems as though I remember using SGI's implementation with M$ as well, can this be used with X, or should I just stick with Mesa, as it may be the implementation found on most *nix boxes?

satan
02-19-2002, 12:30 PM
it depends on your graphics card
if you have an nvidia card you can use their drivers and their opengl implementation
else you have to use mesa, but what is your problem with mesa anyway?
for setting up a rendering context you can use glut (which is quite simple) or some widget dependant stuff (for gtk there is gtkglarea; i do not know what qt offers) or glx

[This message has been edited by satan (edited 02-19-2002).]

SED
02-19-2002, 02:25 PM
Viper V500
I compiled nvidias drivers.
I dont have a thing against Mesa, as Ive never used the lib. Just wondering what the options are using X + OpenGL. The only GL apps Ive tried under Linux are Open Universe and Tux Racer as they came with my distro, as did Mesa. I did notice a difference in frame rates with Open Universe compaired to the M$ implementation. Especially with a maximized window @ 1280 x 1024, undr Linux. Im sure I installed glx when I compiled nvidias drivers, or maybe that was part of the installation. With windows, I had opengl32.lib and gl.h. That was all that was required to compile base OpenGL apps. Under Linux I have no idea what Im using... glx or Mesa or something else. Thats why I asked for a nudge in the right direction to answer these questions. I figured getting an RC up *without* GLUT or Mesa would be a good place to start. I downloaded the glx doc earlier, prolly find a few answers in there.

satan
02-20-2002, 01:43 AM
i do not know the viper (but from your answer i think that i has an nvidia chip else it would not help to compile the drivers from nvidia)
you cannot set up a rendering context with mesa (see first post)
for the beginning you may take a look at nehes opengl tutorials (the glx or the linux code should do it)
and mesa is just a free implementation of opengl (not really due to some copyright issues but you can think of it this way)
so you can compare it to opengl32.dll (or whatever it is called) on win (although this is not really correct, too)
so if you have the nvidia drivers supported and installed you should see a drastic fps increase in 3d progs

and by the way all opengl progs i tested on linux and win run a lot faster on linux

[This message has been edited by satan (edited 02-20-2002).]

jide
02-20-2002, 04:17 AM
Sed,
You can use either OpenGL or Mesa. You got Mesa as you said, so, in the sources, there are some glx demos and Mesa demo.
If you built Mesa on your Linux, that will be Mesa the Opengl implementation, and if you built OpenGL this will be the official OpenGL.
And if you don't want to use glut, you can use glx, but know that glut can use glx.
Some graphic cards work better with Mesa (as Opengl with voodoo2) and other with Opengl and glx (as Nvidia). I only know these ones.

You told that you noticed a difference in the framerate of OpenUnivers btw Lin & Win. Which has the best speed ? and the best rendering ? just for know. thanx.

you can use glGetString( GL_RENDERER) to know if you use Mesa or not.
Tux Racer, if i remember correctly, uses the plibs. And the plib can use Mesa or not depending on if you have Mesa or not.

You can use glx, gtkglarea or qgl if you want and glut for facility.

jide

SED
02-20-2002, 09:10 AM
That should have read V550, not 500 http://www.opengl.org/discussion_boards/ubb/smile.gif It's a Diamond card.
GL_RENDER = RIVI TNT/PCI
GL_VERSION = 1.3.0
GL_VENDOR = NVIDIA Corporation

I found the source to glxgears, which was ironically re-written for glx by Brian Paul.That was just the type of example I was looking for.

I'm including gl.h, which from inspecting the header, is the Mesa header.
I'm also linking to libGL.so.1, which is a soft link to libGLwrapper.so.0.1.4??

But I still have no idea which lib this is. Maybe I should just remove any trace of OpenGL & start from scratch, that way Id know what I do and dont have.

As far as the FPS, that was just a visual assesment of Open Universe, all motions were smoother. I dont mean M$ was software rendered & Linux was hardware. You can tell software rendering on a 233Mhz, the framerates are intollerable. They were both smooth on a maximized window, but Linux was visually more fluid. The M$ driver was Nvidias Detonator on NT4.

Sean

satan
02-20-2002, 03:43 PM
if u used the rpms you may just deinstall the mesa rpms (thats what i did) and just use the nvidia ones (or debs it's just that i am on a rh box)
the header files for gl and glx are here
/usr/share/doc/NVIDIA_GLX-1.0/include/GL/gl.h

and for the latest nvidia drivers your libGL.so.1 should be a link to libGL.so.1.0.2313

so better reinstall the nvdia rpms


[This message has been edited by satan (edited 02-20-2002).]

SED
02-20-2002, 08:33 PM
Thanks for the info jide & satan. I just had to juggle the include and link paths in my Makefile to use SGI's header & Nvidias lib. I'll probably leave everything installed now that I know *what* is *where* http://www.opengl.org/discussion_boards/ubb/smile.gif I have two libGL.so.1 files that are soft linked to two different libs, the first is the wrapper lib I mentioned earlier and the second is the Nvidia lib you mentioned satan.
Check out that funky copyright notice in SGI's /usr/share/doc/NVIDIA_GLX-1.0/usr/include/GL/gl.h
or where ever it is on your box. And why is that header marked executable (755)? What a mess...

Sean