On 10/14/06, Gian Lorenzetto <[EMAIL PROTECTED]> wrote:
I'll do this today/tomorrow and update the wiki.
Thanks for posting this example. I have just download and read through it. I'm a bit suprised at the number of lines of code required for the full app, is this normal for WxWindows?
Looking at the example porting across to osgGA::SimpleViewer would certainly reduce the line count a bit and make it a bit more flexbile and powerful (i.e. adds database paging support).
The way I'm thinking about going with this type of integration is to make a subclass of WxGLCanavas and the new osgGA::GraphicsWindow - I have done this in the Qt osgsimleviewer examples. The GraphicsWindow provides the windowing generic interface, while things like WxGLCanvas and QGLWidget provide the implementations.
Then to implement a SimpleViewerWindow with the scene graph renderered and with a camera manipulator etc you use multiple inheritance from osgGA::SimpleViewer and the windowing specific GraphicsWindow implementation - again as the osgsimpleviewerQT* does.
Potentially you could have a GraphicsWindowProxy class as well that has a pointer to an actual implementation of GraphicsWindow such as GraphicsWindowQT/GraphicsWindowWxWindows etc, using this Proxy would allow one to dynamically assign a viewer to a graphics window implementation which is useful for some app types.
Once I have quieter spell I'll have bash at getting WxWindows configured and installed on my system and attempt a osgsimpleviewerWxWindows, an do so by writing a GraphicsWindowWxWindows subclassed from wxGLCanvas. A quiet spell might take a while to come by though, so others are welcome to jump in and have a bash at this.
Robert.
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
