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

Thomas Hogarth thomas.hogarth at gmail.com
Wed Apr 20 12:21:02 PDT 2011


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20110420/c6830315/attachment-0003.htm>


More information about the osg-users mailing list