All,

 

I'm in the process of porting an OGL app using GLUT to OSG using osgViewer. 

 

Currently this app has multiple viewports embedded in a single GLUT window
where one of the viewports is rendering a 3D view into a scene. Due to time
constraints, I want to replace the 3D viewport with an embedded OSG viewer
into the GLUT window as an interim solution. It should be noted, that the
embedded window is a small subset of the larger GLUT window (GLUT is using
game mode). Using the osgviewerGLUT example as a guide, I've been able to
get things working but I've run into a snag. I have a need to resize the
embedded window on occasion and I can't get it to work properly. When I
resize the embedded window by setting viewer->getCamera()->setViewport(x, y,
width, height), the new embedded window appears just fine but I still have
portions of the old embedded window left over as if the "clear" didn't
happen. I've tried several ways of getting the old embedded window to clear
out without success. It's as if I can't override the original settings when
I created the embedded window using
viewer->setUpViewerAsEmbeddedInWindow(.).

 

Has anyone run into this problem or know of a good/correct way of resizing
or moving embedded OSG windows in a larger GLUT window? If it can't be done,
it would be nice to know so that I don't spend an exorbitant amount of time
trying to get it to work.

 

For the record, I'm aware of the shortcomings and drawbacks about using GLUT
with OSG. Again, my attempt here is to come up with a stopgap measure until
I can get the entire port to osgViewer completed.

 

Thanks in advance,

-Shayne

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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

Reply via email to