OpenGL for Mac OS X for iPhone Developer

I am looking for a good example of a basic OpenGL application for Mac OS X, but not too simple.

I have a good foundation of iOS and objective-c experience, but I have never built a Mac OS X application.

All I managed to find were super simple examples that do all the drawing and logic in drawRect: or too complex examples with layers and levels of abstraction. I do not want to use Glut, SDL or any other third-party libraries or engines.

I want to be able to control the game path and use CADisplayLink, as in my iOS games. I would also prefer not to use .xib files because I like to understand what is happening and having this black box there is too much for me, although I would be happy to use it as a first step if it would give me everything else ( game cycle, CADisplayLink, etc.).

My iOS code creates it OpenGL Views manually, but there seems to be enough difference between iOS and OS X that arise due to head or tail problems. I just need to get a window and an OpenGL view and be able to draw this through the game loop.

Can someone point me to a good resource? Examples of apples skip between simple and complex, like everything else I can find on the Internet.

+4
source share
1 answer

Sorry, I can not answer your questions. I always used XIB files (a while ago, I also always wanted to reinvent the wheel, but now I'm lazy and prefer to do things: p), and I never used the displayed links.

What do you dislike about overriding drawRect :?

And the sample that I used to run OpenGL was as follows: http://developer.apple.com/library/mac/#samplecode/CocoaGL/Introduction/Intro.html#//apple_ref/doc/uid/DTS10004501

Not too complicated and simple enough to understand it (and it does not use XIB if I remember well: p)

+1
source

All Articles