[osg-users] Render to texture
mynamezach at gmail.com
Tue Sep 4 13:02:34 PDT 2007
I have this code:
for(Viewer::EventHandlerList::iterator itr =
itr != m_poViewer->getEventHandlerList().end();
ViewerEventHandler* viewerEventHandler =
Maybe you can search the code for setWriteImageFileName and back track from
I believe there is a function call to do what you want for a camera.
Also, osgprerender renders a scene to a texture every frame. If you did
that then you can probably just save off the texture by calling an
osg::Texture or osg::Image call.
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Ivan
Sent: Tuesday, September 04, 2007 3:44 PM
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Render to texture
I just want to render a simple node to a texture. All the examples are using
callbacks, osg viewer,etc.. I don't understand all that, I just want to set
up geometry, projection and new camera and then take one shoot with camera
and that's it.
So I need a simple function like this
osg::Image * CreateTopDownShotOfNode( osg::Node * node);
The main problem is how to tell osg to render using that camera.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users