Page 1 of 1

capture picture in irrlicht

Posted: Thu Feb 19, 2009 5:50 am
by Kairu
hi everyone

i am making sort of 3d graph, in irrlichti may have post earlier about the meshing and i hv solve that. now i want to export the scene to an external picture (jpg,gif) because i need to print it out for reporting. Is there anyway to do it?

thanks alot

Posted: Thu Feb 19, 2009 6:19 am
by abhishekdey1985
You must go through the Last tutorial of Quake 3 Map Shader. There's a whole class declared for that purpose. I guess there's no provision of saving screen shot as GIF.

Search for this line:

Code: Select all

video::IImage* image = Device->getVideoDriver()->createScreenShot();

Posted: Thu Feb 19, 2009 9:08 am
by hybrid
Yes, after that call writeImageToFile on one of our image writers, jpg, png, bmp, pcx, ppm, and maybe even more are supported.

Posted: Thu Feb 19, 2009 12:01 pm
by Kairu
thanks and sorry for wasting post since i haven't go through all the tutorial
thoroughly