Mercurial > sdl-ios-xcode
diff include/SDL_video.h @ 5169:4d39eeaad00b
Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
The software renderer has been re-routed to use the framebuffer interface, which makes it possible to have software rendering available even on simple ports.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 03 Feb 2011 15:49:37 -0800 |
parents | 2b1989f59674 |
children | 3a8a452b49f0 |
line wrap: on
line diff
--- a/include/SDL_video.h Thu Feb 03 11:16:57 2011 -0800 +++ b/include/SDL_video.h Thu Feb 03 15:49:37 2011 -0800 @@ -608,6 +608,40 @@ int fullscreen); /** + * \brief Get an SDL surface associated with the window. + * + * \return A surface in the optimal format for the window, or NULL on error. + * + * \note You may not combine this with 3D or the rendering API on this window. + * + * \sa SDL_UpdateWindowSurface() + * \sa SDL_UpdateWindowSurfaceRects() + */ +extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window); + +/** + * \brief Copy the window surface to the screen. + * + * \return 0 on success, or -1 on error. + * + * \sa SDL_GetWindowSurface() + * \sa SDL_UpdateWindowSurfaceRects() + */ +extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window); + +/** + * \brief Copy a number of rectangles on the window surface to the screen. + * + * \return 0 on success, or -1 on error. + * + * \sa SDL_GetWindowSurface() + * \sa SDL_UpdateWindowSurfaceRect() + */ +extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window, + int numrects, + SDL_Rect * rects); + +/** * \brief Set a window's input grab mode. * * \param mode This is 1 to grab input, and 0 to release input.