Hi,

I have recently posted a question titled "viewer confusion and text". Robert 
helped me out constructing the basic layout for my simple demo. I have 
encoutered with something very challenging for me, as I am quite new to OSG.

Goal:
Designing a simple CAD-like demo app that will display a terrain and a nice (!) 
user interface with osgWidgets. Application will allow basic transformations 
and basic (most likely color based) shading. I need multiple views, such as a 
top, right, and front views.

What have I got right now:
I have setup a simple window containing a CompositeViewer, split it into 
viewports and a layout engine for UI that positions and adjusts sizes for 
viewports. I have then created a dedicated view for menu (UI) that occupies 
entire screen. All UI elements will be made with osgWidgets.

Problem:
(Probably) Because this dedicated UI view occupies whole screen rectangle, it 
does not allow messages to arrive trackball manipulator. As a matter of fact, 
messages arrive TrackballManipulator, but for some peculiar reason, it doesn't 
work. I will try to post a simplified test case tomorrow.

Viewer dedicated to menu has no color bit specified in clear mask.

Code:
pCam->setClearMask(GL_DEPTH_BUFFER_BIT);


It's also rendered last:

Code:
pCam->setRenderOrder(osg::Camera::POST_RENDER);



I have tried:

Code:
pview->getCamera()->setAllowEventFocus(false);


which seems to work, but this makes menu unusable, since mouse messages will 
not be processed.

Menu viewer is added to compositeviewer last. I am having difficulties 
understanding event handling mechanism...

osgWidgets' mouse handler return false and it doesn't handle message. Message 
then somehow arrives to (implicitly added) TrackballManipulator for menu view 
(I think this is implicitly added somewhere, because I haven't added 
TrackballManipulator to menu viewer).

Messages that were not handled by handlers don't seem to be passed to next 
view's handlers.

I would be very happy, if you could provide some guidance.

Regards,
Jason[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9751#9751





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to