• 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: "Sean McBride" <email@hidden>
  • Date: Thu, 15 Feb 2007 10:03:21 -0500
  • Organization: Rogue Research

On 2007-02-14 16:33, Matt Trinneer said:

>I've been trying to figure this out for a while but am having a
>little trouble, being new to Cocoa, and OO programming in general.
>Here goes:  Is it possible to draw Interface Builder controls such as
>buttons, sliders, etc. in an OpenGL view?  I've figured out how to
>capture bitmap representations of controls and render those in OpenGL
>space. What I'd like to do is create 2D representations of these
>controls in a 3D OpenGL context, while retaining the ability to
>respond to user inputs using the interface elements built in event
>handling, action, and output functionality .  From my reading so far
>OpenGL seems like a suitable candidate for the 3D rendering
>environment. However I can't figure out if there is built-in Cocoa
>functionality to accomplish this, or, if I'd have to build it myself.

I have investigated this recently.  As others have said, overlapping
views are in general not advised.  You'll want to look at the
"UnderlaySurface" example.  It is installed with Xcode here:

/Developer/Examples/OpenGL/Cocoa/UnderlaySurface/

Note that the example, pathetically, does not even work.  The problem is
that NSPrincipleClass in UnderlaySurface-Info.plist should be "App" not
"NSApplication"- an easy fix at least.

Also the example code calls:
[[self window] setAlphaValue:.999f]

in viewDidMoveToWindow.  This seems to be completely unnecessary.

Lastly, I suggest you search the list archives (all lists) for these key
words "underlay opengl cocoa".

>Thanks for any suggestions you may be able to offer.

Your signature is _longer_ than your message, I suggest you shorten it. :)

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

References: 
 >Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context? (From: Matt Trinneer <email@hidden>)

  • Prev by Date: Re: Detecting Failed TableView Drag?
  • Next by Date: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • Previous by thread: Re: Newbie Q: Is it possible to draw functional "Cocoa Controls" in an OpenGL context?
  • Next by thread: XML elements by attributes
  • Index(es):
    • Date
    • Thread