OpenGL / C / C++ - an example to get you started
Archive - Originally posted on "The Horse's Mouth" - 2011-01-26 07:54:39 - Graham Ellis
It's surprising just how quickly things come back - this graphic was a quick example that I played with, setting up an image, drawing some vectors onto it, and swapping my buffers - the Silicon Graphics system was almost always double buffered, and (joy of joys) addressable with world rather than pixel co-ordinates.
The pretty pattern shown here is quite a short program - a "hello graphics world" example that I wrote to show a very simple program, and all the libraries, etc, that were needed at load time for it to work on my system (Xcode on Mac OS X). Source is [here] and includes my load line so that you - if you have a similar environment to mine - won't end up having to play "hunt the include file" and "hunt the library".