mirror of
https://github.com/yawut/SDL.git
synced 2026-08-28 03:34:44 -05:00
Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
This commit is contained in:
@@ -69,6 +69,25 @@ typedef struct SDL_Rect
|
||||
int w, h;
|
||||
} SDL_Rect;
|
||||
|
||||
/**
|
||||
* \brief A structure used to track dirty rectangles
|
||||
*
|
||||
* \sa SDL_AddDirtyRect
|
||||
* \sa SDL_ClearDirtyRects
|
||||
* \sa SDL_FreeDirtyRects
|
||||
*/
|
||||
typedef struct SDL_DirtyRect
|
||||
{
|
||||
SDL_Rect rect;
|
||||
struct SDL_DirtyRect *next;
|
||||
} SDL_DirtyRect;
|
||||
|
||||
typedef struct SDL_DirtyRectList
|
||||
{
|
||||
SDL_DirtyRect *list;
|
||||
SDL_DirtyRect *free;
|
||||
} SDL_DirtyRectList;
|
||||
|
||||
/**
|
||||
* \brief Returns true if the rectangle has no area.
|
||||
*/
|
||||
@@ -124,6 +143,22 @@ extern DECLSPEC SDL_bool SDLCALL SDL_IntersectRectAndLine(const SDL_Rect *
|
||||
int *Y1, int *X2,
|
||||
int *Y2);
|
||||
|
||||
/**
|
||||
* \brief Add a rectangle to a dirty rectangle list
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AddDirtyRect(SDL_DirtyRectList * list, const SDL_Rect * rect);
|
||||
|
||||
/**
|
||||
* \brief Remove all rectangles associated with a dirty rectangle list
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearDirtyRects(SDL_DirtyRectList * list);
|
||||
|
||||
/**
|
||||
* \brief Free memory associated with a dirty rectangle list
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_FreeDirtyRects(SDL_DirtyRectList * list);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
/* *INDENT-OFF* */
|
||||
|
||||
@@ -355,6 +355,11 @@ extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
|
||||
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
|
||||
SDL_DisplayMode * mode);
|
||||
|
||||
/**
|
||||
* \brief Get the pixel format associated with the window.
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
|
||||
|
||||
/**
|
||||
* \brief Set the gamma correction for each of the color channels on the
|
||||
* currently selected display.
|
||||
|
||||
Reference in New Issue
Block a user