Ok. That "works". I was coming from an NSOpenGLView example where the view sets the context before the drawRect is sent.

Any it, doesn't crash/hang/stop now, but it doesn't draw anything, either... :(

Oh well.

On 11/04/2009, at 14:18 , Michael Ash wrote:

You can't just go and start calling OpenGL functions like that. OpenGL
depends on having a context set up, and each call is executed in that
context. This CoreVideo callback does nothing like that. All it does
is notify you each time the monitor is done refreshing. It's up to you
to set up your own GL context before you start making calls to GL
functions. I'm not 100% sure about how you do this, but I believe it
would be something like this:

NSOpenGLContext *savedCtx = [NSOpenGLContext currentContext];
[[self openGLContext] makeCurrentContext];
// your GL code here
[savedCtx makeCurrentContext];

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to