I grew up on Irix/GL in the mid-eighties and have been programming some variant of it since (OpenGL now …). For the last 6 or so years, I have neglected the unix arena and stuck entirely with the Win32/OpenGL arena. Now I am running RedHat 8 with nVidia drivers and I am ready to charge ahead on building OpenGL apps for Linux.
Since I have been out of the Unix/OpenGL arena for so long I don’t really know what options I have in terms of the application startup framework. In Win32 I took NeHe’s excellent WinMain based framework and adapted my own Direct X 8 based Mouse/Keyboard/Joystick library to it. I would like to do something similar in Linux, using SDL. I certainly don’t want to use GLUT, it’s great for a lot of stuff but not for my needs here.
What do you Unix guys use for the base application framework (window setup, GL context creation, etc…) these days?
I’m not an expert, but my first exposure to OpenGL has been within SDL on Linux. As far as I understand, SDL makes it all very easy. I started with the NeHe tutorials, most of which have been ported to SDL. I’ve seen it suggested that these are not in the best programming style, but they certainly helped me to get started. Maybe I haven’t really grasped the thrust of your question, in which case I’ll learn something from other responses. If you don’t get satisfaction here, try subscribing to sdl@libsdl.org.
I am using Debian, and I’m very impressed with the performance of the GF4 on Linux.
I downloaded nVidia’s drivers for RedHat and installed them today. My PC has a removable tray boot disk (One WinXP, one RHL 8) so I can boot the same hardware under different operating systems. My first impression of OpenGL (using some GLUT apps) on Linux relative to WinXP is that it is GREASED LIGHTNING!!! WOOHOO!
Check out SDL it is portable and like Glut it can run on many platforms. I have been using SDL for a while now and I have no complaints it’s really good and very easy to learn.
The GeForce drivers that come with it aren’t accelerated at least with Mandrake 9.0. You need to got to NVidia and get their drivers and install them. THen it smokes!
I just installed RedHat 8.0 and Glut 3.7 on my box. I have run it with both a GeForce 2 MX 400 PCI card and a GeForce 3 Ti500 AGP card and all I can say is “Holy Chiutt!!”. Man this thing flies relative to WinXP (same box).
I believe that your problem is a simple one … the OpenGL drivers installed with RH8.0 DO NOT SUPPORT HARDWARE ACCELERATION. You have to get HDW accelerated drivers from your graphics card vendor.
If you are using an nVidia board then go to the following link and follow the instructions verbatim. It is easy and works like a champ :
Download and intall NVIDIA drivers (kernel and GLX) and do not install MESA after that!!! or you will screw up your HW acc. Remember to change driver name at xf86config-4 from nv to nvidia
If you are writing an application, pick whichever UI toolkit you prefer; they all have an “OpenGL canvas” widget.
E.g. if you used to use Motif on Irix, then you can continue to use it on Linux; use glwMDrawingAreaWidgetClass, which is declared in <GL/GLwMDrawA.h> and implemented in libGLwM.a.
If you aren’t writing an application, you can either choose to use a UI toolkit anyway, or use GLUT, or write a “raw” Xlib program. For the latter, you just need to use glXCreateContext and glXMakeCurrent in order to use OpenGL calls.