• 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
Re: Cocoa-dev Digest, Vol 4, Issue 176
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 4, Issue 176


  • Subject: Re: Cocoa-dev Digest, Vol 4, Issue 176
  • From: Nick Briggs <email@hidden>
  • Date: Thu, 22 Feb 2007 12:53:36 +0000

Patrick

before calling any gl API's you must have a valid opengl context set, this is happening when you call [NSOpenGLView defaultPixelFormat]

cheers

Nick



On 22 Feb 2007, at 12:30, email@hidden wrote:


Message: 1 Date: Wed, 21 Feb 2007 20:14:08 -0600 From: Patrick Hartling <email@hidden> Subject: Initialize the OpenGL framework To: Cocoa List <email@hidden> Message-ID: <email@hidden> Content-Type: text/plain; charset="iso-8859-1"

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

nick briggs director pilot ltd email@hidden 01273 773189 07737 454920



_______________________________________________

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


  • Follow-Ups:
    • Re: Initialize the OpenGL framework
      • From: Patrick Hartling <email@hidden>
  • Prev by Date: Re: How to access files in Cocoa application.
  • Next by Date: Re: How to access files in Cocoa application.
  • Previous by thread: Re: How to access files in Cocoa application.
  • Next by thread: Re: Initialize the OpenGL framework
  • Index(es):
    • Date
    • Thread