I posted a message to osg-users a few days ago almost exactly about this (but I never saw the post so I'm not sure if it was sent). Basically it was just abstracting out Producer::RenderSurface from Producer::Camera into a base RenderSurfaceBase class which then new RenderSurfaces could easily be derived Since Producer::Camera actually uses only a small portion of the RenderSurface interface, it was almost trivial to make a QRenderSurface and I imagine also a wxRenderSurface. Nothing else has to change except that Producer::Camera holds a pointer to RenderSurfaceBase instead and Producer::RenderSurface derive from the new RenderSurfaceBase class. This was a very straight-forward and naive but functional implementation so maybe someone else has ideas on making it more robust?
This capability is very important for me since I am maintaining both Qt and Wx code bases...
Chris
On 7/25/06, Robert Osfield <[EMAIL PROTECTED]> wrote:
Hi Detlef,
Thanks for the example. Feel free to post it on the community section
on the wiki.
On 7/25/06, Detlef Mages <[EMAIL PROTECTED]> wrote:
> It would be nice if there is a standard implementation of a wxOsgProducerView
> (not to mention other working minimal examples for Qt, Eclipse, ... on
> different Platforms) that finds a place in the OSG release or at least on the
> web page.
I actually don't like this approach, its ends up with layer upon layer
of abstraction and obfustication away from what is really going on.
When I implement viewers to something other that Producer I code
directly using osgUtil::SceneView and osgGA::EventQueue. The
osgkeyboardmouse is a small example in this direction.
In the longer term my plan is to write a replacement for osgProducer
and osgGA that will be called osgViewer and it'll not have any direct
windowing support, rather design to be integrated with whatever
windowing toolkit you want to use. Alas it'll be a while before I
have the time available to get hacking on this, but this is the
direction I'm heading.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
