Hi Art,
hum, ok. Here is the problem I am having:
1. In my application, I build my scene & display it.
2. In building my scene, I build my pipeline and associate it with my scene.
My blur effect is working at the start of my application.
3. My initial view camera is looking down at my terrain.
4. Later, I move the camera programmatcially - not with the mouse - to a new
location within my scene. That location is still on top of the terrain and not
below my terrain.
5. After moving the view's camera, I no longer see anything in the scene I once
saw. It appears that no updates within the scene are displayed any further
within my view
If I remove the osgPPU pipleine altogether, my application works as usual. My
goal is to "turn-on" my blurring effect "after" my camera has been moved to a
particular spot within my scene and not before then.
It is as if the "final" scene displayed in my view is the scene just before my
camera is moved and no further updates are recognised after my camera is moved.
The final image I see in my view is the scene just before the camera was moved.
below is the code that actually moves my camera programmatically.
ui_viewNumber is equal to g_uiPRIMARY_VIEW_NUMBER because p_sViewName
is related to g_uiPRIMARY_VIEW_NUMBER
Code:
void CCompositeViewerGtkmmExt::vMoveCameraToPosition(osg::Matrixd &p_mtxdM,
std::string p_sGWName, std::string p_sViewName)
{
unsigned ui_viewNumber=uiReturnViewNumberGivenName(p_sViewName);
if (ui_viewNumber == g_uiPRIMARY_VIEW_NUMBER)
{
CSceneMatrixManipulator *manip =
dynamic_cast<CSceneMatrixManipulator
*>(m_osvPrimaryView->getCameraManipulator());
manip->setByMatrix(p_mtxdM);
} // if prim view
} // vMoveCameraToPosition
do you have any idea what might cause the camera's attached texture to cease
being sent into the pipeline?
here's how I setup my camera for my main view
Code:
void CCompositeViewerGtkmmExt::vCameraSetup(osg::Camera *p_pocmCamera,
int p_iTexWidth, int p_iTexHeight)
{
osg::ref_ptr<osg::Texture> tex = otxConstructTexture(p_iTexWidth,
p_iTexHeight);
p_pocmCamera->setViewport(new osg::Viewport(0,0,p_iTexWidth,p_iTexHeight));
p_pocmCamera->attach(osg::Camera::COLOR_BUFFER0, tex);
// must write the cam output to a frame buffer object, else, nothing will
// appear on screen.
p_pocmCamera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
} // vCameraSetup
Thanks Art!
Cheers,
Allen
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27631#27631
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org