🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenGL & Linux _no_ GLUT. How?

Started by
7 comments, last by JovialPeon 23 years, 1 month ago
Hello, I was hoping to get ahold of some knowledge on how to setup OpenGL to work with Linux. I''m not a big fan of GLUT, preferring to do the low level details myself, so that''s why I''m here. It seems that every site I find uses GLUT. I''ve been programming with Windows 9x & NT for a while using GL without GLUT and have been very happy. But I cannot seem to find any information for Mac, Linux, etc on non-GLUT programming. Sorry for the repedativeness, but I''ve been searching for this information for quite a while now. Thanks for any help provided.
-tim
Advertisement
Go to Nehe''s OpenGL tutorial list, and download the Linux GLX version of it. You can find a lot of the needed information within it on using GLX (It''s like WGL, except for XFree86).

Resist Windows XP''s Invasive Production Activation Technology!
http://druidgames.cjb.net/
Use SDL (www.libsdl.org). I think you''ve heard of it already, right? Anyways, it''s a (rather low-level, unlike clanlib and such) game programming/multimedia library written in C. It''ll create you a window and set up OpenGL for you in a breeze, then it really stays out the way. There are official ports for Linux, Windows, Mac, BeOS, Solaris, QNX (WIP?), FreeBSD etc. It handles sound, input (no force feedback devices yet though, I think) and threads and all that stuff as well if you want it to that is, if you need to use something portable rather than native functions.

The API has a great resume as well (hint: Loki )

"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
The original poster was looking for a more
flexable and low-level approach, using SDL would defeat
the purpose of that as SDL puts a lot of limitations and
constraints on graphics and sound ...GLUT would have been
a better solution than SDL.

The lowest level is to use glX, this is the glue between
GL and X window systems'' Xlib network graphics language.

Take a look at glXIntro, it has an example to use glX:

http://www.sun.com/software/graphics/OpenGL/manpages/glXIntro.html;$sessionid$TCJMTBAAACCHLAMTA1LU5YQ
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
My mistake. I didn''t read the post through as throughuly as I aught to have.

Note, however, that SDL puts no restrictions or limitations on to audio in your game/application. It offers functions for dealing with sound but it doesn''t stop your from using, say, DirectSound instead.

"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album
Hey! Thanks LearFox!

That is exactly what I was looking for. Much appreciated.
-tim
Hey! Thanks LearFox!

That is exactly what I was looking for. Much appreciated.
-tim
Re: Staffan

Regarding sound with SDL, SDL requires that the application
do sound timmings and does not support more advanced
levels of sound say ALSA or Y2. If you were writing a MUD
client for example and need to play sounds on multiple instances
of a program running SDL, then yer going to run into
lockup problems. Linux has support for sound servers and
async sound handling. No more glitches but still keep
up the frame rates.

This is not to say SDL is bad, SDL is a great trainer
for beginners and has made a lot of great Linux games
possible (ie glTron and so on). But at the same time
you don't want to hold down more experianced programmers
from writing more complex games by recommending SDL
for everything.


Edited by - learfox on May 24, 2001 7:56:33 PM
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.
Re: JovialPeon

Yer welcome, if you have any further glX questions just post!

You should take a moment to get to know Xlib though, Xintro
dosen''t give a through example of Xlib and has a few
misleading points in the Xevent handling.
Tara Milana - WP Entertainmenthttp://wolfpack.twu.net/Comp graphics artist and programmer.

This topic is closed to new replies.

Advertisement