[osg-users] Help - trying to get a wxWidgets implementation of osgViewer::Viewer working!

Roger James roger at beardandsandals.co.uk
Sat Sep 8 05:04:54 PDT 2007


I have just re-implemented my wxWindows implementation of osgViewer to use
osgViewer::Viewer instead of the old SimpleViewer. The code is very heavily
based on the osgviewerWX example (as was the old version!).

 

I have come across two problems. 1. I cannot get the TrackballManipilator to
work. 2. I get an assert on program exit because the view is being deleted
whilst the window is hidden.

 

Looking at 1. - I can see in the debugger that it appears that trackball
code is correctly handling all the mouse events but main scene view matrix
is not being updated. I have got somewhat lost trying to track the sequence
of events by which this should happen. Can anyone give me any guidance on
this? I am suspicious of the fact that requestRedraw and
requestContinuousUpdate are empty implementations., but this may be a red
herring(a false conclusion).

 

As far as 2. goes it is a feature of my app the it can exit whilst the popup
3d window is hidden, it used to work with the simpleViewer based code.
However I suspect I need to do more clean up now?  Any comments?

 

I have attached my source files.

 

Roger

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070908/bded59a8/attachment-0002.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: WxOsgViewer.h
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070908/bded59a8/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: WxOsgViewer.cpp
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070908/bded59a8/attachment-0001.asc>


More information about the osg-users mailing list