High FPS in NSOpenGLView
High FPS in NSOpenGLView
- Subject: High FPS in NSOpenGLView
- From: Kim Foo-Jones <email@hidden>
- Date: Mon, 28 May 2001 03:07:15 +0100
I would like to use Cocoa to make a framework for developing my
game engine. The framework could evolve into an editor so AppKit
would be very helpful in future.
I have previously been writing the framework under OS9 and it was
very simple to set-up a loop to run my engine routines in. What
would be the best approach under OSX using Cocoa? I have an
NSOpenGLView subclass to render into, but of course I need a loop
to do my interactive rendering in... Do I need to create a
separate thread to the main program or is there some other
mechanism which would be more appropriate? Are there any issues
with drawing into an NSOpenGLView with such a method?
The subject line is a bit misleading as I'm not looking for
ultimate performance at this stage - I just want to get a loop
going to prototype my engine. It does need to be real-time,
though - capable of at least 15-20 fps, say.
Also, it would be good if I could do it in a way which made it
easy to move the engine into an actual game in future. The engine
itself is more-or-less self-contained - it only issues OpenGL
commands...
Thanks,
-Kim