title: Learning about low-level graphics programming
body: <p>I'm interesting in learning about the different layers of abstraction available for making graphical applications.</p>
  
  <p>I see a lot of terms thrown around:  At the highest level of abstraction, I hear about things like C#, .NET, pyglet and pygame.  Further down, I hear about DirectX and OpenGL.  Then there's DirectDraw, SDL, the Win32 API, and still other multi-platform libraries like WxWidgets.</p>
  
  <p>How can I get a good sense of where one of these layers ends and where the next one begins?  What is the "lowest possible level" way of creating a window in Windows, in C?  What about C++?  (A code sample would be divine.)  What about in X11?  Are the Windows implementations of OpenGL and DirectX built on top of the Win32 API?  Where can I begin to learn about these things?</p>
  
  <p>There's another question on SO where <a href="http://www.charlespetzold.com/pw5/" rel="noreferrer">Programming Windows</a> is suggested.  What about for Linux?  Is there an equivalent such book?</p>
  
  <p>I'm aware that this is very low-level, and that there are many friendlier tools available, but I would like to at least learn the basics of what's going on beneath the surface.  As much as I'd like to begin slinging windows and vectors right off the bat, starting with something like pygame is too high-level for me; I really need to make the full conceptual circuit of <em>how you draw stuff on a computer</em>.</p>
  
  <p>I will certainly appreciate suggestions for books and resources, but I think it would be stupendously cool if the answers to this question filled up with lots of different ways to get to "Hello world" with different approaches to graphics programming.  C?  C++?  Using OpenGL?  Using DirectX?  On Windows XP?  On Ubuntu?  Maybe I ask for too much.</p>