I learn a lot from reading things witten by people on the internet and posted freely. Here's where
I try to give back some.
XCode Project Templates
I learned about these from Danial Jalkut when he posted his "Best. Template. Ever." and it
pretty much is. In fact my Cocoa Application template is based off his. I update them as I notice needs. Yes, I actually use all of these regularly.
Zip Archive of All Templates
Drop the extracted directory into here on 10.4:
~/Library/Application Support/Apple/Development Tools/Project Templates/
On 10.5 put it here:
Cocoa Application Template
- Same as Danial Jalkut's.
- The revision number generation also checks for both git repositories and SVN since I've started switching to git.
Cocoa Document-Based Application Template
- No more "New Application" in your nib. Uses your project name.
- Automatically sets the CFBundleVersion to the subversion build number through a script build phase. (This text and the script were stollen from Daniel Jalkut's Cocoa Application template). If it's not managed by SVN it checks for git and will use that instead.
- It only has the default warnings with prebinding turned off (I only target Tiger) and Zerolink turned off. I started from XCode's built-in template for this because it was an easier starting point.
- There is no application delegate created because I haven't noticed myself using it much for my document-based apps. I'll probably add it in later if I find myself using it more.
- There is a custom window controller created by default that manages the document nib.
- Has all the same things as the others, plus...
- Is a nicely setup main.c with the proper GLUT callbacks for getting things on the screen and with a viewport all setup and ready to draw.
- Includes nifty Shaders.c which lets you easily load and attach GLSL shader programs. Just pass it the path to your fragment and vertex shaders (just text files) and it will load, compile and link them for you with nice error reporting to the console in the event of an error.
If you're only interested in using a fragment shader just pass NULL for the vertex shader path and it will use a nice default that mimics the fixed function (and vice versa).