Is there a way to figure out that an extra frame is needed (say some
return value from draw or update), so that I can call draw again?
James
Message: 14
Date: Wed, 15 Nov 2006 15:36:10 +0000
From: "Robert Osfield" <[EMAIL PROTECTED]>
Subject: Re: [osg-users] Pick objects disappear for a frame
To: "osg users" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Hi James,
I'm afraid this artificat is down to osgFX ScribeEffect requiring a frame to
check the extensions available before choosing the path of how to implement
the effect. The picking itself won't be cause any problems.
Robert.
On 11/15/06, James Bigler <[EMAIL PROTECTED]> wrote:
> >
> > I followed the example of osgkeyboardmouse to replace a picked node
with
> > a Scribe node and the picked object as a child.
> >
> > The problem I'm having is that the picked object disappears for a frame
> > after I pick it. In other other words after the scene is drawn once
> > then the picked object appears as it should.
> >
> > I'm using:
> >
> > wxWidgets (2.6.) as a gui
> > OSG 1.2 (downloaded from web, but compiled by me)
> > Producer::RenderSurface as the drawing surface
> > Windows XP Pro
> > MS VS 8 Express Edition
> >
> > Inside my "render" function I have something like this:
> >
> > {
> > sceneView->setViewport(0,0,renderSurface->getWindowWidth(),
> > renderSurface->getWindowHeight());
> > // Update view and projection matrices
> >
sceneView->setProjectionMatrixAsOrtho(-ortho_zoom_factor*aspectRatio,
> >
ortho_zoom_factor*aspectRatio,
> > -ortho_zoom_factor,
> > ortho_zoom_factor,
> > -200, 200);
> > sceneView->setViewMatrix(viewMatrix);
> >
> > renderSurface->makeCurrent();
> > // do the update traversal the scene graph - such as updating
> > // animations
> > sceneView->update();
> > sceneView->cull();
> > sceneView->draw();
> > renderSurface->sync();
> > // Swap Buffers
> > renderSurface->swapBuffers();
> > }
> >
> > My pick function does the picking, modifies the geometry shared by the
> > sceneView's root node, and calls the wxWidgets function Refresh() which
> > causes my "render" function to get called (which it is).
> >
> > Again, after I render the scene once, the picked object disappears, and
> > then subsequent frame renderings the object appears with the scribe
> > look. If I unpick an object (remove the scribe node) the unpicked node
> > appears right away (after only a single frame draw).
> >
> > Thanks,
> > James
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/