Hi,

I'm trying to modify the osgviewer example for iOS in order to be able to
draw into a specified UIView object rather than to the application's
window.


Basically I created a custom ViewController with a couple of views, one of
which occupies a small area of the main window. Then, once the controller's
views have been loaded, I setup OSG as shown in the osgviewer example, but
instead of doing:


osg::ref_ptr<osg::Referenced> windata = new osgViewer::GraphicsWindowIOS::
WindowData(window);


I do this:


osg::ref_ptr<osg::Referenced> windata = new osgViewer::GraphicsWindowIOS::
WindowData(my_OsgView);


where my_OsgView is a UIView object. But this is not working, I get the
osgviewer's view on screen but not where I expect: the viewer's view seems
to have the same size of the UIView object (and this is OK) but it is
displayed away from the UIView itself...I guess that the viewer's view is
created has a 'child' of my UIView object but I expected that the viewer's
view actually 'became' my UIView object. In other words it seems that
another view is created instead of just using the one I created with
Interface Builder.


What is the correct way to draw in a generic UIView instead of the
application's window?


Thanks.

Alessandro
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to