#Introduction Most tutorials seem to start off with a discussion of how hard X is, how it will mess up your head and how only a masochist would ever write X code with alternates such as SDL out there. This, in my opinion is just wrong. In the trinity of major operating systems i think X is the sanest, most reliable and cleanest designed window manager. With that in mind, lets create an OpenGL enabled X11 window for video games.
#Part 1, Creating a Window The X windowing system uses a client/server architecture. A single machine can have X running in multiple instances.
##Creating an X Window The first thing to do when opening a window under x is to tell it where the screen is. Altough there are several ways of telling the client where the server is, the most fullproof is the DISPLAY environment variable, or using NULL for default.
The function XOpenDisplay(char* display)
makes the connection to the X server. It takes one argument, a string using the display format described above, or NULL to