[osg-users] Save the image from computer shader

liu ming 81792534 at qq.com
Sat Oct 15 09:58:12 PDT 2016


Hi,

I am learning  the osg example "osgcomputeshaders",I have a problem that how can I save the image(the result of a computation) from shaders to my folder ? I use the code :

     
Code:
   while(!viewer.done())
	{
	
		viewer.frame();
	
		osgDB::writeImageFile(*(tex2D->getImage(0)),"abc.jpg");
	}



but it do not work,Could somebody give some suggestions ?

Thank you!

Cheers,
liu

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69019#69019








More information about the osg-users mailing list