• 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: OpenGL and Document-Based Cocoa app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL and Document-Based Cocoa app


  • Subject: Re: OpenGL and Document-Based Cocoa app
  • From: Brent Gulanowski <email@hidden>
  • Date: Sun, 24 Mar 2002 10:58:09 -0500

On Sunday, March 24, 2002, at 09:44 AM, MoreMasters wrote:

Is there a way to ensure MyOpenGLView is dealloc'd first?
Is it shamefully obvious to someone that I'm going at this the totally wrong way?
Is it the done thing to send data to the GLView, rather than have the GL side ask for it?

Hi. I'm actually a newbie in Cocoa (and OpenGL), but just this week I figured out how to show OpenGL *without* using NSOpenGLView. I made my own,
actually. Perhaps there's a bug in NSOpenGLView, so you should report it.
As a workaround, try subclassing NSView and putting an NSOpenGLContext inside. I should think you'd be able to manage your own deallocation in that case.

The only thing I haven't been able to do elegantly is NSOpenGLContext's -setView:(NSView). I can't call it in -awakeFromNib, or in -initWithFrame:
, or even in -viewDidAttachToWindow -- the drawable isn't "ready" yet and I get an error. I have to do a one-time-only in -drawRect:.

If you like this idea and can improve my approach, I'd love to hear back.

Cheers,

Brent
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: OpenGL and Document-Based Cocoa app
      • From: MoreMasters <email@hidden>
References: 
 >OpenGL and Document-Based Cocoa app (From: MoreMasters <email@hidden>)

  • Prev by Date: Re: Apple and Developers (was lots of different subjects)
  • Next by Date: Determine whether class is subclass
  • Previous by thread: OpenGL and Document-Based Cocoa app
  • Next by thread: Re: OpenGL and Document-Based Cocoa app
  • Index(es):
    • Date
    • Thread