hi,
i've used the osgViewerWX example for my program and I'd like to change the
camera view inside the GraphicsWindowsWX class. I've done this:
- I pass the viewer to GraphicsWindowsWX in function wxOsgApp::OnInit().
frame->SetViewer(viewer.get());
gw->setViewer(viewer.get());
And I set the new camera view in class GraphicsWindowWX.
void GraphicsWindowWX::setView()
{
_viewer->getCamera()->setViewMatrixAsLookAt(
osg::Vec3(450.,-450.,1200.),osg::Vec3(450.,450.,0.),osg::Vec3(0.,0.,1.));
}
It works fine, but when I close the program, it crashes and i got this message
in the console window:
'Warning: deleting still referenced object 08E57B70 of tye 'class
osg::Referenced *'
the final reference count was 1189214347, memory corruption
possible.
What am I doing wrong??
_________________________________________________________________
La vida de los famosos al desnudo en MSN Entretenimiento
http://entretenimiento.es.msn.com/_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org