Reputation: 1113
How could I do the same thing this objective-c code does for iphone but for mac?
EAGLContext *k_context = [[[EAGLContext alloc]
initWithAPI:kEAGLRenderingAPIOpenGLES1
sharegroup:[[[[CCDirector sharedDirector] openGLView] context] sharegroup]] autorelease];
[EAGLContext setCurrentContext:k_context];
Upvotes: 3
Views: 1135
Reputation: 162307
Apple explains it really well in their developer documentation. On MacOS X there are three ways to create OpenGL contexts:
Upvotes: 2