• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Initialize the OpenGL framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: checkbox delegate
  • Next by Date: Re: Newbie Questions
  • Previous by thread: Re: Newbie Questions
  • Next by thread: Must remove submenu when dealloccing NSMenuItem?
  • Index(es):
    • Date
    • Thread