View Full Version : glx tutorial?
I'm curious how difficult it is to simply use glx (and however much of X stuff is necessary) to draw some double-buffered OpenGL primitives. Can anyone point me to a tutorial for this?
Sorry, I forgot to search this forum's archive before asking.
Check out /usr/X11R6/man. There are a whole bunch of manpages
sitting in that directory.
For some example code try the glx linux ports of the tutorials
Then satan (and maybe other of his minions) pointed to:
for the nehe glx ports.
Za! The code is pretty nicely done, but there's a *lot* of
stuff in there that, say, SDL takes care of for you.
.. but be warned: X can be a real bitch
I see what you mean. I may just take another look at SDL.
[This message has been edited by jmg (edited 06-20-2003).]
06-22-2003, 12:41 AM
I don't think it's worth learning X from the ground up if you don't intend to write another abstraction layer like Qt. X is really dirty and you might become frustrated especially if you're a beginner. SDL simply rules and makes your life easy. A great disadvantage of plain X is that it isn't portable at all like Win32 API so why don't start with somehting that can be compiled on every platform?
X isn't really that difficult to program or 'dirty' in design. It has become quite complex over the years that's for sure but there's still a general overall design that 'makes sense'. Anyway if you get the X lib programming manual and maybe the ICCM you'll have all the docs you need to get started. The Xlib manual even explains how X works and how to do certain tasks like opening and handling windows etc. besides just describing the various functions. Stonemaster is right about the portability issue though,... X isn't. On the other hand you migh have to use X to get more control over the windowing system that other toolkits can't(for example making a window non-resizable - I don't know if SDL does this but I think GLUT doesn't). Anyway what I wanted to say is that you certainly can't expect X to be as easy as SDL to program but it isn't too dificult either. I gave links for the above docs in a recent post, search the forums if you want.
Originally posted by Stonemaster:
A great disadvantage of plain X is that it isn't portable at all like Win32 API so why...
hmmm.. are you telling that Win32 API is portable ?? Do you really think that ? This is the worth for portability (only available on W32 plateforms).
However X is available for almost all Unix, BSD, and could be available for Mac, and why not W32 (threw Cygwin).
I may be wrong for Cygwin as I did not use it for OpenGL.
Anyway, if your interrest is in knowing how things work from the making of a window to the gl rendering, that may be a good thing for you: W32 API is not studied like that and provides you some ways but not all as X does. You've got to know too that it will take more time to you to do this way as if you were using glut or SDL.
hope this helps.
Whoops. Sorry it took me so long to get back to this thread. Thanks for the replies.
Personally, X is plenty cross-platform enough for the OS's I'm concerned about. http://www.opengl.org/discussion_boards/ubb/smile.gif
zen, I assume by "X lib programming manual" you mean volume 1 (ISBN: 1565920023, by Adrian Nye) of that set from O'Reilly.
Hmm... searching for ICCCM and xlib finds a number of hits.
[This message has been edited by jmg (edited 06-24-2003).]
Take a look at this (http://www.opengl.org/discussion_boards/ubb/Forum4/HTML/000980.html) thread, towards the end. I have the links there.
[This message has been edited by zen (edited 06-25-2003).]
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.