Initialize the OpenGL framework
Initialize the OpenGL framework
- Subject: Initialize the OpenGL framework
- From: Patrick Hartling <email@hidden>
- Date: Wed, 21 Feb 2007 20:14:08 -0600
I am porting a multi-threaded application development library to Cocoa, and
I have run into a problem with what seems to be OpenGL initialization. As
far as I can tell, gluNewQuadric() cannot be called in a thread (primordial
or otherwise) until after something happens inside the OpenGL framework. For
example, the following program crashes:
#import <OpenGL/glu.h>
int main()
{
gluNewQuadric();
return 0;
}
This one does not:
#import <AppKit/NSOpenGLView.h>
#import <OpenGL/glu.h>
int main()
{
[NSOpenGLView defaultPixelFormat];
gluNewQuadric();
return 0;
}
Is there some more direct mechanism that I can use to do whatever is
happening as a side effect of calling +defaultPixelFormat?
Thanks in advance.
-Patrick
--
Patrick L. Hartling | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2oum9 | http://www.infiscape.com/
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden