Robert,

Thanks for the advice. As a follow up question that may be obvious (forgive
me), how do I enable the clear on the graphics context? I've poked around
and I can't find where this is done.

Per your suggestion, I tried my own "brute force" clear which appears to
solve the problem but I would rather use the context's clear if possible. It
seems more elegant for what I'm trying to accomplish.

Thanks,
-Shayne

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Monday, January 11, 2010 3:39 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] resizing embedded windows...

Hi Shayne,

I haven't personally tried doing exactly what you are doing, but try
changing the GraphicsWindowEmbedded context's size, and also try
enable it's clear as the graphics context by default leaves it's own
clear disabled leaving it to the clear done during the rendering of
the Camera's scene graph that is clamped to the Camera's viewport.

Another thing you could try is doing your own clear before the call to
viewer.frame().

Robert.

On Fri, Jan 8, 2010 at 11:05 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC <shayne.tuel...@hill.af.mil> wrote:
> 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
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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