[osg-users] Render to Texture

paul1492 at yahoo.com paul1492 at yahoo.com
Tue Jul 15 04:54:39 PDT 2008

I'm attempting to render to a texture and then dump the rendered texture to a file (every frame), but I'm having trouble.
I've attempted to use the osgprerender example (using the --image option), and replaced the MyCameraPostDrawCallback::operator() to have a
    osgDB::writeImageFile(*_image, fileName);
where fileName is a ".tif" file (or .jpg file).
When I look at the .tif file using the Linux "display" program, I get some funny banded image. What am I doing wrong?
Is there a more efficient way to get access to the rendered image? Must I allocate an "image" array to the texture to access the image?
Paul P.


More information about the osg-users mailing list