[osg-users] iOS: how to draw into a UIView object instead

Alessandro Terenzi a.terenzi at gmail.com
Thu Apr 21 00:40:36 PDT 2011


Thanks you Thomas,
I guess your suggestion will help too.

Cheers.
Alessandro

On Wed, Apr 20, 2011 at 9:21 PM, Thomas Hogarth <thomas.hogarth at gmail.com>wrote:

> Hi  Alessandro
>
> I needed to get hold of the UIView created by OSG just the other day,
> although at the mo I do it thought the ui window it creates.
>
>     //get the
>     osgViewer::GraphicsWindowIOS* window =
> dynamic_cast<osgViewer::GraphicsWindowIOS*>(_viewer->GetContext().get());
>     if(window){
>
>         UIView* view = [[window->getWindow() subviews] objectAtIndex:0];
>
>     }
>
> Not sure if you can solve your problem with it but it's a start. Perhaps in
> the future we could change the windowData to except a UIView instead, as
> most of the functionality we use on the window is actually implemented by
> UIView.
>
> Cheers
> Tom
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110421/692415f8/attachment-0004.htm>


More information about the osg-users mailing list