Hi Johannes,

The viewer class that most closely fits your needs is the new
CompositeViewer, as it supports multiple views or one or more scenes,
or one or more windows.

Integrating with various windowing toolkits is done via the graphics
window abstraction class call osgViewer::GraphicsWindow.  There are
Win32, X11 and Carbon implementations of GrapicsWindow built into
osgViewer, but its also possible to create your own GraphicsWindow
class to adapt your windowing toolkit into a way that osgViewer can
integrate it.  I'd recommend looking at the interfaces in
include/osgViewer/api and the implementations in src/osgViewer to
understand this process.

Alternatively you can get a native window handle from your windowing
toolkit and pass this as inhertedWindowData to viewer class to
construct a native graphics window that uses your window as its own.
Currently we only have support for this for GraphicsWindowWin32, but
it my intention that this support will be rolled out for
GraphicsWindowX11 and Carbon too.  This route is probably the least
amount of work, although it will mean a bit of platform specific
hacking to wire things up.

I have just checked in an osgviewerMFC example that shows the
inhertedWindowData approach in action so have a look at this as an
example.

I'd also recommend taking on these classes one by one - get used to
using osgViewer::Viewer and CompositeViewer classes first, using the
inbuilt windowing support, then move on to the windowing adaption side
do via GraphicsWindow.

Robert.


On 5/11/07, Johannes Brunen <[EMAIL PROTECTED]> wrote:
Hello,

I have the following (newbie) questions:

We are trying to integrate OSG into our existing OpenGL application. We
are using a home made win32 gui toolkit similar to the wxWidget or FLTK
toolkit.

We have the following list of requirements:
        - We have multiple independent windows looking into the same
scene from different viewpoints
        - We must be able to create windows showing a completely
different scene
        - We must be able to handle the manipulation code ourself, or at
least define our own manipulation scheme
        - We must be able to print the scene shown in a window
        - We must be able to print the scene from a viewpoint without a
window
        - We must be able to create bitmaps (i.e. images) from the scene
shown in a window
        - We must be able to highlight nodes in the scene dynamically
        - We must be able to have exstended cursor handling, i.e. show
sophisticated cursors dynamically (currently performed by logical xor
drawing)
        - We must be able to do rubber banding operations, e.g. only
modify a bunch of line graphics with a static probably huge background
scene.

Is it possible to do these things with OSG?
Could you give me some advise of how to do this with OSG?
As for the first requirements. Which is the appropriate entry point for
window toolkit integration?
I haven't completely understand the differences between Viewer,
SimpleViewer and CompositeViewer. Could you explain the usage pattern of
the three with respect to our requirements?

Help is very much appreciated.

With kind regards,
Johannes

Johannes Brunen
DataSolid GmbH


_______________________________________________
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/

Reply via email to