|
Hi All, I am developing an OSG application that renders a
scene, captures the framebuffer, analyses the contents and then renders some
additional geometry based on the results of analysis. I can render and capture the scene but I am having
problems creating a second rendering pass to draw the analysis geometry. Currently
I am using an osg::Geometry object which I render explictitly using
the osg::Drawable::draw() method. It looks as if the geometry is being draw
with an incorrect view or projection matrix. Rather than just get the view and projection matrix from the
osgUtil::SceneView and use OpenGL calls to set the matracies, is there a more
OSG friendly way to achieve what I want? The psuedo code looks like this: // Initialisation m_SceneView = new osgUtil::SceneView ; m_SceneView -> setDefaults() ; // Render loop m_SceneView -> setFrameStamp(
frameStamp ) ; m_SceneView -> setViewMatrix(
m_KBMCallback -> getViewMatrix() ); m_SceneView -> update(); m_SceneView -> cull(); m_SceneView -> draw(); glReadPixels(0, 0, outScreenSize[0],
outScreenSize[1], GL_RGBA, GL_UNSIGNED_BYTE, testImageBuffer ); processBuffer( testImageBuffer ) ; (osg::Geometry *)symbology ->
draw( *m_SceneView -> getState() ) ; m_RenderSurface -> swapBuffers(); Regards, Andy ________________________________________________________________________ This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs. ________________________________________________________________________ |
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
