Those (few) of us who got our start in graphics coding in OS X have probably noticed a few wrinkles in the process:
- Apple’s OpenGL/GLSL implementation is always a year or two out of date
- OpenGL tutorials on the internet are always 5 years out of date, and actually written for DirectX anyway
- Books on the subject cost £50 for a hard-to-search collection of stuff you already knew which is inevitably dependant on some library or other (which they don’t explain) to do all of the magic
- GLSL is, as Shamus Young so rightly pointed out, folk knowledge
- As soon as you want to interact with OpenGL, you have to leave your cosy Cocoa haven and delve into straight C – which is moon language to those of us raised on NSExtremelyVerboseFunctionNameWithAttributes:
Hence I’ve made this site to put up some of the more obscure – or so obvious nobody has ever bothered to put up a working implementation for us newbies to pore over – code which took me hours of googling to figure out. It’s so much easier to learm by breaking a working implementation than to mess about with something originally written in a different language which might not even work in the first place.
In the process, I’m going to build one of those procedural environment things. This was going to be a simple 2D Artificial Stupidity project, but the graphics sort of took over.
There will be bugs. There will definitely be memory leaks. Much of this stuff will be apocryphal, or at least wildly inaccurate. Your video card will probably crash at some point, and I’m definitely not going to buy you a new one.