• 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: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?


  • Subject: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • From: Erik Buck <email@hidden>
  • Date: Thu, 15 Feb 2007 07:57:25 -0800 (PST)

It is relatively easy to use a Cocoa view as a texture in OpenGL.  Here is one example:
  http://developer.apple.com/qa/qa2001/qa1325.html

  It should be easy to to get WebKit to render into a texture.  Even web pages with animated gifs, flash movies, and playing QuickTime could be used as dynamic textures in OpenGL.  Quartz Composer and several Apple samples show how.  Maybe I will hack up an example...

  However, none of this is newbie work, and creating all new controls that can be dynamically used in a 3D context is going to be very hard.  Imagine an NSScroller embedded in a web page.  It will render fine, but how will you inter act with it ?  The events to move the scroller need to go to the real view that contains the scroller and not to the OpenGL view... If you are really going to recreate new controls for use in OpenGL, you will need to heavily modify WebKit or use some other HTML rendering system.

  http://developer.apple.com/cgi-bin/search.pl?q=texture+NSView&num=10&site=default_collection

  http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_offscreen/chapter_5_section_3.html

  If possible, I highly recommend using child windows to display normal Cocoa controls lover the OpenGL content. See this nifty example: http://developer.apple.com/samplecode/GLChildWindowDemo/listing15.html

_______________________________________________

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: Knowing if a scroll view is being scrolled
  • Next by Date: Re: Knowing if a scroll view is being scrolled
  • Previous by thread: Technique for receiving specific keystrokes in Foundation
  • Next by thread: [loginwindow] Add a field
  • Index(es):
    • Date
    • Thread