I am looking into porting my game engine to OS X in the near future. Currently it is a Windows-only engine where I create my window using the Win32 API. I have looked a bit into how people are doing the same in OS X, but I have not really found anything that suits my needs. Basically I need to drive the main loop myself and pump messages at a certain point in the main loop. Most of the stuff I have found is about running a Cocoa application which calls an update function at given intervals, but that does not fly with my engine.
I could use SDL or SFML, but those are very large libraries and I already have code for doing almost everything else I need. If I could just extract the window creation and message handling I could use them, but I would not want to link to the entire SDL just to have it create my window.
TLDR: How do I create a window and pump messages on OS X without using bloated libraries like SDL, and while still driving the complete main loop myself?
Edited by GuyWithBeard, 13 October 2013 - 10:58 PM.