[osg-users] Help - trying to get a wxWidgets implementation ofosgViewer::Viewer working!
roger at beardandsandals.co.uk
Sun Sep 9 08:59:48 PDT 2007
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Roger James
Sent: 08 September 2007 13:05
To: 'Public OpenSceneGraph Users discussion list.'
Subject: [osg-users] Help - trying to get a wxWidgets implementation
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.
This is getting me more confused. I turned on OpenGL tracing (GLI_Intercept)
and it looks like the model view matrix is being updated. The only thing I
can think of now is that the window is being painted the first time but not
on subsequent frames. Any ideas anyone? The osgviewerWX example works fine,
so it has got to be something in the way I have re-implemented it. It may be
something to do with this window being a popup and there being another
OpenGL graphics context active in my main window. I killed the updating of
the main window and it still does not work. I have given up looking at issue
2 until I can resolve issue1 !!!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users