mirror of
https://github.com/yawut/SDL.git
synced 2026-08-25 18:25:16 -05:00
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.
This commit is contained in:
@@ -154,12 +154,25 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
|
||||
*
|
||||
* \return A valid rendering context or NULL if there was an error.
|
||||
*
|
||||
* \sa SDL_CreateSoftwareRenderer()
|
||||
* \sa SDL_GetRendererInfo()
|
||||
* \sa SDL_DestroyRenderer()
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window,
|
||||
int index, Uint32 flags);
|
||||
|
||||
/**
|
||||
* \brief Create a 2D software rendering context for a surface.
|
||||
*
|
||||
* \param surface The surface where rendering is done.
|
||||
*
|
||||
* \return A valid rendering context or NULL if there was an error.
|
||||
*
|
||||
* \sa SDL_CreateRenderer()
|
||||
* \sa SDL_DestroyRenderer()
|
||||
*/
|
||||
extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface);
|
||||
|
||||
/**
|
||||
* \brief Get information about a rendering context.
|
||||
*/
|
||||
|
||||
@@ -607,6 +607,40 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
|
||||
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
||||
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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user