[SDL] Making a screenshot
Ryan C. Gordon
icculus at icculus.org
Tue Apr 10 23:25:13 PDT 2007
> It is as simple as calling:
>
> SDL_SaveBMP( pSurface,"FILE.BMP" );
>
> The pSurface is a pointer to a SDL_Surface and the string is the filename to
> save it as.
Yes. And for OpenGL, call glReadPixels() to get the contents of the
OpenGL framebuffer...then you'd need to get the raw pixel data into some
format you can use (like a SDL_Surface for SDL_SaveBMP, etc).
--ryan.
More information about the SDL
mailing list