a few linux/mesa questions (newbe)

I’m very new to linux and have just installed mandrake
linux 7.2. I’ve got some experience with OpenGL.
I’d appreciate it if someone would answer a few questions
I have.

  1. How is the driver situation set up in linux?
    Does it go: application calls routine in
    someLibGL.so, someLibGL.so communicates request
    to video display driver, driver draws the figures
    on the screen. Is it a 2-level process like that?
    Where could I find the *libGL.so and the “driver” files?
    (I’ve got a voodoo3 2k)

  2. I’ve currently got mesa installed via an rpm
    (mandrake evidently did this for me). I just
    downloaded the newest version of mesa from sourceforge.
    It’s just a been more recent than the one I’ve already
    got. Trouble is, this one from sourceforge is not an
    rpm file. Can someone tell me how I’m supposed to
    remove the “old” mesa and install the new mesa (perhaps without confusing linux’s package management software)?

  3. Is there anyway to switch hardware acceleration on and
    off so I can see the speed difference?


  1. I don’t know for sure, but that sounds about right. I think what you described is the DRI (Direct Rendering Interface) situation. libGL.so is in /usr/X11R6/lib, and the “driver” is part of your X server (/usr/X11R6/lib/modules/drivers)

  2. You should download the SRC RPM from
    http://rpmfind.net/linux/RPM/cooker//cooker/SRPMS//Mesa-3.4.1-1mdk.src.html , and as root do:

$ rpm --rebuild Mesa-3.4.1-1mdk.src.rpm

You will then find a bunch of binary RPMs in /usr/src/RPM/RPMS/arch/, where arch is your machines architecture (ie. i586, i686, etc). Use those to upgrade.

  1. I don’t know about this one. The only way I can think of is to start your X server with DRI enabled, run your program with hardware acceleration, then start your X server without DRI, run your program with software, and compare. I’m sure an easier way exists, but I don’t know it.

Hope this helps.

thanks for the reply rts,

could you please explain what you mean by
“Use those to upgrade.” in:

“You will then find a bunch of binary RPMs in /usr/src/RPM/RPMS/arch/,
where arch is your machines architecture (ie. i586, i686,
etc). Use those to upgrade.”

I’m very new to linux.

Sure, no problem.

After you do that “rpm --rebuild” thing, you will find some binary RPMs that have been built from the source RPMs. Go to the directory I mentioned and do:

rpm -Uh <name of file>.rpm

Now, one SRC RPMS usually makes a couple of binary RPMs… one for users and one for developers (and Mesa also makes a “demos” one)… you’ll want to do rpm -Uh on all three.

Hope this helps.

BTW… if you really are as newbie as you claim, you may want to think twice about upgrading like this, unless you have some really really compelling reason to get Mesa 3.4.1 and can’t possibly live with 3.3

thanks again rts,

i followed the link you provided. when i
tried to download the .rpm, Konqueror just
gave me a window with a black square at the
top left of the window. i tried netscape and
the page kept loading full of crazy

the only reason i wanted to upgrade mesa was
i’m learning java on linux and at the same
time and using magician to access opengl / mesa. i just figured i should upgrade if i

since you mention it, and since the demo’s
seem to run fine right now, and since i
don’t know what the heck i’m doin’,… i
think i’ll just stick with the version of
mesa i’ve got.

no offense, but i sure am glad my other
partition is beos.

thanks again for all the help.

The funny characters are your hint that you should right click on the link and select “Save as…”


sorry it took so long for this reply rts,
and thanks for the linux lesson. i guess
i was expecting the os to try and save the
file by itself. “save as” (to a newbe like
me) seemed like something i’d do if i wanted
to save the url or the html of the page
the link led to.

i’ll definitly save your instructions to
refer to when i muster up the gumption to
go for the upgrade (or any other rpm
upgrade for that matter).

very helpful. thanks again.

It isn’t the OS that does that. One of two things are to blame:

[ul][li]Your browser (for trying to display it)[*]The server (for not setting MIME types correctly)[/ul][/li]
[This message has been edited by rts (edited 03-13-2001).]

doh! right you are.

i’m sorry i implied linux was at fault.

main.c:27:undefined reference to glClearColor' main.c:28: undefined reference toglColor3f’
main.c:32: undefined reference to `gluOrtho2D’
I got the above errors while compiling a sample opengl code from a book.
The compilation was successful but the above errors appeared during linking.
(I’m using kdevelop 1.4 ,all OpenGL libraries were present but why the above errors?)

I’m using Mandrake 7.2 with Mesa-common-devel installed.

How do u set up an OpenGL programming environment for linux??

hope you’re not askin’ me. i wouldn’t have
a clue. i didnt’ mention it previously, but
i’m interested in using Java with Magician
on linux.

try starting a new thread here and be sure
to list the things you’ve tried already.

…and good luck!

Originally posted by Devio:
main.c:27:undefined reference to glClearColor' main.c:28: undefined reference toglColor3f’
main.c:32: undefined reference to `gluOrtho2D’

Looks like you forgot to link in -lGL -lGLU.

Check your link options (I don’t know how kdevelop does it, but gcc on the command lin e would look something like gcc -o myprog (list of object files) -L/usr/X11R6/lib -lGL -lGLU)

[This message has been edited by rts (edited 03-15-2001).]