hello,
in 1.2 one could save the primary surface in a nice bitmap with
SDL_saveBMP; is there and which is it the equivalent function for 1.3
and SDL_Window?
i tried the common glReadPixels but that seemed to interfere with the
gl handling of sdl and caused many crashes
bye
Vittorio
http://wiki.libsdl.org/moin.cgi/SDL_LoadBMP_RW?highlight=(\bCategorySurface\b)On Sun, Aug 1, 2010 at 7:16 AM, Vittorio G. <vitto.giova at yahoo.it> wrote:
hello,
in 1.2 one could save the primary surface in a nice bitmap with
SDL_saveBMP; is there and which is it the equivalent function for 1.3
and SDL_Window?
i tried the common glReadPixels but that seemed to interfere with the
gl handling of sdl and caused many crashes
bye
Vittorio
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Code:
/**
- \brief Read pixels from the current rendering target.*
- \param rect A pointer to the rectangle to read, or NULL for the entire
-
render target.
- \param format The desired format of the pixel data, or 0 to use the format
-
of the rendering target
- \param pixels A pointer to be filled in with the pixel data
- \param pitch The pitch of the pixels parameter.
-
- \return 0 on success, or -1 if pixel reading is not supported.
-
- \warning This is a very slow operation, and should not be used frequently.
*/
extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
Uint32 format,
void *pixels, int pitch);
this is the equivalent of glReadPixels.
EM3 Nathaniel Fries, U.S. Navy
http://natefries.net/