Hi,
I am setting up my camera to render to a texture with the following commands:
camera.setRenderTargetImplementation( osg::Camera::FRAME_BUFFER_OBJECT );
camera.attach( osg::Camera::BufferComponent( osg::Camera::COLORBUFFER0 ),
myBuffer );
camera.setDrawBuffer( GL_COLOR_ATTACHMENT0_EXT );
The camera now renders to the texture myBuffer which is a
osg::TextureRectangle*.
After many ticks, I decide to stop rendering to the texture, so I run the
following commands:
camera.detach( osg::Camera::BufferComponent( osg::Camera::COLORBUFFER0 ) );
camera.setDrawBuffer( GL_NONE );
camera.setReadBuffer( GL_NONE );
camera.setRenderTargetImplementation( osg::Camera::FRAME_BUFFER );
I do not delete the myBuffer pointer.
I continue to read from myBuffer even though I do not write to it anymore.
PROBLEM: The program continues to the myBuffer texture, and not to the
frame-buffer.
Regards,
Viggo
_________________________________________________________________
Finn dine favorittklipp på MSN Video.
http://video.msn.com/?mkt=nb-no&from=HMTAG_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org