View Full Version : OpenGL on RedHat
10-25-2006, 05:23 PM
I am trying to update my OpenGL on a RedHat AS 4 machine. I have downloaded the latest drivers from nVidia in hopes this would help but unfortunately it has not. I am trying to use a blending equation and read in the Red Book you need at least version 1.2 for this, but my gl.h file says version 1.1. I have gone to RedHat's website to try and find an update like Sun does for Solaris, but I cannot find anything to update my OpenGL. Does anybody know how I can update my OpenGL on RedHat AS4? I need at least version 1.2 but would prefer >= 1.3. Thanks!
Have you tried with Yum?
Wll, it install Mesa and libMesa, that is almost so fast as a standard opengl, but I think that nvidia's-opengl is optimized right? At lesat you can go testing your code with Mesa ;)
10-26-2006, 02:30 AM
If I install Mesa what files do I need to search for so I can their paths into the Makefile. I have read about Mesa and installed it but then really had no idea what Mesa was all about. I would prefer to stay with standard OpenGL but if I have to use Mesa, how do I use it? Thanks!
10-26-2006, 03:38 AM
look into /usr/share/doc/NVIDIA_GLX-1.0/include/GL/ for the include files. i recommend the README in /usr/share/doc/NVIDIA_GLX-1.0, too.
But for older driver versions, headers are now automatically installed. Check that you don't have Mesa already installed. If so remove it. nv drivers should remove them, but I guess it wasn't able. And then reinstall the drivers.
As RigidBody said read the README file. You could check plenty of stuff, among them, if your card is supported with the drivers you installed.
Mesa is a free implementation of OpenGL. You generally use it just like you use GL.
10-26-2006, 07:54 AM
I went to the path /usr/share/doc/NVIDIA_GLX-1.0/include/GL/ and the gl.h file says version 1.1. I am look at the readme file but I just put on the newest drivers and it still has 1.1. Any other ideas would be great though.
I just looked at the OpenGL libraries I have is in /usr/lib is libGL.so.1.0.8776. This came with my update nVidia drivers. Inside /usr/X11R6/lib I have libGLU.so.1.3 and libGLw.so.1.0. So I apparently have version 1.3 of GLU but need at least version 1.2 of GL. Thanks again!
10-26-2006, 08:06 AM
did you look into glext.h?
10-26-2006, 08:30 AM
The version number of the .so file has nothing to do with the OpenGL version. 1.0.8776 means you have version 87.76 of the nvidia drivers installed. Depending on your graphic card you'll have either GL 2.0 or if you have a really old card GL 1.5.
To find out which OpenGL version you have, check what glGetString(GL_VERSION) returns.
To use features above OpenGL 1.2, you have to include glext.h and use the extension loading mechanism. An easier way is to use an extension loading library like glew.
10-26-2006, 08:34 AM
Originally posted by Overmind:
To use features above OpenGL 1.2, you have to include glext.h and use the extension loading mechanism. An easier way is to use an extension loading library like glew. not exactly. if you have
in your source before you include gl.h and glext.h, you can use functions like glMultiTexCoord (gl 1.3) or glWindowPos (gl 1.4) without any extension loader. take a look into glext.h, it's all in there.
You simply misread the header ToddAtWSU. What you see is simply all the interface for GL 1.1. See the below lines and you'll see plenty of good things :)
More headers don't give the version. Use glxinfo for that purpose or do it yourself as Overmind stippled it.
10-28-2006, 12:50 AM
if you have
in your source before you include gl.h and glext.h, you can use functions like glMultiTexCoord (gl 1.3) or glWindowPos (gl 1.4) without any extension loader. take a look into glext.h, it's all in there.Of course that works, but when you do that, the application will just crash when executed on a computer with a lower GL version installed, you don't get the chance to check the version string and code a fallback.
Why won't he get a chance to get the version string ? Of course anyone can. Or may I misundertood you Overmind ?
10-29-2006, 04:54 AM
If you define GL_GLEXT_PROTOTYPES and then directly use extension functions or functions of a higher GL version, then the linker binds the entry points statically.
If you try to start the same program on a computer where the extension is not available, the dynamic loader fails to load the program, because there are unresolved imports. The user will get a cryptic error message about some symbol missing before any of your code is executed, so you don't have a chance to check anything.
In addition, the program is no longer compatible with the standard GL ABI. It could be that another driver does not export the functions, but they are still available through the extension loading mechanism. That's for example the case when a driver does not come with it's own .so, and supports an extension that Mesa does not support. Then the program won't work either.
10-30-2006, 11:42 AM
Thanks. I use glxinfo and it did show me I now have version 2.0.2 installed on my machine. Thanks for all your help and advice!
11-07-2006, 07:17 AM
Sorry about all the questions as I am new to programming in a Linux environment. Most of my work has been in Windows which right now seems a lot simpler. But I am sure once I get used to Linux I will like it more than Windows. Anyways, I have Mesa installed on Linux and since found that I had version 2.0.2 from nVidia and would like to uninstall Mesa. How do I uninstall Mesa though? Linux doesn't have that nice install wizard thing like Windows does. Thanks again for your help!
11-08-2006, 05:18 AM
I am sure the consequences after uninstalling Mesa. For example, Does nVidia driver provide GLU library, too?
I never try to remove Mesa, but, uninstalling procedure on Linux is easy. Since RedHat uses RPM package manager:
>rpm -e "name_of_package"
When you install nvidia drivers, it will remove the Mesa libraries even if the package is told to be remained.
11-09-2006, 03:23 AM
I don't think it really removes Mesa. It just overwrites the library and the headers, the rest of Mesa (e.g. man pages) remains there.
The conclusion is the same: You don't need to uninstall Mesa to use the nVidia driver, it's all taken care of.
11-09-2006, 03:32 AM
Thanks. I installed the nVidia drivers and it seems to be working for me. I am not worried about have GLU as I am not using an functionality out of it right now. I do think the nVidia drivers however came with GLU. I don't remember for sure but I thought I saw them in the /include/GL directoty. Thanks!
11-09-2006, 11:23 AM
try rpm -qf to find out to which rpm package a particular file belongs.
example: rpm -qf /usr/include/GL/glu.h
be aware that the nvidia driver installer is not an rpm. in case the installer overwrites a certain file, rpm will show you which package that file originally belonged to.
Yeah Overmind, it doesn't fully uninstall Mesa, but removes sensitive files (headers and libs) it can find before doing the installation.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.