SDL API renaming: SDL_render.h

Fixes https://github.com/libsdl-org/SDL/issues/6883
main
Sam Lantinga 2022-12-27 06:21:13 -08:00
parent 083e436a1a
commit 0d54115235
41 changed files with 588 additions and 454 deletions

View File

@ -80,6 +80,38 @@ General:
* SDL_NewAudioStream => SDL_CreateAudioStream * SDL_NewAudioStream => SDL_CreateAudioStream
* SDL_NumJoysticks => SDL_GetNumJoysticks * SDL_NumJoysticks => SDL_GetNumJoysticks
* SDL_PixelFormatEnumToMasks => SDL_GetMasksForPixelFormatEnum * SDL_PixelFormatEnumToMasks => SDL_GetMasksForPixelFormatEnum
* SDL_RenderCopy => SDL_RenderTexture
* SDL_RenderCopyEx => SDL_RenderTextureRotated
* SDL_RenderCopyExF => SDL_RenderTextureRotatedF
* SDL_RenderCopyF => SDL_RenderTextureF
* SDL_RenderDrawLine => SDL_RenderLine
* SDL_RenderDrawLineF => SDL_RenderLineF
* SDL_RenderDrawLines => SDL_RenderLines
* SDL_RenderDrawLinesF => SDL_RenderLinesF
* SDL_RenderDrawPoint => SDL_RenderPoint
* SDL_RenderDrawPointF => SDL_RenderPointF
* SDL_RenderDrawPoints => SDL_RenderPoints
* SDL_RenderDrawPointsF => SDL_RenderPointsF
* SDL_RenderDrawRect => SDL_RenderRect
* SDL_RenderDrawRectF => SDL_RenderRectF
* SDL_RenderDrawRects => SDL_RenderRects
* SDL_RenderDrawRectsF => SDL_RenderRectsF
* SDL_RenderGetClipRect => SDL_GetRenderClipRect
* SDL_RenderGetIntegerScale => SDL_GetRenderIntegerScale
* SDL_RenderGetLogicalSize => SDL_GetRenderLogicalSize
* SDL_RenderGetMetalCommandEncoder => SDL_GetRenderMetalCommandEncoder
* SDL_RenderGetMetalLayer => SDL_GetRenderMetalLayer
* SDL_RenderGetScale => SDL_GetRenderScale
* SDL_RenderGetViewport => SDL_GetRenderViewport
* SDL_RenderGetWindow => SDL_GetRenderWindow
* SDL_RenderIsClipEnabled => SDL_IsRenderClipEnabled
* SDL_RenderSetClipRect => SDL_SetRenderClipRect
* SDL_RenderSetIntegerScale => SDL_SetRenderIntegerScale
* SDL_RenderSetLogicalSize => SDL_SetRenderLogicalSize
* SDL_RenderSetScale => SDL_SetRenderScale
* SDL_RenderSetVSync => SDL_SetRenderVSync
* SDL_RenderSetViewport => SDL_SetRenderViewport
* SDL_RenderTargetSupported => SDL_IsRenderTargetSupported
* Removed the following functions from the API, see docs/README-migration.md for details: * Removed the following functions from the API, see docs/README-migration.md for details:
* SDL_AudioInit() * SDL_AudioInit()
* SDL_AudioQuit() * SDL_AudioQuit()

View File

@ -98,13 +98,13 @@ render(SDL_Renderer *renderer, int w, int h, double deltaTime)
} }
/* draw the background */ /* draw the background */
SDL_RenderCopy(renderer, space, NULL, NULL); SDL_RenderTexture(renderer, space, NULL, NULL);
/* draw the ship */ /* draw the ship */
shipData.rect.x = shipData.x; shipData.rect.x = shipData.x;
shipData.rect.y = shipData.y; shipData.rect.y = shipData.y;
SDL_RenderCopy(renderer, ship, NULL, &shipData.rect); SDL_RenderTexture(renderer, ship, NULL, &shipData.rect);
/* update screen */ /* update screen */
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
@ -174,7 +174,7 @@ main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, NULL, 0); renderer = SDL_CreateRenderer(window, NULL, 0);
SDL_GetWindowSize(window, &w, &h); SDL_GetWindowSize(window, &w, &h);
SDL_RenderSetLogicalSize(renderer, w, h); SDL_SetRenderLogicalSize(renderer, w, h);
/* print out some info about joysticks and try to open accelerometer for use */ /* print out some info about joysticks and try to open accelerometer for use */
printf("There are %d joysticks available\n", SDL_GetNumJoysticks()); printf("There are %d joysticks available\n", SDL_GetNumJoysticks());

View File

@ -29,7 +29,7 @@ initializeHappyFaces(SDL_Renderer *renderer)
int i; int i;
int w; int w;
int h; int h;
SDL_RenderGetLogicalSize(renderer, &w, &h); SDL_GetRenderLogicalSize(renderer, &w, &h);
for (i = 0; i < NUM_HAPPY_FACES; i++) { for (i = 0; i < NUM_HAPPY_FACES; i++) {
faces[i].x = randomFloat(0.0f, w - HAPPY_FACE_SIZE); faces[i].x = randomFloat(0.0f, w - HAPPY_FACE_SIZE);
@ -48,7 +48,7 @@ render(SDL_Renderer *renderer, double deltaTime)
int w; int w;
int h; int h;
SDL_RenderGetLogicalSize(renderer, &w, &h); SDL_GetRenderLogicalSize(renderer, &w, &h);
/* setup boundaries for happyface bouncing */ /* setup boundaries for happyface bouncing */
int maxx = w - HAPPY_FACE_SIZE; int maxx = w - HAPPY_FACE_SIZE;
@ -93,7 +93,7 @@ render(SDL_Renderer *renderer, double deltaTime)
} }
dstRect.x = faces[i].x; dstRect.x = faces[i].x;
dstRect.y = faces[i].y; dstRect.y = faces[i].y;
SDL_RenderCopy(renderer, texture, &srcRect, &dstRect); SDL_RenderTexture(renderer, texture, &srcRect, &dstRect);
} }
/* update screen */ /* update screen */
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
@ -149,7 +149,7 @@ main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, NULL, 0); renderer = SDL_CreateRenderer(window, NULL, 0);
SDL_GetWindowSize(window, &width, &height); SDL_GetWindowSize(window, &width, &height);
SDL_RenderSetLogicalSize(renderer, width, height); SDL_SetRenderLogicalSize(renderer, width, height);
initializeTexture(renderer); initializeTexture(renderer);
initializeHappyFaces(renderer); initializeHappyFaces(renderer);

View File

@ -135,7 +135,7 @@ void
getPositionForCharNumber(int n, int *x, int *y) getPositionForCharNumber(int n, int *x, int *y)
{ {
int renderW, renderH; int renderW, renderH;
SDL_RenderGetLogicalSize(renderer, &renderW, &renderH); SDL_GetRenderLogicalSize(renderer, &renderW, &renderH);
int x_padding = 16; /* padding space on left and right side of screen */ int x_padding = 16; /* padding space on left and right side of screen */
int y_padding = 32; /* padding space at top of screen */ int y_padding = 32; /* padding space at top of screen */
@ -157,7 +157,7 @@ drawGlyph(int glyph, int positionIndex)
getPositionForCharNumber(positionIndex, &x, &y); getPositionForCharNumber(positionIndex, &x, &y);
SDL_Rect srcRect = { GLYPH_SIZE_IMAGE * glyph, 0, GLYPH_SIZE_IMAGE, GLYPH_SIZE_IMAGE }; SDL_Rect srcRect = { GLYPH_SIZE_IMAGE * glyph, 0, GLYPH_SIZE_IMAGE, GLYPH_SIZE_IMAGE };
SDL_Rect dstRect = { x, y, GLYPH_SIZE_SCREEN, GLYPH_SIZE_SCREEN }; SDL_Rect dstRect = { x, y, GLYPH_SIZE_SCREEN, GLYPH_SIZE_SCREEN };
SDL_RenderCopy(renderer, texture, &srcRect, &dstRect); SDL_RenderTexture(renderer, texture, &srcRect, &dstRect);
} }
/* this function loads our font into an SDL_Texture and returns the SDL_Texture */ /* this function loads our font into an SDL_Texture and returns the SDL_Texture */
@ -227,7 +227,7 @@ main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, NULL, SDL_RENDERER_PRESENTVSYNC); renderer = SDL_CreateRenderer(window, NULL, SDL_RENDERER_PRESENTVSYNC);
SDL_GetWindowSize(window, &width, &height); SDL_GetWindowSize(window, &width, &height);
SDL_RenderSetLogicalSize(renderer, width, height); SDL_SetRenderLogicalSize(renderer, width, height);
/* load up our font */ /* load up our font */
loadFont(); loadFont();
@ -253,7 +253,7 @@ main(int argc, char *argv[])
if (event.window.event == SDL_WINDOWEVENT_RESIZED) { if (event.window.event == SDL_WINDOWEVENT_RESIZED) {
width = event.window.data1; width = event.window.data1;
height = event.window.data2; height = event.window.data2;
SDL_RenderSetLogicalSize(renderer, width, height); SDL_SetRenderLogicalSize(renderer, width, height);
#ifdef TEST_INPUT_RECT #ifdef TEST_INPUT_RECT
textrect.x = 0; textrect.x = 0;
textrect.y = height - GLYPH_SIZE_IMAGE; textrect.y = height - GLYPH_SIZE_IMAGE;

View File

@ -61,7 +61,7 @@ initializeButtons(SDL_Renderer *renderer)
SDL_Color downColor = { 191, 191, 221, 255 }; /* color of drum when pressed */ SDL_Color downColor = { 191, 191, 221, 255 }; /* color of drum when pressed */
int renderW, renderH; int renderW, renderH;
SDL_RenderGetLogicalSize(renderer, &renderW, &renderH); SDL_GetRenderLogicalSize(renderer, &renderW, &renderH);
buttonRect.x = spacing; buttonRect.x = spacing;
buttonRect.y = spacing; buttonRect.y = spacing;
@ -287,7 +287,7 @@ main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, NULL, 0); renderer = SDL_CreateRenderer(window, NULL, 0);
SDL_GetWindowSize(window, &width, &height); SDL_GetWindowSize(window, &width, &height);
SDL_RenderSetLogicalSize(renderer, width, height); SDL_SetRenderLogicalSize(renderer, width, height);
/* initialize the mixer */ /* initialize the mixer */
SDL_memset(&mixer, 0, sizeof(mixer)); SDL_memset(&mixer, 0, sizeof(mixer));

View File

@ -17,7 +17,7 @@ render(SDL_Renderer *renderer)
int renderW; int renderW;
int renderH; int renderH;
SDL_RenderGetLogicalSize(renderer, &renderW, &renderH); SDL_GetRenderLogicalSize(renderer, &renderW, &renderH);
/* Come up with a random rectangle */ /* Come up with a random rectangle */
SDL_Rect rect; SDL_Rect rect;
@ -69,7 +69,7 @@ main(int argc, char *argv[])
} }
SDL_GetWindowSize(window, &windowW, &windowH); SDL_GetWindowSize(window, &windowW, &windowH);
SDL_RenderSetLogicalSize(renderer, windowW, windowH); SDL_SetRenderLogicalSize(renderer, windowW, windowH);
/* Fill screen with black */ /* Fill screen with black */
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);

View File

@ -46,7 +46,7 @@ drawLine(SDL_Renderer *renderer, float startx, float starty, float dx, float dy)
x += dx_prime; x += dx_prime;
y += dy_prime; y += dy_prime;
/* draw brush blot */ /* draw brush blot */
SDL_RenderCopy(renderer, brush, NULL, &dstRect); SDL_RenderTexture(renderer, brush, NULL, &dstRect);
} }
} }
@ -96,7 +96,7 @@ main(int argc, char *argv[])
renderer = SDL_CreateRenderer(window, NULL, 0); renderer = SDL_CreateRenderer(window, NULL, 0);
SDL_GetWindowSize(window, &w, &h); SDL_GetWindowSize(window, &w, &h);
SDL_RenderSetLogicalSize(renderer, w, h); SDL_SetRenderLogicalSize(renderer, w, h);
/* load brush texture */ /* load brush texture */
initializeTexture(renderer); initializeTexture(renderer);
@ -127,7 +127,7 @@ main(int argc, char *argv[])
} }
} }
SDL_RenderCopy(renderer, target, NULL, NULL); SDL_RenderTexture(renderer, target, NULL, NULL);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
} }

View File

@ -247,6 +247,40 @@ which index is the "opengl" or whatnot driver, you can just pass that string dir
here, now. Passing NULL is the same as passing -1 here in SDL2, to signify you want SDL here, now. Passing NULL is the same as passing -1 here in SDL2, to signify you want SDL
to decide for you. to decide for you.
The following functions have been renamed:
* SDL_RenderCopy => SDL_RenderTexture
* SDL_RenderCopyEx => SDL_RenderTextureRotated
* SDL_RenderCopyExF => SDL_RenderTextureRotatedF
* SDL_RenderCopyF => SDL_RenderTextureF
* SDL_RenderDrawLine => SDL_RenderLine
* SDL_RenderDrawLineF => SDL_RenderLineF
* SDL_RenderDrawLines => SDL_RenderLines
* SDL_RenderDrawLinesF => SDL_RenderLinesF
* SDL_RenderDrawPoint => SDL_RenderPoint
* SDL_RenderDrawPointF => SDL_RenderPointF
* SDL_RenderDrawPoints => SDL_RenderPoints
* SDL_RenderDrawPointsF => SDL_RenderPointsF
* SDL_RenderDrawRect => SDL_RenderRect
* SDL_RenderDrawRectF => SDL_RenderRectF
* SDL_RenderDrawRects => SDL_RenderRects
* SDL_RenderDrawRectsF => SDL_RenderRectsF
* SDL_RenderGetClipRect => SDL_GetRenderClipRect
* SDL_RenderGetIntegerScale => SDL_GetRenderIntegerScale
* SDL_RenderGetLogicalSize => SDL_GetRenderLogicalSize
* SDL_RenderGetMetalCommandEncoder => SDL_GetRenderMetalCommandEncoder
* SDL_RenderGetMetalLayer => SDL_GetRenderMetalLayer
* SDL_RenderGetScale => SDL_GetRenderScale
* SDL_RenderGetViewport => SDL_GetRenderViewport
* SDL_RenderGetWindow => SDL_GetRenderWindow
* SDL_RenderIsClipEnabled => SDL_IsRenderClipEnabled
* SDL_RenderSetClipRect => SDL_SetRenderClipRect
* SDL_RenderSetIntegerScale => SDL_SetRenderIntegerScale
* SDL_RenderSetLogicalSize => SDL_SetRenderLogicalSize
* SDL_RenderSetScale => SDL_SetRenderScale
* SDL_RenderSetVSync => SDL_SetRenderVSync
* SDL_RenderSetViewport => SDL_SetRenderViewport
* SDL_RenderTargetSupported => SDL_IsRenderTargetSupported
## SDL_rwops.h ## SDL_rwops.h
The following macros have been renamed: The following macros have been renamed:

View File

@ -35,7 +35,7 @@ extern "C" {
#endif #endif
/** /**
* \brief The blend mode used in SDL_RenderCopy() and drawing operations. * \brief The blend mode used in SDL_RenderTexture() and drawing operations.
*/ */
typedef enum typedef enum
{ {

View File

@ -1400,7 +1400,7 @@ extern "C" {
#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER" #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
/** /**
* \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize. * \brief A variable controlling the scaling policy for SDL_SetRenderLogicalSize.
* *
* This variable can be set to the following values: * This variable can be set to the following values:
* "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen

View File

@ -137,6 +137,40 @@
#define __MACOSX__ __MACOS__ #define __MACOSX__ __MACOS__
#endif #endif
/* ##SDL_render.h */
#define SDL_RenderCopy SDL_RenderTexture
#define SDL_RenderCopyEx SDL_RenderTextureRotated
#define SDL_RenderCopyExF SDL_RenderTextureRotatedF
#define SDL_RenderCopyF SDL_RenderTextureF
#define SDL_RenderDrawLine SDL_RenderLine
#define SDL_RenderDrawLineF SDL_RenderLineF
#define SDL_RenderDrawLines SDL_RenderLines
#define SDL_RenderDrawLinesF SDL_RenderLinesF
#define SDL_RenderDrawPoint SDL_RenderPoint
#define SDL_RenderDrawPointF SDL_RenderPointF
#define SDL_RenderDrawPoints SDL_RenderPoints
#define SDL_RenderDrawPointsF SDL_RenderPointsF
#define SDL_RenderDrawRect SDL_RenderRect
#define SDL_RenderDrawRectF SDL_RenderRectF
#define SDL_RenderDrawRects SDL_RenderRects
#define SDL_RenderDrawRectsF SDL_RenderRectsF
#define SDL_RenderGetClipRect SDL_GetRenderClipRect
#define SDL_RenderGetIntegerScale SDL_GetRenderIntegerScale
#define SDL_RenderGetLogicalSize SDL_GetRenderLogicalSize
#define SDL_RenderGetMetalCommandEncoder SDL_GetRenderMetalCommandEncoder
#define SDL_RenderGetMetalLayer SDL_GetRenderMetalLayer
#define SDL_RenderGetScale SDL_GetRenderScale
#define SDL_RenderGetViewport SDL_GetRenderViewport
#define SDL_RenderGetWindow SDL_GetRenderWindow
#define SDL_RenderIsClipEnabled SDL_IsRenderClipEnabled
#define SDL_RenderSetClipRect SDL_SetRenderClipRect
#define SDL_RenderSetIntegerScale SDL_SetRenderIntegerScale
#define SDL_RenderSetLogicalSize SDL_SetRenderLogicalSize
#define SDL_RenderSetScale SDL_SetRenderScale
#define SDL_RenderSetVSync SDL_SetRenderVSync
#define SDL_RenderSetViewport SDL_SetRenderViewport
#define SDL_RenderTargetSupported SDL_IsRenderTargetSupported
/* ##SDL_rwops.h */ /* ##SDL_rwops.h */
#define RW_SEEK_CUR SDL_RW_SEEK_CUR #define RW_SEEK_CUR SDL_RW_SEEK_CUR
#define RW_SEEK_END SDL_RW_SEEK_END #define RW_SEEK_END SDL_RW_SEEK_END
@ -242,6 +276,40 @@
#define __MACOSX__ __MACOSX___renamed___MACOS__ #define __MACOSX__ __MACOSX___renamed___MACOS__
#endif #endif
/* ##SDL_render.h */
#define SDL_RenderCopy SDL_RenderCopy_renamed_SDL_RenderTexture
#define SDL_RenderCopyEx SDL_RenderCopyEx_renamed_SDL_RenderTextureRotated
#define SDL_RenderCopyExF SDL_RenderCopyExF_renamed_SDL_RenderTextureRotatedF
#define SDL_RenderCopyF SDL_RenderCopyF_renamed_SDL_RenderTextureF
#define SDL_RenderDrawLine SDL_RenderDrawLine_renamed_SDL_RenderLine
#define SDL_RenderDrawLineF SDL_RenderDrawLineF_renamed_SDL_RenderLineF
#define SDL_RenderDrawLines SDL_RenderDrawLines_renamed_SDL_RenderLines
#define SDL_RenderDrawLinesF SDL_RenderDrawLinesF_renamed_SDL_RenderLinesF
#define SDL_RenderDrawPoint SDL_RenderDrawPoint_renamed_SDL_RenderPoint
#define SDL_RenderDrawPointF SDL_RenderDrawPointF_renamed_SDL_RenderPointF
#define SDL_RenderDrawPoints SDL_RenderDrawPoints_renamed_SDL_RenderPoints
#define SDL_RenderDrawPointsF SDL_RenderDrawPointsF_renamed_SDL_RenderPointsF
#define SDL_RenderDrawRect SDL_RenderDrawRect_renamed_SDL_RenderRect
#define SDL_RenderDrawRectF SDL_RenderDrawRectF_renamed_SDL_RenderRectF
#define SDL_RenderDrawRects SDL_RenderDrawRects_renamed_SDL_RenderRects
#define SDL_RenderDrawRectsF SDL_RenderDrawRectsF_renamed_SDL_RenderRectsF
#define SDL_RenderGetClipRect SDL_RenderGetClipRect_renamed_SDL_GetRenderClipRect
#define SDL_RenderGetIntegerScale SDL_RenderGetIntegerScale_renamed_SDL_GetRenderIntegerScale
#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_renamed_SDL_GetRenderLogicalSize
#define SDL_RenderGetMetalCommandEncoder SDL_RenderGetMetalCommandEncoder_renamed_SDL_GetRenderMetalCommandEncoder
#define SDL_RenderGetMetalLayer SDL_RenderGetMetalLayer_renamed_SDL_GetRenderMetalLayer
#define SDL_RenderGetScale SDL_RenderGetScale_renamed_SDL_GetRenderScale
#define SDL_RenderGetViewport SDL_RenderGetViewport_renamed_SDL_GetRenderViewport
#define SDL_RenderGetWindow SDL_RenderGetWindow_renamed_SDL_GetRenderWindow
#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_renamed_SDL_IsRenderClipEnabled
#define SDL_RenderSetClipRect SDL_RenderSetClipRect_renamed_SDL_SetRenderClipRect
#define SDL_RenderSetIntegerScale SDL_RenderSetIntegerScale_renamed_SDL_SetRenderIntegerScale
#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_renamed_SDL_SetRenderLogicalSize
#define SDL_RenderSetScale SDL_RenderSetScale_renamed_SDL_SetRenderScale
#define SDL_RenderSetVSync SDL_RenderSetVSync_renamed_SDL_SetRenderVSync
#define SDL_RenderSetViewport SDL_RenderSetViewport_renamed_SDL_SetRenderViewport
#define SDL_RenderTargetSupported SDL_RenderTargetSupported_renamed_SDL_IsRenderTargetSupported
/* ##SDL_rwops.h */ /* ##SDL_rwops.h */
#define RW_SEEK_CUR RW_SEEK_CUR_renamed_SDL_RW_SEEK_CUR #define RW_SEEK_CUR RW_SEEK_CUR_renamed_SDL_RW_SEEK_CUR
#define RW_SEEK_END RW_SEEK_END_renamed_SDL_RW_SEEK_END #define RW_SEEK_END RW_SEEK_END_renamed_SDL_RW_SEEK_END

View File

@ -116,7 +116,7 @@ typedef enum
} SDL_TextureAccess; } SDL_TextureAccess;
/** /**
* The texture channel modulation used in SDL_RenderCopy(). * The texture channel modulation used in SDL_RenderTexture().
*/ */
typedef enum typedef enum
{ {
@ -126,7 +126,7 @@ typedef enum
} SDL_TextureModulate; } SDL_TextureModulate;
/** /**
* Flip constants for SDL_RenderCopyEx * Flip constants for SDL_RenderTextureRotated
*/ */
typedef enum typedef enum
{ {
@ -287,7 +287,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_GetRenderer(SDL_Window * window);
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC SDL_Window * SDLCALL SDL_RenderGetWindow(SDL_Renderer *renderer); extern DECLSPEC SDL_Window * SDLCALL SDL_GetRenderWindow(SDL_Renderer *renderer);
/** /**
* Get information about a rendering context. * Get information about a rendering context.
@ -492,7 +492,7 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
Uint8 * alpha); Uint8 * alpha);
/** /**
* Set the blend mode for a texture, used by SDL_RenderCopy(). * Set the blend mode for a texture, used by SDL_RenderTexture().
* *
* If the blend mode is not supported, the closest supported mode is chosen * If the blend mode is not supported, the closest supported mode is chosen
* and this function returns -1. * and this function returns -1.
@ -505,7 +505,7 @@ extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_GetTextureBlendMode * \sa SDL_GetTextureBlendMode
* \sa SDL_RenderCopy * \sa SDL_RenderTexture
*/ */
extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture, extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
SDL_BlendMode blendMode); SDL_BlendMode blendMode);
@ -769,7 +769,7 @@ extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
* *
* \sa SDL_SetRenderTarget * \sa SDL_SetRenderTarget
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_RenderTargetSupported(SDL_Renderer *renderer); extern DECLSPEC SDL_bool SDLCALL SDL_IsRenderTargetSupported(SDL_Renderer *renderer);
/** /**
* Set a texture as the current rendering target. * Set a texture as the current rendering target.
@ -835,16 +835,16 @@ extern DECLSPEC SDL_Texture * SDLCALL SDL_GetRenderTarget(SDL_Renderer *renderer
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetLogicalSize * \sa SDL_GetRenderLogicalSize
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h); extern DECLSPEC int SDLCALL SDL_SetRenderLogicalSize(SDL_Renderer * renderer, int w, int h);
/** /**
* Get device independent resolution for rendering. * Get device independent resolution for rendering.
* *
* When using the main rendering target (eg no target texture is set): this * When using the main rendering target (eg no target texture is set): this
* may return 0 for `w` and `h` if the SDL_Renderer has never had its logical * may return 0 for `w` and `h` if the SDL_Renderer has never had its logical
* size set by SDL_RenderSetLogicalSize(). Otherwise it returns the logical * size set by SDL_SetRenderLogicalSize(). Otherwise it returns the logical
* width and height. * width and height.
* *
* When using a target texture: Never return 0 for `w` and `h` at first. Then * When using a target texture: Never return 0 for `w` and `h` at first. Then
@ -856,9 +856,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetLogicalSize(SDL_Renderer * renderer, in
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderSetLogicalSize * \sa SDL_SetRenderLogicalSize
*/ */
extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h); extern DECLSPEC void SDLCALL SDL_GetRenderLogicalSize(SDL_Renderer * renderer, int *w, int *h);
/** /**
* Set whether to force integer scales for resolution-independent rendering. * Set whether to force integer scales for resolution-independent rendering.
@ -874,10 +874,10 @@ extern DECLSPEC void SDLCALL SDL_RenderGetLogicalSize(SDL_Renderer * renderer, i
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetIntegerScale * \sa SDL_GetRenderIntegerScale
* \sa SDL_RenderSetLogicalSize * \sa SDL_SetRenderLogicalSize
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_SetRenderIntegerScale(SDL_Renderer * renderer,
SDL_bool enable); SDL_bool enable);
/** /**
@ -889,9 +889,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetIntegerScale(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderSetIntegerScale * \sa SDL_SetRenderIntegerScale
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * renderer); extern DECLSPEC SDL_bool SDLCALL SDL_GetRenderIntegerScale(SDL_Renderer * renderer);
/** /**
* Set the drawing area for rendering on the current target. * Set the drawing area for rendering on the current target.
@ -907,9 +907,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderGetIntegerScale(SDL_Renderer * render
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetViewport * \sa SDL_GetRenderViewport
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_SetRenderViewport(SDL_Renderer * renderer,
const SDL_Rect * rect); const SDL_Rect * rect);
/** /**
@ -920,9 +920,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetViewport(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderSetViewport * \sa SDL_SetRenderViewport
*/ */
extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_GetRenderViewport(SDL_Renderer * renderer,
SDL_Rect * rect); SDL_Rect * rect);
/** /**
@ -937,10 +937,10 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetClipRect * \sa SDL_GetRenderClipRect
* \sa SDL_RenderIsClipEnabled * \sa SDL_IsRenderClipEnabled
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_SetRenderClipRect(SDL_Renderer * renderer,
const SDL_Rect * rect); const SDL_Rect * rect);
/** /**
@ -953,10 +953,10 @@ extern DECLSPEC int SDLCALL SDL_RenderSetClipRect(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderIsClipEnabled * \sa SDL_IsRenderClipEnabled
* \sa SDL_RenderSetClipRect * \sa SDL_SetRenderClipRect
*/ */
extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_GetRenderClipRect(SDL_Renderer * renderer,
SDL_Rect * rect); SDL_Rect * rect);
/** /**
@ -968,10 +968,10 @@ extern DECLSPEC void SDLCALL SDL_RenderGetClipRect(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetClipRect * \sa SDL_GetRenderClipRect
* \sa SDL_RenderSetClipRect * \sa SDL_SetRenderClipRect
*/ */
extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer); extern DECLSPEC SDL_bool SDLCALL SDL_IsRenderClipEnabled(SDL_Renderer * renderer);
/** /**
@ -993,10 +993,10 @@ extern DECLSPEC SDL_bool SDLCALL SDL_RenderIsClipEnabled(SDL_Renderer * renderer
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetScale * \sa SDL_GetRenderScale
* \sa SDL_RenderSetLogicalSize * \sa SDL_SetRenderLogicalSize
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_SetRenderScale(SDL_Renderer * renderer,
float scaleX, float scaleY); float scaleX, float scaleY);
/** /**
@ -1008,9 +1008,9 @@ extern DECLSPEC int SDLCALL SDL_RenderSetScale(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderSetScale * \sa SDL_SetRenderScale
*/ */
extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_GetRenderScale(SDL_Renderer * renderer,
float *scaleX, float *scaleY); float *scaleX, float *scaleY);
/** /**
@ -1029,10 +1029,10 @@ extern DECLSPEC void SDLCALL SDL_RenderGetScale(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetScale * \sa SDL_GetRenderScale
* \sa SDL_RenderSetScale * \sa SDL_SetRenderScale
* \sa SDL_RenderGetLogicalSize * \sa SDL_GetRenderLogicalSize
* \sa SDL_RenderSetLogicalSize * \sa SDL_SetRenderLogicalSize
*/ */
extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
int windowX, int windowY, int windowX, int windowY,
@ -1055,10 +1055,10 @@ extern DECLSPEC void SDLCALL SDL_RenderWindowToLogical(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetScale * \sa SDL_GetRenderScale
* \sa SDL_RenderSetScale * \sa SDL_SetRenderScale
* \sa SDL_RenderGetLogicalSize * \sa SDL_GetRenderLogicalSize
* \sa SDL_RenderSetLogicalSize * \sa SDL_SetRenderLogicalSize
*/ */
extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer, extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
float logicalX, float logicalY, float logicalX, float logicalY,
@ -1084,12 +1084,12 @@ extern DECLSPEC void SDLCALL SDL_RenderLogicalToWindow(SDL_Renderer * renderer,
* *
* \sa SDL_GetRenderDrawColor * \sa SDL_GetRenderDrawColor
* \sa SDL_RenderClear * \sa SDL_RenderClear
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
*/ */
@ -1133,12 +1133,12 @@ extern DECLSPEC int SDLCALL SDL_GetRenderDrawColor(SDL_Renderer * renderer,
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_GetRenderDrawBlendMode * \sa SDL_GetRenderDrawBlendMode
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
*/ */
@ -1179,8 +1179,8 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
/** /**
* Draw a point on the current rendering target. * Draw a point on the current rendering target.
* *
* SDL_RenderDrawPoint() draws a single point. If you want to draw multiple, * SDL_RenderPoint() draws a single point. If you want to draw multiple,
* use SDL_RenderDrawPoints() instead. * use SDL_RenderPoints() instead.
* *
* \param renderer the rendering context * \param renderer the rendering context
* \param x the x coordinate of the point * \param x the x coordinate of the point
@ -1190,18 +1190,18 @@ extern DECLSPEC int SDLCALL SDL_RenderClear(SDL_Renderer * renderer);
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderPoint(SDL_Renderer * renderer,
int x, int y); int x, int y);
/** /**
@ -1216,26 +1216,26 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderPoints(SDL_Renderer * renderer,
const SDL_Point * points, const SDL_Point * points,
int count); int count);
/** /**
* Draw a line on the current rendering target. * Draw a line on the current rendering target.
* *
* SDL_RenderDrawLine() draws the line to include both end points. If you want * SDL_RenderLine() draws the line to include both end points. If you want
* to draw multiple, connecting lines use SDL_RenderDrawLines() instead. * to draw multiple, connecting lines use SDL_RenderLines() instead.
* *
* \param renderer the rendering context * \param renderer the rendering context
* \param x1 the x coordinate of the start point * \param x1 the x coordinate of the start point
@ -1247,18 +1247,18 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderLine(SDL_Renderer * renderer,
int x1, int y1, int x2, int y2); int x1, int y1, int x2, int y2);
/** /**
@ -1273,18 +1273,18 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLine(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderLines(SDL_Renderer * renderer,
const SDL_Point * points, const SDL_Point * points,
int count); int count);
@ -1299,18 +1299,18 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLines(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderRect(SDL_Renderer * renderer,
const SDL_Rect * rect); const SDL_Rect * rect);
/** /**
@ -1325,18 +1325,18 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRect(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
* \sa SDL_SetRenderDrawColor * \sa SDL_SetRenderDrawColor
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderRects(SDL_Renderer * renderer,
const SDL_Rect * rects, const SDL_Rect * rects,
int count); int count);
@ -1355,12 +1355,12 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRects(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
@ -1382,12 +1382,12 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRect(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderPresent * \sa SDL_RenderPresent
*/ */
@ -1418,12 +1418,12 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRects(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderCopyEx * \sa SDL_RenderTextureRotated
* \sa SDL_SetTextureAlphaMod * \sa SDL_SetTextureAlphaMod
* \sa SDL_SetTextureBlendMode * \sa SDL_SetTextureBlendMode
* \sa SDL_SetTextureColorMod * \sa SDL_SetTextureColorMod
*/ */
extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderTexture(SDL_Renderer * renderer,
SDL_Texture * texture, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * srcrect,
const SDL_Rect * dstrect); const SDL_Rect * dstrect);
@ -1462,12 +1462,12 @@ extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderCopy * \sa SDL_RenderTexture
* \sa SDL_SetTextureAlphaMod * \sa SDL_SetTextureAlphaMod
* \sa SDL_SetTextureBlendMode * \sa SDL_SetTextureBlendMode
* \sa SDL_SetTextureColorMod * \sa SDL_SetTextureColorMod
*/ */
extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderTextureRotated(SDL_Renderer * renderer,
SDL_Texture * texture, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * srcrect,
const SDL_Rect * dstrect, const SDL_Rect * dstrect,
@ -1486,7 +1486,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyEx(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderPointF(SDL_Renderer * renderer,
float x, float y); float x, float y);
/** /**
@ -1499,7 +1499,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderPointsF(SDL_Renderer * renderer,
const SDL_FPoint * points, const SDL_FPoint * points,
int count); int count);
@ -1515,7 +1515,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderLineF(SDL_Renderer * renderer,
float x1, float y1, float x2, float y2); float x1, float y1, float x2, float y2);
/** /**
@ -1529,7 +1529,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderLinesF(SDL_Renderer * renderer,
const SDL_FPoint * points, const SDL_FPoint * points,
int count); int count);
@ -1543,7 +1543,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderRectF(SDL_Renderer * renderer,
const SDL_FRect * rect); const SDL_FRect * rect);
/** /**
@ -1557,7 +1557,7 @@ extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderRectsF(SDL_Renderer * renderer,
const SDL_FRect * rects, const SDL_FRect * rects,
int count); int count);
@ -1604,7 +1604,7 @@ extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderTextureF(SDL_Renderer * renderer,
SDL_Texture * texture, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * srcrect,
const SDL_FRect * dstrect); const SDL_FRect * dstrect);
@ -1630,7 +1630,7 @@ extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer, extern DECLSPEC int SDLCALL SDL_RenderTextureRotatedF(SDL_Renderer * renderer,
SDL_Texture * texture, SDL_Texture * texture,
const SDL_Rect * srcrect, const SDL_Rect * srcrect,
const SDL_FRect * dstrect, const SDL_FRect * dstrect,
@ -1731,7 +1731,7 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
* Update the screen with any rendering performed since the previous call. * Update the screen with any rendering performed since the previous call.
* *
* SDL's rendering functions operate on a backbuffer; that is, calling a * SDL's rendering functions operate on a backbuffer; that is, calling a
* rendering function such as SDL_RenderDrawLine() does not directly put a * rendering function such as SDL_RenderLine() does not directly put a
* line on the screen, but rather updates the backbuffer. As such, you compose * line on the screen, but rather updates the backbuffer. As such, you compose
* your entire scene and *present* the composed backbuffer to the screen as a * your entire scene and *present* the composed backbuffer to the screen as a
* complete picture. * complete picture.
@ -1751,12 +1751,12 @@ extern DECLSPEC int SDLCALL SDL_RenderReadPixels(SDL_Renderer * renderer,
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderClear * \sa SDL_RenderClear
* \sa SDL_RenderDrawLine * \sa SDL_RenderLine
* \sa SDL_RenderDrawLines * \sa SDL_RenderLines
* \sa SDL_RenderDrawPoint * \sa SDL_RenderPoint
* \sa SDL_RenderDrawPoints * \sa SDL_RenderPoints
* \sa SDL_RenderDrawRect * \sa SDL_RenderRect
* \sa SDL_RenderDrawRects * \sa SDL_RenderRects
* \sa SDL_RenderFillRect * \sa SDL_RenderFillRect
* \sa SDL_RenderFillRects * \sa SDL_RenderFillRects
* \sa SDL_SetRenderDrawBlendMode * \sa SDL_SetRenderDrawBlendMode
@ -1889,9 +1889,9 @@ extern DECLSPEC int SDLCALL SDL_GL_UnbindTexture(SDL_Texture *texture);
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetMetalCommandEncoder * \sa SDL_GetRenderMetalCommandEncoder
*/ */
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer); extern DECLSPEC void *SDLCALL SDL_GetRenderMetalLayer(SDL_Renderer * renderer);
/** /**
* Get the Metal command encoder for the current frame * Get the Metal command encoder for the current frame
@ -1910,9 +1910,9 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalLayer(SDL_Renderer * renderer);
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
* *
* \sa SDL_RenderGetMetalLayer * \sa SDL_GetRenderMetalLayer
*/ */
extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer); extern DECLSPEC void *SDLCALL SDL_GetRenderMetalCommandEncoder(SDL_Renderer * renderer);
/** /**
* Toggle VSync of the given renderer. * Toggle VSync of the given renderer.
@ -1923,7 +1923,7 @@ extern DECLSPEC void *SDLCALL SDL_RenderGetMetalCommandEncoder(SDL_Renderer * re
* *
* \since This function is available since SDL 3.0.0. * \since This function is available since SDL 3.0.0.
*/ */
extern DECLSPEC int SDLCALL SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync); extern DECLSPEC int SDLCALL SDL_SetRenderVSync(SDL_Renderer* renderer, int vsync);
/* Ends C function definitions when using C++ */ /* Ends C function definitions when using C++ */
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -434,7 +434,7 @@ SDL3_0.0.0 {
SDL_CreateRenderer; SDL_CreateRenderer;
SDL_CreateSoftwareRenderer; SDL_CreateSoftwareRenderer;
SDL_GetRenderer; SDL_GetRenderer;
SDL_RenderGetWindow; SDL_GetRenderWindow;
SDL_GetRendererInfo; SDL_GetRendererInfo;
SDL_GetRendererOutputSize; SDL_GetRendererOutputSize;
SDL_CreateTexture; SDL_CreateTexture;
@ -456,20 +456,20 @@ SDL3_0.0.0 {
SDL_LockTexture; SDL_LockTexture;
SDL_LockTextureToSurface; SDL_LockTextureToSurface;
SDL_UnlockTexture; SDL_UnlockTexture;
SDL_RenderTargetSupported; SDL_IsRenderTargetSupported;
SDL_SetRenderTarget; SDL_SetRenderTarget;
SDL_GetRenderTarget; SDL_GetRenderTarget;
SDL_RenderSetLogicalSize; SDL_SetRenderLogicalSize;
SDL_RenderGetLogicalSize; SDL_GetRenderLogicalSize;
SDL_RenderSetIntegerScale; SDL_SetRenderIntegerScale;
SDL_RenderGetIntegerScale; SDL_GetRenderIntegerScale;
SDL_RenderSetViewport; SDL_SetRenderViewport;
SDL_RenderGetViewport; SDL_GetRenderViewport;
SDL_RenderSetClipRect; SDL_SetRenderClipRect;
SDL_RenderGetClipRect; SDL_GetRenderClipRect;
SDL_RenderIsClipEnabled; SDL_IsRenderClipEnabled;
SDL_RenderSetScale; SDL_SetRenderScale;
SDL_RenderGetScale; SDL_GetRenderScale;
SDL_RenderWindowToLogical; SDL_RenderWindowToLogical;
SDL_RenderLogicalToWindow; SDL_RenderLogicalToWindow;
SDL_SetRenderDrawColor; SDL_SetRenderDrawColor;
@ -477,26 +477,26 @@ SDL3_0.0.0 {
SDL_SetRenderDrawBlendMode; SDL_SetRenderDrawBlendMode;
SDL_GetRenderDrawBlendMode; SDL_GetRenderDrawBlendMode;
SDL_RenderClear; SDL_RenderClear;
SDL_RenderDrawPoint; SDL_RenderPoint;
SDL_RenderDrawPoints; SDL_RenderPoints;
SDL_RenderDrawLine; SDL_RenderLine;
SDL_RenderDrawLines; SDL_RenderLines;
SDL_RenderDrawRect; SDL_RenderRect;
SDL_RenderDrawRects; SDL_RenderRects;
SDL_RenderFillRect; SDL_RenderFillRect;
SDL_RenderFillRects; SDL_RenderFillRects;
SDL_RenderCopy; SDL_RenderTexture;
SDL_RenderCopyEx; SDL_RenderTextureRotated;
SDL_RenderDrawPointF; SDL_RenderPointF;
SDL_RenderDrawPointsF; SDL_RenderPointsF;
SDL_RenderDrawLineF; SDL_RenderLineF;
SDL_RenderDrawLinesF; SDL_RenderLinesF;
SDL_RenderDrawRectF; SDL_RenderRectF;
SDL_RenderDrawRectsF; SDL_RenderRectsF;
SDL_RenderFillRectF; SDL_RenderFillRectF;
SDL_RenderFillRectsF; SDL_RenderFillRectsF;
SDL_RenderCopyF; SDL_RenderTextureF;
SDL_RenderCopyExF; SDL_RenderTextureRotatedF;
SDL_RenderGeometry; SDL_RenderGeometry;
SDL_RenderGeometryRaw; SDL_RenderGeometryRaw;
SDL_RenderReadPixels; SDL_RenderReadPixels;
@ -506,9 +506,9 @@ SDL3_0.0.0 {
SDL_RenderFlush; SDL_RenderFlush;
SDL_GL_BindTexture; SDL_GL_BindTexture;
SDL_GL_UnbindTexture; SDL_GL_UnbindTexture;
SDL_RenderGetMetalLayer; SDL_GetRenderMetalLayer;
SDL_RenderGetMetalCommandEncoder; SDL_GetRenderMetalCommandEncoder;
SDL_RenderSetVSync; SDL_SetRenderVSync;
SDL_Init; SDL_Init;
SDL_InitSubSystem; SDL_InitSubSystem;
SDL_QuitSubSystem; SDL_QuitSubSystem;

View File

@ -302,32 +302,32 @@
#define SDL_UpdateYUVTexture SDL_UpdateYUVTexture_REAL #define SDL_UpdateYUVTexture SDL_UpdateYUVTexture_REAL
#define SDL_LockTexture SDL_LockTexture_REAL #define SDL_LockTexture SDL_LockTexture_REAL
#define SDL_UnlockTexture SDL_UnlockTexture_REAL #define SDL_UnlockTexture SDL_UnlockTexture_REAL
#define SDL_RenderTargetSupported SDL_RenderTargetSupported_REAL #define SDL_IsRenderTargetSupported SDL_IsRenderTargetSupported_REAL
#define SDL_SetRenderTarget SDL_SetRenderTarget_REAL #define SDL_SetRenderTarget SDL_SetRenderTarget_REAL
#define SDL_GetRenderTarget SDL_GetRenderTarget_REAL #define SDL_GetRenderTarget SDL_GetRenderTarget_REAL
#define SDL_RenderSetLogicalSize SDL_RenderSetLogicalSize_REAL #define SDL_SetRenderLogicalSize SDL_SetRenderLogicalSize_REAL
#define SDL_RenderGetLogicalSize SDL_RenderGetLogicalSize_REAL #define SDL_GetRenderLogicalSize SDL_GetRenderLogicalSize_REAL
#define SDL_RenderSetViewport SDL_RenderSetViewport_REAL #define SDL_SetRenderViewport SDL_SetRenderViewport_REAL
#define SDL_RenderGetViewport SDL_RenderGetViewport_REAL #define SDL_GetRenderViewport SDL_GetRenderViewport_REAL
#define SDL_RenderSetClipRect SDL_RenderSetClipRect_REAL #define SDL_SetRenderClipRect SDL_SetRenderClipRect_REAL
#define SDL_RenderGetClipRect SDL_RenderGetClipRect_REAL #define SDL_GetRenderClipRect SDL_GetRenderClipRect_REAL
#define SDL_RenderSetScale SDL_RenderSetScale_REAL #define SDL_SetRenderScale SDL_SetRenderScale_REAL
#define SDL_RenderGetScale SDL_RenderGetScale_REAL #define SDL_GetRenderScale SDL_GetRenderScale_REAL
#define SDL_SetRenderDrawColor SDL_SetRenderDrawColor_REAL #define SDL_SetRenderDrawColor SDL_SetRenderDrawColor_REAL
#define SDL_GetRenderDrawColor SDL_GetRenderDrawColor_REAL #define SDL_GetRenderDrawColor SDL_GetRenderDrawColor_REAL
#define SDL_SetRenderDrawBlendMode SDL_SetRenderDrawBlendMode_REAL #define SDL_SetRenderDrawBlendMode SDL_SetRenderDrawBlendMode_REAL
#define SDL_GetRenderDrawBlendMode SDL_GetRenderDrawBlendMode_REAL #define SDL_GetRenderDrawBlendMode SDL_GetRenderDrawBlendMode_REAL
#define SDL_RenderClear SDL_RenderClear_REAL #define SDL_RenderClear SDL_RenderClear_REAL
#define SDL_RenderDrawPoint SDL_RenderDrawPoint_REAL #define SDL_RenderPoint SDL_RenderPoint_REAL
#define SDL_RenderDrawPoints SDL_RenderDrawPoints_REAL #define SDL_RenderPoints SDL_RenderPoints_REAL
#define SDL_RenderDrawLine SDL_RenderDrawLine_REAL #define SDL_RenderLine SDL_RenderLine_REAL
#define SDL_RenderDrawLines SDL_RenderDrawLines_REAL #define SDL_RenderLines SDL_RenderLines_REAL
#define SDL_RenderDrawRect SDL_RenderDrawRect_REAL #define SDL_RenderRect SDL_RenderRect_REAL
#define SDL_RenderDrawRects SDL_RenderDrawRects_REAL #define SDL_RenderRects SDL_RenderRects_REAL
#define SDL_RenderFillRect SDL_RenderFillRect_REAL #define SDL_RenderFillRect SDL_RenderFillRect_REAL
#define SDL_RenderFillRects SDL_RenderFillRects_REAL #define SDL_RenderFillRects SDL_RenderFillRects_REAL
#define SDL_RenderCopy SDL_RenderCopy_REAL #define SDL_RenderTexture SDL_RenderTexture_REAL
#define SDL_RenderCopyEx SDL_RenderCopyEx_REAL #define SDL_RenderTextureRotated SDL_RenderTextureRotated_REAL
#define SDL_RenderReadPixels SDL_RenderReadPixels_REAL #define SDL_RenderReadPixels SDL_RenderReadPixels_REAL
#define SDL_RenderPresent SDL_RenderPresent_REAL #define SDL_RenderPresent SDL_RenderPresent_REAL
#define SDL_DestroyTexture SDL_DestroyTexture_REAL #define SDL_DestroyTexture SDL_DestroyTexture_REAL
@ -546,7 +546,7 @@
#define SDL_GetDefaultAssertionHandler SDL_GetDefaultAssertionHandler_REAL #define SDL_GetDefaultAssertionHandler SDL_GetDefaultAssertionHandler_REAL
#define SDL_GetAssertionHandler SDL_GetAssertionHandler_REAL #define SDL_GetAssertionHandler SDL_GetAssertionHandler_REAL
#define SDL_DXGIGetOutputInfo SDL_DXGIGetOutputInfo_REAL #define SDL_DXGIGetOutputInfo SDL_DXGIGetOutputInfo_REAL
#define SDL_RenderIsClipEnabled SDL_RenderIsClipEnabled_REAL #define SDL_IsRenderClipEnabled SDL_IsRenderClipEnabled_REAL
#define SDL_WarpMouseGlobal SDL_WarpMouseGlobal_REAL #define SDL_WarpMouseGlobal SDL_WarpMouseGlobal_REAL
#define SDL_WinRTGetFSPathUNICODE SDL_WinRTGetFSPathUNICODE_REAL #define SDL_WinRTGetFSPathUNICODE SDL_WinRTGetFSPathUNICODE_REAL
#define SDL_WinRTGetFSPathUTF8 SDL_WinRTGetFSPathUTF8_REAL #define SDL_WinRTGetFSPathUTF8 SDL_WinRTGetFSPathUTF8_REAL
@ -571,8 +571,8 @@
#define SDL_GetWindowOpacity SDL_GetWindowOpacity_REAL #define SDL_GetWindowOpacity SDL_GetWindowOpacity_REAL
#define SDL_SetWindowInputFocus SDL_SetWindowInputFocus_REAL #define SDL_SetWindowInputFocus SDL_SetWindowInputFocus_REAL
#define SDL_SetWindowModalFor SDL_SetWindowModalFor_REAL #define SDL_SetWindowModalFor SDL_SetWindowModalFor_REAL
#define SDL_RenderSetIntegerScale SDL_RenderSetIntegerScale_REAL #define SDL_SetRenderIntegerScale SDL_SetRenderIntegerScale_REAL
#define SDL_RenderGetIntegerScale SDL_RenderGetIntegerScale_REAL #define SDL_GetRenderIntegerScale SDL_GetRenderIntegerScale_REAL
#define SDL_DequeueAudio SDL_DequeueAudio_REAL #define SDL_DequeueAudio SDL_DequeueAudio_REAL
#define SDL_SetWindowResizable SDL_SetWindowResizable_REAL #define SDL_SetWindowResizable SDL_SetWindowResizable_REAL
#define SDL_CreateSurface SDL_CreateSurface_REAL #define SDL_CreateSurface SDL_CreateSurface_REAL
@ -635,8 +635,8 @@
#define SDL_SetYUVConversionMode SDL_SetYUVConversionMode_REAL #define SDL_SetYUVConversionMode SDL_SetYUVConversionMode_REAL
#define SDL_GetYUVConversionMode SDL_GetYUVConversionMode_REAL #define SDL_GetYUVConversionMode SDL_GetYUVConversionMode_REAL
#define SDL_GetYUVConversionModeForResolution SDL_GetYUVConversionModeForResolution_REAL #define SDL_GetYUVConversionModeForResolution SDL_GetYUVConversionModeForResolution_REAL
#define SDL_RenderGetMetalLayer SDL_RenderGetMetalLayer_REAL #define SDL_GetRenderMetalLayer SDL_GetRenderMetalLayer_REAL
#define SDL_RenderGetMetalCommandEncoder SDL_RenderGetMetalCommandEncoder_REAL #define SDL_GetRenderMetalCommandEncoder SDL_GetRenderMetalCommandEncoder_REAL
#define SDL_IsAndroidTV SDL_IsAndroidTV_REAL #define SDL_IsAndroidTV SDL_IsAndroidTV_REAL
#define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_REAL #define SDL_WinRTGetDeviceFamily SDL_WinRTGetDeviceFamily_REAL
#define SDL_log10 SDL_log10_REAL #define SDL_log10 SDL_log10_REAL
@ -674,16 +674,16 @@
#define SDL_GetJoystickPlayerIndex SDL_GetJoystickPlayerIndex_REAL #define SDL_GetJoystickPlayerIndex SDL_GetJoystickPlayerIndex_REAL
#define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_REAL #define SDL_GameControllerGetPlayerIndex SDL_GameControllerGetPlayerIndex_REAL
#define SDL_RenderFlush SDL_RenderFlush_REAL #define SDL_RenderFlush SDL_RenderFlush_REAL
#define SDL_RenderDrawPointF SDL_RenderDrawPointF_REAL #define SDL_RenderPointF SDL_RenderPointF_REAL
#define SDL_RenderDrawPointsF SDL_RenderDrawPointsF_REAL #define SDL_RenderPointsF SDL_RenderPointsF_REAL
#define SDL_RenderDrawLineF SDL_RenderDrawLineF_REAL #define SDL_RenderLineF SDL_RenderLineF_REAL
#define SDL_RenderDrawLinesF SDL_RenderDrawLinesF_REAL #define SDL_RenderLinesF SDL_RenderLinesF_REAL
#define SDL_RenderDrawRectF SDL_RenderDrawRectF_REAL #define SDL_RenderRectF SDL_RenderRectF_REAL
#define SDL_RenderDrawRectsF SDL_RenderDrawRectsF_REAL #define SDL_RenderRectsF SDL_RenderRectsF_REAL
#define SDL_RenderFillRectF SDL_RenderFillRectF_REAL #define SDL_RenderFillRectF SDL_RenderFillRectF_REAL
#define SDL_RenderFillRectsF SDL_RenderFillRectsF_REAL #define SDL_RenderFillRectsF SDL_RenderFillRectsF_REAL
#define SDL_RenderCopyF SDL_RenderCopyF_REAL #define SDL_RenderTextureF SDL_RenderTextureF_REAL
#define SDL_RenderCopyExF SDL_RenderCopyExF_REAL #define SDL_RenderTextureRotatedF SDL_RenderTextureRotatedF_REAL
#define SDL_GetTouchDeviceType SDL_GetTouchDeviceType_REAL #define SDL_GetTouchDeviceType SDL_GetTouchDeviceType_REAL
#define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL #define SDL_SIMDGetAlignment SDL_SIMDGetAlignment_REAL
#define SDL_SIMDAlloc SDL_SIMDAlloc_REAL #define SDL_SIMDAlloc SDL_SIMDAlloc_REAL
@ -789,7 +789,7 @@
#define SDL_GetTextureUserData SDL_GetTextureUserData_REAL #define SDL_GetTextureUserData SDL_GetTextureUserData_REAL
#define SDL_RenderGeometry SDL_RenderGeometry_REAL #define SDL_RenderGeometry SDL_RenderGeometry_REAL
#define SDL_RenderGeometryRaw SDL_RenderGeometryRaw_REAL #define SDL_RenderGeometryRaw SDL_RenderGeometryRaw_REAL
#define SDL_RenderSetVSync SDL_RenderSetVSync_REAL #define SDL_SetRenderVSync SDL_SetRenderVSync_REAL
#define SDL_asprintf SDL_asprintf_REAL #define SDL_asprintf SDL_asprintf_REAL
#define SDL_vasprintf SDL_vasprintf_REAL #define SDL_vasprintf SDL_vasprintf_REAL
#define SDL_GetWindowICCProfile SDL_GetWindowICCProfile_REAL #define SDL_GetWindowICCProfile SDL_GetWindowICCProfile_REAL
@ -833,7 +833,7 @@
#define SDL_UnionFRect SDL_UnionFRect_REAL #define SDL_UnionFRect SDL_UnionFRect_REAL
#define SDL_EncloseFPoints SDL_EncloseFPoints_REAL #define SDL_EncloseFPoints SDL_EncloseFPoints_REAL
#define SDL_IntersectFRectAndLine SDL_IntersectFRectAndLine_REAL #define SDL_IntersectFRectAndLine SDL_IntersectFRectAndLine_REAL
#define SDL_RenderGetWindow SDL_RenderGetWindow_REAL #define SDL_GetRenderWindow SDL_GetRenderWindow_REAL
#define SDL_bsearch SDL_bsearch_REAL #define SDL_bsearch SDL_bsearch_REAL
#define SDL_GameControllerPathForIndex SDL_GameControllerPathForIndex_REAL #define SDL_GameControllerPathForIndex SDL_GameControllerPathForIndex_REAL
#define SDL_GameControllerPath SDL_GameControllerPath_REAL #define SDL_GameControllerPath SDL_GameControllerPath_REAL

View File

@ -329,32 +329,32 @@ SDL_DYNAPI_PROC(int,SDL_UpdateTexture,(SDL_Texture *a, const SDL_Rect *b, const
SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return) SDL_DYNAPI_PROC(int,SDL_UpdateYUVTexture,(SDL_Texture *a, const SDL_Rect *b, const Uint8 *c, int d, const Uint8 *e, int f, const Uint8 *g, int h),(a,b,c,d,e,f,g,h),return)
SDL_DYNAPI_PROC(int,SDL_LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return) SDL_DYNAPI_PROC(int,SDL_LockTexture,(SDL_Texture *a, const SDL_Rect *b, void **c, int *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),) SDL_DYNAPI_PROC(void,SDL_UnlockTexture,(SDL_Texture *a),(a),)
SDL_DYNAPI_PROC(SDL_bool,SDL_RenderTargetSupported,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(SDL_bool,SDL_IsRenderTargetSupported,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderTarget,(SDL_Renderer *a, SDL_Texture *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_Texture*,SDL_GetRenderTarget,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(SDL_Texture*,SDL_GetRenderTarget,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenderSetLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_SetRenderLogicalSize,(SDL_Renderer *a, int b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(void,SDL_RenderGetLogicalSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),) SDL_DYNAPI_PROC(void,SDL_GetRenderLogicalSize,(SDL_Renderer *a, int *b, int *c),(a,b,c),)
SDL_DYNAPI_PROC(int,SDL_RenderSetViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderViewport,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_RenderGetViewport,(SDL_Renderer *a, SDL_Rect *b),(a,b),) SDL_DYNAPI_PROC(void,SDL_GetRenderViewport,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
SDL_DYNAPI_PROC(int,SDL_RenderSetClipRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderClipRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_RenderGetClipRect,(SDL_Renderer *a, SDL_Rect *b),(a,b),) SDL_DYNAPI_PROC(void,SDL_GetRenderClipRect,(SDL_Renderer *a, SDL_Rect *b),(a,b),)
SDL_DYNAPI_PROC(int,SDL_RenderSetScale,(SDL_Renderer *a, float b, float c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_SetRenderScale,(SDL_Renderer *a, float b, float c),(a,b,c),return)
SDL_DYNAPI_PROC(void,SDL_RenderGetScale,(SDL_Renderer *a, float *b, float *c),(a,b,c),) SDL_DYNAPI_PROC(void,SDL_GetRenderScale,(SDL_Renderer *a, float *b, float *c),(a,b,c),)
SDL_DYNAPI_PROC(int,SDL_SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(int,SDL_SetRenderDrawColor,(SDL_Renderer *a, Uint8 b, Uint8 c, Uint8 d, Uint8 e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(int,SDL_GetRenderDrawColor,(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(int,SDL_GetRenderDrawColor,(SDL_Renderer *a, Uint8 *b, Uint8 *c, Uint8 *d, Uint8 *e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(int,SDL_SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_GetRenderDrawBlendMode,(SDL_Renderer *a, SDL_BlendMode *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderClear,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(int,SDL_RenderClear,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawPoint,(SDL_Renderer *a, int b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderPoint,(SDL_Renderer *a, int b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawPoints,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderPoints,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawLine,(SDL_Renderer *a, int b, int c, int d, int e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(int,SDL_RenderLine,(SDL_Renderer *a, int b, int c, int d, int e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawLines,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderLines,(SDL_Renderer *a, const SDL_Point *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_RenderRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderFillRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_RenderFillRect,(SDL_Renderer *a, const SDL_Rect *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderFillRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderFillRects,(SDL_Renderer *a, const SDL_Rect *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderCopy,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return) SDL_DYNAPI_PROC(int,SDL_RenderTexture,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(int,SDL_RenderCopyEx,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d, const double e, const SDL_Point *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return) SDL_DYNAPI_PROC(int,SDL_RenderTextureRotated,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_Rect *d, const double e, const SDL_Point *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
SDL_DYNAPI_PROC(int,SDL_RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(int,SDL_RenderReadPixels,(SDL_Renderer *a, const SDL_Rect *b, Uint32 c, void *d, int e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(void,SDL_RenderPresent,(SDL_Renderer *a),(a),) SDL_DYNAPI_PROC(void,SDL_RenderPresent,(SDL_Renderer *a),(a),)
SDL_DYNAPI_PROC(void,SDL_DestroyTexture,(SDL_Texture *a),(a),) SDL_DYNAPI_PROC(void,SDL_DestroyTexture,(SDL_Texture *a),(a),)
@ -574,7 +574,7 @@ SDL_DYNAPI_PROC(SDL_AssertionHandler,SDL_GetAssertionHandler,(void **a),(a),retu
#if defined(__WIN32__) || defined(__WINGDK__) #if defined(__WIN32__) || defined(__WINGDK__)
SDL_DYNAPI_PROC(SDL_bool,SDL_DXGIGetOutputInfo,(int a, int *b, int *c),(a,b,c),return) SDL_DYNAPI_PROC(SDL_bool,SDL_DXGIGetOutputInfo,(int a, int *b, int *c),(a,b,c),return)
#endif #endif
SDL_DYNAPI_PROC(SDL_bool,SDL_RenderIsClipEnabled,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(SDL_bool,SDL_IsRenderClipEnabled,(SDL_Renderer *a),(a),return)
#ifdef __WINRT__ #ifdef __WINRT__
SDL_DYNAPI_PROC(const wchar_t*,SDL_WinRTGetFSPathUNICODE,(SDL_WinRT_Path a),(a),return) SDL_DYNAPI_PROC(const wchar_t*,SDL_WinRTGetFSPathUNICODE,(SDL_WinRT_Path a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_WinRTGetFSPathUTF8,(SDL_WinRT_Path a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_WinRTGetFSPathUTF8,(SDL_WinRT_Path a),(a),return)
@ -604,8 +604,8 @@ SDL_DYNAPI_PROC(int,SDL_SetWindowOpacity,(SDL_Window *a, float b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_GetWindowOpacity,(SDL_Window *a, float *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_GetWindowOpacity,(SDL_Window *a, float *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_SetWindowInputFocus,(SDL_Window *a),(a),return) SDL_DYNAPI_PROC(int,SDL_SetWindowInputFocus,(SDL_Window *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_SetWindowModalFor,(SDL_Window *a, SDL_Window *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetWindowModalFor,(SDL_Window *a, SDL_Window *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderSetIntegerScale,(SDL_Renderer *a, SDL_bool b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderIntegerScale,(SDL_Renderer *a, SDL_bool b),(a,b),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_RenderGetIntegerScale,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(SDL_bool,SDL_GetRenderIntegerScale,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(Uint32,SDL_DequeueAudio,(SDL_AudioDeviceID a, void *b, Uint32 c),(a,b,c),return) SDL_DYNAPI_PROC(Uint32,SDL_DequeueAudio,(SDL_AudioDeviceID a, void *b, Uint32 c),(a,b,c),return)
SDL_DYNAPI_PROC(void,SDL_SetWindowResizable,(SDL_Window *a, SDL_bool b),(a,b),) SDL_DYNAPI_PROC(void,SDL_SetWindowResizable,(SDL_Window *a, SDL_bool b),(a,b),)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurface,(int a, int b, Uint32 c),(a,b,c),return) SDL_DYNAPI_PROC(SDL_Surface*,SDL_CreateSurface,(int a, int b, Uint32 c),(a,b,c),return)
@ -668,8 +668,8 @@ SDL_DYNAPI_PROC(float,SDL_fmodf,(float a, float b),(a,b),return)
SDL_DYNAPI_PROC(void,SDL_SetYUVConversionMode,(SDL_YUV_CONVERSION_MODE a),(a),) SDL_DYNAPI_PROC(void,SDL_SetYUVConversionMode,(SDL_YUV_CONVERSION_MODE a),(a),)
SDL_DYNAPI_PROC(SDL_YUV_CONVERSION_MODE,SDL_GetYUVConversionMode,(void),(),return) SDL_DYNAPI_PROC(SDL_YUV_CONVERSION_MODE,SDL_GetYUVConversionMode,(void),(),return)
SDL_DYNAPI_PROC(SDL_YUV_CONVERSION_MODE,SDL_GetYUVConversionModeForResolution,(int a, int b),(a,b),return) SDL_DYNAPI_PROC(SDL_YUV_CONVERSION_MODE,SDL_GetYUVConversionModeForResolution,(int a, int b),(a,b),return)
SDL_DYNAPI_PROC(void*,SDL_RenderGetMetalLayer,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(void*,SDL_GetRenderMetalLayer,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(void*,SDL_RenderGetMetalCommandEncoder,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(void*,SDL_GetRenderMetalCommandEncoder,(SDL_Renderer *a),(a),return)
#ifdef __WINRT__ #ifdef __WINRT__
SDL_DYNAPI_PROC(SDL_WinRT_DeviceFamily,SDL_WinRTGetDeviceFamily,(void),(),return) SDL_DYNAPI_PROC(SDL_WinRT_DeviceFamily,SDL_WinRTGetDeviceFamily,(void),(),return)
#endif #endif
@ -725,16 +725,16 @@ SDL_DYNAPI_PROC(int,SDL_GetJoystickDevicePlayerIndex,(int a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GetJoystickPlayerIndex,(SDL_Joystick *a),(a),return) SDL_DYNAPI_PROC(int,SDL_GetJoystickPlayerIndex,(SDL_Joystick *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_GameControllerGetPlayerIndex,(SDL_GameController *a),(a),return) SDL_DYNAPI_PROC(int,SDL_GameControllerGetPlayerIndex,(SDL_GameController *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenderFlush,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(int,SDL_RenderFlush,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawPointF,(SDL_Renderer *a, float b, float c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderPointF,(SDL_Renderer *a, float b, float c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawPointsF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderPointsF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawLineF,(SDL_Renderer *a, float b, float c, float d, float e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(int,SDL_RenderLineF,(SDL_Renderer *a, float b, float c, float d, float e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawLinesF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderLinesF,(SDL_Renderer *a, const SDL_FPoint *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_RenderRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderDrawRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderFillRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_RenderFillRectF,(SDL_Renderer *a, const SDL_FRect *b),(a,b),return)
SDL_DYNAPI_PROC(int,SDL_RenderFillRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return) SDL_DYNAPI_PROC(int,SDL_RenderFillRectsF,(SDL_Renderer *a, const SDL_FRect *b, int c),(a,b,c),return)
SDL_DYNAPI_PROC(int,SDL_RenderCopyF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d),(a,b,c,d),return) SDL_DYNAPI_PROC(int,SDL_RenderTextureF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(int,SDL_RenderCopyExF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return) SDL_DYNAPI_PROC(int,SDL_RenderTextureRotatedF,(SDL_Renderer *a, SDL_Texture *b, const SDL_Rect *c, const SDL_FRect *d, const double e, const SDL_FPoint *f, const SDL_RendererFlip g),(a,b,c,d,e,f,g),return)
SDL_DYNAPI_PROC(SDL_TouchDeviceType,SDL_GetTouchDeviceType,(SDL_TouchID a),(a),return) SDL_DYNAPI_PROC(SDL_TouchDeviceType,SDL_GetTouchDeviceType,(SDL_TouchID a),(a),return)
SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return) SDL_DYNAPI_PROC(size_t,SDL_SIMDGetAlignment,(void),(),return)
SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return) SDL_DYNAPI_PROC(void*,SDL_SIMDAlloc,(const size_t a),(a),return)
@ -850,7 +850,7 @@ SDL_DYNAPI_PROC(int,SDL_SetTextureUserData,(SDL_Texture *a, void *b),(a,b),retur
SDL_DYNAPI_PROC(void*,SDL_GetTextureUserData,(SDL_Texture *a),(a),return) SDL_DYNAPI_PROC(void*,SDL_GetTextureUserData,(SDL_Texture *a),(a),return)
SDL_DYNAPI_PROC(int,SDL_RenderGeometry,(SDL_Renderer *a, SDL_Texture *b, const SDL_Vertex *c, int d, const int *e, int f),(a,b,c,d,e,f),return) SDL_DYNAPI_PROC(int,SDL_RenderGeometry,(SDL_Renderer *a, SDL_Texture *b, const SDL_Vertex *c, int d, const int *e, int f),(a,b,c,d,e,f),return)
SDL_DYNAPI_PROC(int,SDL_RenderGeometryRaw,(SDL_Renderer *a, SDL_Texture *b, const float *c, int d, const SDL_Color *e, int f, const float *g, int h, int i, const void *j, int k, int l),(a,b,c,d,e,f,g,h,i,j,k,l),return) SDL_DYNAPI_PROC(int,SDL_RenderGeometryRaw,(SDL_Renderer *a, SDL_Texture *b, const float *c, int d, const SDL_Color *e, int f, const float *g, int h, int i, const void *j, int k, int l),(a,b,c,d,e,f,g,h,i,j,k,l),return)
SDL_DYNAPI_PROC(int,SDL_RenderSetVSync,(SDL_Renderer *a, int b),(a,b),return) SDL_DYNAPI_PROC(int,SDL_SetRenderVSync,(SDL_Renderer *a, int b),(a,b),return)
#if !SDL_DYNAPI_PROC_NO_VARARGS #if !SDL_DYNAPI_PROC_NO_VARARGS
SDL_DYNAPI_PROC(int,SDL_asprintf,(char **a, SDL_PRINTF_FORMAT_STRING const char *b, ...),(a,b),return) SDL_DYNAPI_PROC(int,SDL_asprintf,(char **a, SDL_PRINTF_FORMAT_STRING const char *b, ...),(a,b),return)
#endif #endif
@ -900,7 +900,7 @@ SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectFRect,(const SDL_FRect *a, const SDL_FRect
SDL_DYNAPI_PROC(void,SDL_UnionFRect,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),) SDL_DYNAPI_PROC(void,SDL_UnionFRect,(const SDL_FRect *a, const SDL_FRect *b, SDL_FRect *c),(a,b,c),)
SDL_DYNAPI_PROC(SDL_bool,SDL_EncloseFPoints,(const SDL_FPoint *a, int b, const SDL_FRect *c, SDL_FRect *d),(a,b,c,d),return) SDL_DYNAPI_PROC(SDL_bool,SDL_EncloseFPoints,(const SDL_FPoint *a, int b, const SDL_FRect *c, SDL_FRect *d),(a,b,c,d),return)
SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectFRectAndLine,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return) SDL_DYNAPI_PROC(SDL_bool,SDL_IntersectFRectAndLine,(const SDL_FRect *a, float *b, float *c, float *d, float *e),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(SDL_Window*,SDL_RenderGetWindow,(SDL_Renderer *a),(a),return) SDL_DYNAPI_PROC(SDL_Window*,SDL_GetRenderWindow,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(void*,SDL_bsearch,(const void *a, const void *b, size_t c, size_t d, int (SDLCALL *e)(const void *, const void *)),(a,b,c,d,e),return) SDL_DYNAPI_PROC(void*,SDL_bsearch,(const void *a, const void *b, size_t c, size_t d, int (SDLCALL *e)(const void *, const void *)),(a,b,c,d,e),return)
SDL_DYNAPI_PROC(const char*,SDL_GameControllerPathForIndex,(int a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GameControllerPathForIndex,(int a),(a),return)
SDL_DYNAPI_PROC(const char*,SDL_GameControllerPath,(SDL_GameController *a),(a),return) SDL_DYNAPI_PROC(const char*,SDL_GameControllerPath,(SDL_GameController *a),(a),return)

View File

@ -1057,7 +1057,7 @@ SDL_CreateRenderer(SDL_Window *window, const char *name, Uint32 flags)
SDL_SetWindowData(window, SDL_WINDOWRENDERDATA, renderer); SDL_SetWindowData(window, SDL_WINDOWRENDERDATA, renderer);
SDL_RenderSetViewport(renderer, NULL); SDL_SetRenderViewport(renderer, NULL);
SDL_AddEventWatch(SDL_RendererEventWatch, renderer); SDL_AddEventWatch(SDL_RendererEventWatch, renderer);
@ -1103,7 +1103,7 @@ SDL_CreateSoftwareRenderer(SDL_Surface *surface)
/* Software renderer always uses line method, for speed */ /* Software renderer always uses line method, for speed */
renderer->line_method = SDL_RENDERLINEMETHOD_LINES; renderer->line_method = SDL_RENDERLINEMETHOD_LINES;
SDL_RenderSetViewport(renderer, NULL); SDL_SetRenderViewport(renderer, NULL);
} }
return renderer; return renderer;
#else #else
@ -1119,7 +1119,7 @@ SDL_GetRenderer(SDL_Window *window)
} }
SDL_Window * SDL_Window *
SDL_RenderGetWindow(SDL_Renderer *renderer) SDL_GetRenderWindow(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, NULL); CHECK_RENDERER_MAGIC(renderer, NULL);
return renderer->window; return renderer->window;
@ -2141,7 +2141,7 @@ void SDL_UnlockTexture(SDL_Texture *texture)
} }
SDL_bool SDL_bool
SDL_RenderTargetSupported(SDL_Renderer *renderer) SDL_IsRenderTargetSupported(SDL_Renderer *renderer)
{ {
if (renderer == NULL || !renderer->SetRenderTarget) { if (renderer == NULL || !renderer->SetRenderTarget) {
return SDL_FALSE; return SDL_FALSE;
@ -2151,7 +2151,7 @@ SDL_RenderTargetSupported(SDL_Renderer *renderer)
int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
{ {
if (!SDL_RenderTargetSupported(renderer)) { if (!SDL_IsRenderTargetSupported(renderer)) {
return SDL_Unsupported(); return SDL_Unsupported();
} }
@ -2276,7 +2276,7 @@ static int UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd
real_aspect = (float)w / h; real_aspect = (float)w / h;
/* Clear the scale because we're setting viewport in output coordinates */ /* Clear the scale because we're setting viewport in output coordinates */
SDL_RenderSetScale(renderer, 1.0f, 1.0f); SDL_SetRenderScale(renderer, 1.0f, 1.0f);
if (renderer->integer_scale) { if (renderer->integer_scale) {
if (want_aspect > real_aspect) { if (want_aspect > real_aspect) {
@ -2350,12 +2350,12 @@ static int UpdateLogicalSize(SDL_Renderer *renderer, SDL_bool flush_viewport_cmd
} }
/* Set the new scale */ /* Set the new scale */
SDL_RenderSetScale(renderer, scale, scale); SDL_SetRenderScale(renderer, scale, scale);
return 0; return 0;
} }
int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h) int SDL_SetRenderLogicalSize(SDL_Renderer *renderer, int w, int h)
{ {
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
@ -2363,8 +2363,8 @@ int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h)
/* Clear any previous logical resolution */ /* Clear any previous logical resolution */
renderer->logical_w = 0; renderer->logical_w = 0;
renderer->logical_h = 0; renderer->logical_h = 0;
SDL_RenderSetViewport(renderer, NULL); SDL_SetRenderViewport(renderer, NULL);
SDL_RenderSetScale(renderer, 1.0f, 1.0f); SDL_SetRenderScale(renderer, 1.0f, 1.0f);
return 0; return 0;
} }
@ -2374,7 +2374,7 @@ int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h)
return UpdateLogicalSize(renderer, SDL_TRUE); return UpdateLogicalSize(renderer, SDL_TRUE);
} }
void SDL_RenderGetLogicalSize(SDL_Renderer *renderer, int *w, int *h) void SDL_GetRenderLogicalSize(SDL_Renderer *renderer, int *w, int *h)
{ {
CHECK_RENDERER_MAGIC(renderer, ); CHECK_RENDERER_MAGIC(renderer, );
@ -2386,7 +2386,7 @@ void SDL_RenderGetLogicalSize(SDL_Renderer *renderer, int *w, int *h)
} }
} }
int SDL_RenderSetIntegerScale(SDL_Renderer *renderer, SDL_bool enable) int SDL_SetRenderIntegerScale(SDL_Renderer *renderer, SDL_bool enable)
{ {
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
@ -2397,14 +2397,14 @@ int SDL_RenderSetIntegerScale(SDL_Renderer *renderer, SDL_bool enable)
SDL_bool SDL_bool
SDLCALL SDLCALL
SDL_RenderGetIntegerScale(SDL_Renderer *renderer) SDL_GetRenderIntegerScale(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, SDL_FALSE); CHECK_RENDERER_MAGIC(renderer, SDL_FALSE);
return renderer->integer_scale; return renderer->integer_scale;
} }
int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect) int SDL_SetRenderViewport(SDL_Renderer *renderer, const SDL_Rect *rect)
{ {
int retval; int retval;
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
@ -2430,7 +2430,7 @@ int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect)
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
void SDL_RenderGetViewport(SDL_Renderer *renderer, SDL_Rect *rect) void SDL_GetRenderViewport(SDL_Renderer *renderer, SDL_Rect *rect)
{ {
CHECK_RENDERER_MAGIC(renderer, ); CHECK_RENDERER_MAGIC(renderer, );
@ -2450,7 +2450,7 @@ static void RenderGetViewportSize(SDL_Renderer *renderer, SDL_FRect *rect)
rect->h = (float)(renderer->viewport.h / renderer->scale.y); rect->h = (float)(renderer->viewport.h / renderer->scale.y);
} }
int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect) int SDL_SetRenderClipRect(SDL_Renderer *renderer, const SDL_Rect *rect)
{ {
int retval; int retval;
CHECK_RENDERER_MAGIC(renderer, -1) CHECK_RENDERER_MAGIC(renderer, -1)
@ -2470,7 +2470,7 @@ int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect)
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect) void SDL_GetRenderClipRect(SDL_Renderer *renderer, SDL_Rect *rect)
{ {
CHECK_RENDERER_MAGIC(renderer, ) CHECK_RENDERER_MAGIC(renderer, )
@ -2483,13 +2483,13 @@ void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect)
} }
SDL_bool SDL_bool
SDL_RenderIsClipEnabled(SDL_Renderer *renderer) SDL_IsRenderClipEnabled(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, SDL_FALSE) CHECK_RENDERER_MAGIC(renderer, SDL_FALSE)
return renderer->clipping_enabled; return renderer->clipping_enabled;
} }
int SDL_RenderSetScale(SDL_Renderer *renderer, float scaleX, float scaleY) int SDL_SetRenderScale(SDL_Renderer *renderer, float scaleX, float scaleY)
{ {
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
@ -2498,7 +2498,7 @@ int SDL_RenderSetScale(SDL_Renderer *renderer, float scaleX, float scaleY)
return 0; return 0;
} }
void SDL_RenderGetScale(SDL_Renderer *renderer, float *scaleX, float *scaleY) void SDL_GetRenderScale(SDL_Renderer *renderer, float *scaleX, float *scaleY)
{ {
CHECK_RENDERER_MAGIC(renderer, ); CHECK_RENDERER_MAGIC(renderer, );
@ -2606,20 +2606,20 @@ int SDL_RenderClear(SDL_Renderer *renderer)
/* !!! FIXME: delete all the duplicate code for the integer versions in 2.1, /* !!! FIXME: delete all the duplicate code for the integer versions in 2.1,
!!! FIXME: making the floating point versions the only available APIs. */ !!! FIXME: making the floating point versions the only available APIs. */
int SDL_RenderDrawPoint(SDL_Renderer *renderer, int x, int y) int SDL_RenderPoint(SDL_Renderer *renderer, int x, int y)
{ {
SDL_FPoint fpoint; SDL_FPoint fpoint;
fpoint.x = (float)x; fpoint.x = (float)x;
fpoint.y = (float)y; fpoint.y = (float)y;
return SDL_RenderDrawPointsF(renderer, &fpoint, 1); return SDL_RenderPointsF(renderer, &fpoint, 1);
} }
int SDL_RenderDrawPointF(SDL_Renderer *renderer, float x, float y) int SDL_RenderPointF(SDL_Renderer *renderer, float x, float y)
{ {
SDL_FPoint fpoint; SDL_FPoint fpoint;
fpoint.x = x; fpoint.x = x;
fpoint.y = y; fpoint.y = y;
return SDL_RenderDrawPointsF(renderer, &fpoint, 1); return SDL_RenderPointsF(renderer, &fpoint, 1);
} }
static int RenderDrawPointsWithRects(SDL_Renderer *renderer, static int RenderDrawPointsWithRects(SDL_Renderer *renderer,
@ -2653,7 +2653,7 @@ static int RenderDrawPointsWithRects(SDL_Renderer *renderer,
return retval; return retval;
} }
int SDL_RenderDrawPoints(SDL_Renderer *renderer, int SDL_RenderPoints(SDL_Renderer *renderer,
const SDL_Point *points, int count) const SDL_Point *points, int count)
{ {
SDL_FPoint *fpoints; SDL_FPoint *fpoints;
@ -2664,7 +2664,7 @@ int SDL_RenderDrawPoints(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (points == NULL) { if (points == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawPoints(): points"); return SDL_InvalidParamError("SDL_RenderPoints(): points");
} }
if (count < 1) { if (count < 1) {
return 0; return 0;
@ -2727,7 +2727,7 @@ static int RenderDrawPointsWithRectsF(SDL_Renderer *renderer,
return retval; return retval;
} }
int SDL_RenderDrawPointsF(SDL_Renderer *renderer, int SDL_RenderPointsF(SDL_Renderer *renderer,
const SDL_FPoint *points, int count) const SDL_FPoint *points, int count)
{ {
int retval; int retval;
@ -2735,7 +2735,7 @@ int SDL_RenderDrawPointsF(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (points == NULL) { if (points == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawPointsF(): points"); return SDL_InvalidParamError("SDL_RenderPointsF(): points");
} }
if (count < 1) { if (count < 1) {
return 0; return 0;
@ -2756,24 +2756,24 @@ int SDL_RenderDrawPointsF(SDL_Renderer *renderer,
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
int SDL_RenderDrawLine(SDL_Renderer *renderer, int x1, int y1, int x2, int y2) int SDL_RenderLine(SDL_Renderer *renderer, int x1, int y1, int x2, int y2)
{ {
SDL_FPoint points[2]; SDL_FPoint points[2];
points[0].x = (float)x1; points[0].x = (float)x1;
points[0].y = (float)y1; points[0].y = (float)y1;
points[1].x = (float)x2; points[1].x = (float)x2;
points[1].y = (float)y2; points[1].y = (float)y2;
return SDL_RenderDrawLinesF(renderer, points, 2); return SDL_RenderLinesF(renderer, points, 2);
} }
int SDL_RenderDrawLineF(SDL_Renderer *renderer, float x1, float y1, float x2, float y2) int SDL_RenderLineF(SDL_Renderer *renderer, float x1, float y1, float x2, float y2)
{ {
SDL_FPoint points[2]; SDL_FPoint points[2];
points[0].x = x1; points[0].x = x1;
points[0].y = y1; points[0].y = y1;
points[1].x = x2; points[1].x = x2;
points[1].y = y2; points[1].y = y2;
return SDL_RenderDrawLinesF(renderer, points, 2); return SDL_RenderLinesF(renderer, points, 2);
} }
static int RenderDrawLineBresenham(SDL_Renderer *renderer, int x1, int y1, int x2, int y2, SDL_bool draw_last) static int RenderDrawLineBresenham(SDL_Renderer *renderer, int x1, int y1, int x2, int y2, SDL_bool draw_last)
@ -2929,7 +2929,7 @@ static int RenderDrawLinesWithRectsF(SDL_Renderer *renderer,
return retval; return retval;
} }
int SDL_RenderDrawLines(SDL_Renderer *renderer, int SDL_RenderLines(SDL_Renderer *renderer,
const SDL_Point *points, int count) const SDL_Point *points, int count)
{ {
SDL_FPoint *fpoints; SDL_FPoint *fpoints;
@ -2940,7 +2940,7 @@ int SDL_RenderDrawLines(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (points == NULL) { if (points == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawLines(): points"); return SDL_InvalidParamError("SDL_RenderLines(): points");
} }
if (count < 2) { if (count < 2) {
return 0; return 0;
@ -2963,14 +2963,14 @@ int SDL_RenderDrawLines(SDL_Renderer *renderer,
fpoints[i].y = (float)points[i].y; fpoints[i].y = (float)points[i].y;
} }
retval = SDL_RenderDrawLinesF(renderer, fpoints, count); retval = SDL_RenderLinesF(renderer, fpoints, count);
SDL_small_free(fpoints, isstack); SDL_small_free(fpoints, isstack);
return retval; return retval;
} }
int SDL_RenderDrawLinesF(SDL_Renderer *renderer, int SDL_RenderLinesF(SDL_Renderer *renderer,
const SDL_FPoint *points, int count) const SDL_FPoint *points, int count)
{ {
int retval = 0; int retval = 0;
@ -2978,7 +2978,7 @@ int SDL_RenderDrawLinesF(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (points == NULL) { if (points == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawLinesF(): points"); return SDL_InvalidParamError("SDL_RenderLinesF(): points");
} }
if (count < 2) { if (count < 2) {
return 0; return 0;
@ -3122,7 +3122,7 @@ int SDL_RenderDrawLinesF(SDL_Renderer *renderer,
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect) int SDL_RenderRect(SDL_Renderer *renderer, const SDL_Rect *rect)
{ {
SDL_FRect frect; SDL_FRect frect;
SDL_FRect *prect = NULL; SDL_FRect *prect = NULL;
@ -3135,10 +3135,10 @@ int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect)
prect = &frect; prect = &frect;
} }
return SDL_RenderDrawRectF(renderer, prect); return SDL_RenderRectF(renderer, prect);
} }
int SDL_RenderDrawRectF(SDL_Renderer *renderer, const SDL_FRect *rect) int SDL_RenderRectF(SDL_Renderer *renderer, const SDL_FRect *rect)
{ {
SDL_FRect frect; SDL_FRect frect;
SDL_FPoint points[5]; SDL_FPoint points[5];
@ -3161,10 +3161,10 @@ int SDL_RenderDrawRectF(SDL_Renderer *renderer, const SDL_FRect *rect)
points[3].y = rect->y + rect->h - 1; points[3].y = rect->y + rect->h - 1;
points[4].x = rect->x; points[4].x = rect->x;
points[4].y = rect->y; points[4].y = rect->y;
return SDL_RenderDrawLinesF(renderer, points, 5); return SDL_RenderLinesF(renderer, points, 5);
} }
int SDL_RenderDrawRects(SDL_Renderer *renderer, int SDL_RenderRects(SDL_Renderer *renderer,
const SDL_Rect *rects, int count) const SDL_Rect *rects, int count)
{ {
int i; int i;
@ -3172,7 +3172,7 @@ int SDL_RenderDrawRects(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (rects == NULL) { if (rects == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawRects(): rects"); return SDL_InvalidParamError("SDL_RenderRects(): rects");
} }
if (count < 1) { if (count < 1) {
return 0; return 0;
@ -3186,14 +3186,14 @@ int SDL_RenderDrawRects(SDL_Renderer *renderer,
#endif #endif
for (i = 0; i < count; ++i) { for (i = 0; i < count; ++i) {
if (SDL_RenderDrawRect(renderer, &rects[i]) < 0) { if (SDL_RenderRect(renderer, &rects[i]) < 0) {
return -1; return -1;
} }
} }
return 0; return 0;
} }
int SDL_RenderDrawRectsF(SDL_Renderer *renderer, int SDL_RenderRectsF(SDL_Renderer *renderer,
const SDL_FRect *rects, int count) const SDL_FRect *rects, int count)
{ {
int i; int i;
@ -3201,7 +3201,7 @@ int SDL_RenderDrawRectsF(SDL_Renderer *renderer,
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
if (rects == NULL) { if (rects == NULL) {
return SDL_InvalidParamError("SDL_RenderDrawRectsF(): rects"); return SDL_InvalidParamError("SDL_RenderRectsF(): rects");
} }
if (count < 1) { if (count < 1) {
return 0; return 0;
@ -3215,7 +3215,7 @@ int SDL_RenderDrawRectsF(SDL_Renderer *renderer,
#endif #endif
for (i = 0; i < count; ++i) { for (i = 0; i < count; ++i) {
if (SDL_RenderDrawRectF(renderer, &rects[i]) < 0) { if (SDL_RenderRectF(renderer, &rects[i]) < 0) {
return -1; return -1;
} }
} }
@ -3338,7 +3338,7 @@ int SDL_RenderFillRectsF(SDL_Renderer *renderer,
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, int SDL_RenderTexture(SDL_Renderer *renderer, SDL_Texture *texture,
const SDL_Rect *srcrect, const SDL_Rect *dstrect) const SDL_Rect *srcrect, const SDL_Rect *dstrect)
{ {
SDL_FRect dstfrect; SDL_FRect dstfrect;
@ -3350,10 +3350,10 @@ int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture,
dstfrect.h = (float)dstrect->h; dstfrect.h = (float)dstrect->h;
pdstfrect = &dstfrect; pdstfrect = &dstfrect;
} }
return SDL_RenderCopyF(renderer, texture, srcrect, pdstfrect); return SDL_RenderTextureF(renderer, texture, srcrect, pdstfrect);
} }
int SDL_RenderCopyF(SDL_Renderer *renderer, SDL_Texture *texture, int SDL_RenderTextureF(SDL_Renderer *renderer, SDL_Texture *texture,
const SDL_Rect *srcrect, const SDL_FRect *dstrect) const SDL_Rect *srcrect, const SDL_FRect *dstrect)
{ {
SDL_Rect real_srcrect; SDL_Rect real_srcrect;
@ -3458,7 +3458,7 @@ int SDL_RenderCopyF(SDL_Renderer *renderer, SDL_Texture *texture,
return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer);
} }
int SDL_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture, int SDL_RenderTextureRotated(SDL_Renderer *renderer, SDL_Texture *texture,
const SDL_Rect *srcrect, const SDL_Rect *dstrect, const SDL_Rect *srcrect, const SDL_Rect *dstrect,
const double angle, const SDL_Point *center, const SDL_RendererFlip flip) const double angle, const SDL_Point *center, const SDL_RendererFlip flip)
{ {
@ -3481,10 +3481,10 @@ int SDL_RenderCopyEx(SDL_Renderer *renderer, SDL_Texture *texture,
pfcenter = &fcenter; pfcenter = &fcenter;
} }
return SDL_RenderCopyExF(renderer, texture, srcrect, pdstfrect, angle, pfcenter, flip); return SDL_RenderTextureRotatedF(renderer, texture, srcrect, pdstfrect, angle, pfcenter, flip);
} }
int SDL_RenderCopyExF(SDL_Renderer *renderer, SDL_Texture *texture, int SDL_RenderTextureRotatedF(SDL_Renderer *renderer, SDL_Texture *texture,
const SDL_Rect *srcrect, const SDL_FRect *dstrect, const SDL_Rect *srcrect, const SDL_FRect *dstrect,
const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip) const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip)
{ {
@ -3495,7 +3495,7 @@ int SDL_RenderCopyExF(SDL_Renderer *renderer, SDL_Texture *texture,
int use_rendergeometry; int use_rendergeometry;
if (flip == SDL_FLIP_NONE && (int)(angle / 360) == angle / 360) { /* fast path when we don't need rotation or flipping */ if (flip == SDL_FLIP_NONE && (int)(angle / 360) == angle / 360) { /* fast path when we don't need rotation or flipping */
return SDL_RenderCopyF(renderer, texture, srcrect, dstrect); return SDL_RenderTextureF(renderer, texture, srcrect, dstrect);
} }
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);
@ -3941,7 +3941,7 @@ static int SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
SDL_SetTextureAlphaMod(texture, col0_.a); SDL_SetTextureAlphaMod(texture, col0_.a);
SDL_SetTextureColorMod(texture, col0_.r, col0_.g, col0_.b); SDL_SetTextureColorMod(texture, col0_.r, col0_.g, col0_.b);
if (s.w > 0 && s.h > 0) { if (s.w > 0 && s.h > 0) {
SDL_RenderCopyF(renderer, texture, &s, &d); SDL_RenderTextureF(renderer, texture, &s, &d);
} else { } else {
int flags = 0; int flags = 0;
if (s.w < 0) { if (s.w < 0) {
@ -3954,7 +3954,7 @@ static int SDLCALL SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
s.h *= -1; s.h *= -1;
s.y -= s.h; s.y -= s.h;
} }
SDL_RenderCopyExF(renderer, texture, &s, &d, 0, NULL, flags); SDL_RenderTextureRotatedF(renderer, texture, &s, &d, 0, NULL, flags);
} }
#if DEBUG_SW_RENDER_GEOMETRY #if DEBUG_SW_RENDER_GEOMETRY
@ -4350,7 +4350,7 @@ int SDL_GL_UnbindTexture(SDL_Texture *texture)
} }
void * void *
SDL_RenderGetMetalLayer(SDL_Renderer *renderer) SDL_GetRenderMetalLayer(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, NULL); CHECK_RENDERER_MAGIC(renderer, NULL);
@ -4362,7 +4362,7 @@ SDL_RenderGetMetalLayer(SDL_Renderer *renderer)
} }
void * void *
SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer) SDL_GetRenderMetalCommandEncoder(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, NULL); CHECK_RENDERER_MAGIC(renderer, NULL);
@ -4466,7 +4466,7 @@ SDL_GetBlendModeAlphaOperation(SDL_BlendMode blendMode)
return (SDL_BlendOperation)(((Uint32)blendMode >> 16) & 0xF); return (SDL_BlendOperation)(((Uint32)blendMode >> 16) & 0xF);
} }
int SDL_RenderSetVSync(SDL_Renderer *renderer, int vsync) int SDL_SetRenderVSync(SDL_Renderer *renderer, int vsync)
{ {
CHECK_RENDERER_MAGIC(renderer, -1); CHECK_RENDERER_MAGIC(renderer, -1);

View File

@ -1316,9 +1316,9 @@ SDLTest_CommonInit(SDLTest_CommonState *state)
return SDL_FALSE; return SDL_FALSE;
} }
if (state->logical_w && state->logical_h) { if (state->logical_w && state->logical_h) {
SDL_RenderSetLogicalSize(state->renderers[i], state->logical_w, state->logical_h); SDL_SetRenderLogicalSize(state->renderers[i], state->logical_w, state->logical_h);
} else if (state->scale != 0.) { } else if (state->scale != 0.) {
SDL_RenderSetScale(state->renderers[i], state->scale, state->scale); SDL_SetRenderScale(state->renderers[i], state->scale, state->scale);
} }
if (state->verbose & VERBOSE_RENDER) { if (state->verbose & VERBOSE_RENDER) {
SDL_RendererInfo info; SDL_RendererInfo info;
@ -1710,7 +1710,7 @@ static void SDLTest_ScreenShot(SDL_Renderer *renderer)
return; return;
} }
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
surface = SDL_CreateSurface(viewport.w, viewport.h, SDL_PIXELFORMAT_BGR24); surface = SDL_CreateSurface(viewport.w, viewport.h, SDL_PIXELFORMAT_BGR24);
@ -1920,15 +1920,15 @@ void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done
if (state->renderers[i]) { if (state->renderers[i]) {
SDL_Rect clip; SDL_Rect clip;
SDL_GetWindowSize(state->windows[i], &w, &h); SDL_GetWindowSize(state->windows[i], &w, &h);
SDL_RenderGetClipRect(state->renderers[i], &clip); SDL_GetRenderClipRect(state->renderers[i], &clip);
if (SDL_RectEmpty(&clip)) { if (SDL_RectEmpty(&clip)) {
clip.x = w / 4; clip.x = w / 4;
clip.y = h / 4; clip.y = h / 4;
clip.w = w / 2; clip.w = w / 2;
clip.h = h / 2; clip.h = h / 2;
SDL_RenderSetClipRect(state->renderers[i], &clip); SDL_SetRenderClipRect(state->renderers[i], &clip);
} else { } else {
SDL_RenderSetClipRect(state->renderers[i], NULL); SDL_SetRenderClipRect(state->renderers[i], NULL);
} }
} }
} }
@ -2218,20 +2218,20 @@ void SDLTest_CommonDrawWindowInfo(SDL_Renderer *renderer, SDL_Window *window, in
textY += lineHeight; textY += lineHeight;
} }
SDL_RenderGetViewport(renderer, &rect); SDL_GetRenderViewport(renderer, &rect);
(void)SDL_snprintf(text, sizeof text, "SDL_RenderGetViewport: %d,%d, %dx%d", (void)SDL_snprintf(text, sizeof text, "SDL_GetRenderViewport: %d,%d, %dx%d",
rect.x, rect.y, rect.w, rect.h); rect.x, rect.y, rect.w, rect.h);
SDLTest_DrawString(renderer, 0, textY, text); SDLTest_DrawString(renderer, 0, textY, text);
textY += lineHeight; textY += lineHeight;
SDL_RenderGetScale(renderer, &scaleX, &scaleY); SDL_GetRenderScale(renderer, &scaleX, &scaleY);
(void)SDL_snprintf(text, sizeof text, "SDL_RenderGetScale: %f,%f", (void)SDL_snprintf(text, sizeof text, "SDL_GetRenderScale: %f,%f",
scaleX, scaleY); scaleX, scaleY);
SDLTest_DrawString(renderer, 0, textY, text); SDLTest_DrawString(renderer, 0, textY, text);
textY += lineHeight; textY += lineHeight;
SDL_RenderGetLogicalSize(renderer, &w, &h); SDL_GetRenderLogicalSize(renderer, &w, &h);
(void)SDL_snprintf(text, sizeof text, "SDL_RenderGetLogicalSize: %dx%d", w, h); (void)SDL_snprintf(text, sizeof text, "SDL_GetRenderLogicalSize: %dx%d", w, h);
SDLTest_DrawString(renderer, 0, textY, text); SDLTest_DrawString(renderer, 0, textY, text);
textY += lineHeight; textY += lineHeight;

View File

@ -3234,7 +3234,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, Uint32 c)
/* /*
* Draw texture onto destination * Draw texture onto destination
*/ */
result |= SDL_RenderCopy(renderer, cache->charTextureCache[ci], &srect, &drect); result |= SDL_RenderTexture(renderer, cache->charTextureCache[ci], &srect, &drect);
return result; return result;
} }

View File

@ -303,7 +303,7 @@ static int SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window *window, U
*pitch = data->pitch; *pitch = data->pitch;
/* Make sure we're not double-scaling the viewport */ /* Make sure we're not double-scaling the viewport */
SDL_RenderSetViewport(data->renderer, NULL); SDL_SetRenderViewport(data->renderer, NULL);
return 0; return 0;
} }
@ -331,7 +331,7 @@ static int SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window *window,
return -1; return -1;
} }
if (SDL_RenderCopy(data->renderer, data->texture, NULL, NULL) < 0) { if (SDL_RenderTexture(data->renderer, data->texture, NULL, NULL) < 0) {
return -1; return -1;
} }

View File

@ -365,7 +365,7 @@ WatchJoystick(SDL_Joystick *joystick)
SDL_RaiseWindow(window); SDL_RaiseWindow(window);
/* scale for platforms that don't give you the window size you asked for. */ /* scale for platforms that don't give you the window size you asked for. */
SDL_RenderSetLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT); SDL_SetRenderLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT);
/* Print info about the joystick we are watching */ /* Print info about the joystick we are watching */
name = SDL_GetJoystickName(joystick); name = SDL_GetJoystickName(joystick);
@ -424,13 +424,13 @@ WatchJoystick(SDL_Joystick *joystick)
SDL_RenderClear(screen); SDL_RenderClear(screen);
if (s_arrBindingOrder[s_iCurrentBinding] >= SDL_CONTROLLER_BUTTON_PADDLE1 && if (s_arrBindingOrder[s_iCurrentBinding] >= SDL_CONTROLLER_BUTTON_PADDLE1 &&
s_arrBindingOrder[s_iCurrentBinding] <= SDL_CONTROLLER_BUTTON_PADDLE4) { s_arrBindingOrder[s_iCurrentBinding] <= SDL_CONTROLLER_BUTTON_PADDLE4) {
SDL_RenderCopy(screen, background_back, NULL, NULL); SDL_RenderTexture(screen, background_back, NULL, NULL);
} else { } else {
SDL_RenderCopy(screen, background_front, NULL, NULL); SDL_RenderTexture(screen, background_front, NULL, NULL);
} }
SDL_SetTextureAlphaMod(marker, alpha); SDL_SetTextureAlphaMod(marker, alpha);
SDL_SetTextureColorMod(marker, 10, 255, 21); SDL_SetTextureColorMod(marker, 10, 255, 21);
SDL_RenderCopyEx(screen, marker, NULL, &dst, s_arrBindingDisplay[iElement].angle, NULL, SDL_FLIP_NONE); SDL_RenderTextureRotated(screen, marker, NULL, &dst, s_arrBindingDisplay[iElement].angle, NULL, SDL_FLIP_NONE);
SDL_RenderPresent(screen); SDL_RenderPresent(screen);
while (SDL_PollEvent(&event) > 0) { while (SDL_PollEvent(&event) > 0) {

View File

@ -92,7 +92,7 @@ int render_testGetNumRenderDrivers(void *arg)
* \sa * \sa
* http://wiki.libsdl.org/SDL_SetRenderDrawColor * http://wiki.libsdl.org/SDL_SetRenderDrawColor
* http://wiki.libsdl.org/SDL_RenderFillRect * http://wiki.libsdl.org/SDL_RenderFillRect
* http://wiki.libsdl.org/SDL_RenderDrawLine * http://wiki.libsdl.org/SDL_RenderLine
* *
*/ */
int render_testPrimitives(void *arg) int render_testPrimitives(void *arg)
@ -146,42 +146,42 @@ int render_testPrimitives(void *arg)
checkFailCount1++; checkFailCount1++;
} }
ret = SDL_RenderDrawPoint(renderer, x, y); ret = SDL_RenderPoint(renderer, x, y);
if (ret != 0) { if (ret != 0) {
checkFailCount2++; checkFailCount2++;
} }
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderPoint, expected: 0, got: %i", checkFailCount2);
/* Draw some lines. */ /* Draw some lines. */
ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE); ret = SDL_SetRenderDrawColor(renderer, 0, 255, 0, SDL_ALPHA_OPAQUE);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor"); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor");
ret = SDL_RenderDrawLine(renderer, 0, 30, TESTRENDER_SCREEN_W, 30); ret = SDL_RenderLine(renderer, 0, 30, TESTRENDER_SCREEN_W, 30);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE); ret = SDL_SetRenderDrawColor(renderer, 55, 55, 5, SDL_ALPHA_OPAQUE);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret);
ret = SDL_RenderDrawLine(renderer, 40, 30, 40, 60); ret = SDL_RenderLine(renderer, 40, 30, 40, 60);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE); ret = SDL_SetRenderDrawColor(renderer, 5, 105, 105, SDL_ALPHA_OPAQUE);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_SetRenderDrawColor, expected: 0, got: %i", ret);
ret = SDL_RenderDrawLine(renderer, 0, 0, 29, 29); ret = SDL_RenderLine(renderer, 0, 0, 29, 29);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
ret = SDL_RenderDrawLine(renderer, 29, 30, 0, 59); ret = SDL_RenderLine(renderer, 29, 30, 0, 59);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
ret = SDL_RenderDrawLine(renderer, 79, 0, 50, 29); ret = SDL_RenderLine(renderer, 79, 0, 50, 29);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
ret = SDL_RenderDrawLine(renderer, 79, 59, 50, 30); ret = SDL_RenderLine(renderer, 79, 59, 50, 30);
SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderDrawLine, expected: 0, got: %i", ret); SDLTest_AssertCheck(ret == 0, "Validate result from SDL_RenderLine, expected: 0, got: %i", ret);
/* See if it's the same. */ /* See if it's the same. */
referenceSurface = SDLTest_ImagePrimitives(); referenceSurface = SDLTest_ImagePrimitives();
@ -287,14 +287,14 @@ int render_testPrimitivesBlend(void *arg)
checkFailCount2++; checkFailCount2++;
} }
ret = SDL_RenderDrawLine(renderer, 0, 0, i, 59); ret = SDL_RenderLine(renderer, 0, 0, i, 59);
if (ret != 0) { if (ret != 0) {
checkFailCount3++; checkFailCount3++;
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2);
SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawLine, expected: 0, got: %i", checkFailCount3); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderLine, expected: 0, got: %i", checkFailCount3);
checkFailCount1 = 0; checkFailCount1 = 0;
checkFailCount2 = 0; checkFailCount2 = 0;
@ -311,14 +311,14 @@ int render_testPrimitivesBlend(void *arg)
checkFailCount2++; checkFailCount2++;
} }
ret = SDL_RenderDrawLine(renderer, 0, 0, 79, i); ret = SDL_RenderLine(renderer, 0, 0, 79, i);
if (ret != 0) { if (ret != 0) {
checkFailCount3++; checkFailCount3++;
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2);
SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawLine, expected: 0, got: %i", checkFailCount3); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderLine, expected: 0, got: %i", checkFailCount3);
/* Draw points. */ /* Draw points. */
checkFailCount1 = 0; checkFailCount1 = 0;
@ -337,7 +337,7 @@ int render_testPrimitivesBlend(void *arg)
checkFailCount2++; checkFailCount2++;
} }
ret = SDL_RenderDrawPoint(renderer, i, j); ret = SDL_RenderPoint(renderer, i, j);
if (ret != 0) { if (ret != 0) {
checkFailCount3++; checkFailCount3++;
} }
@ -345,7 +345,7 @@ int render_testPrimitivesBlend(void *arg)
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetRenderDrawColor, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetRenderDrawBlendMode, expected: 0, got: %i", checkFailCount2);
SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderDrawPoint, expected: 0, got: %i", checkFailCount3); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_RenderPoint, expected: 0, got: %i", checkFailCount3);
/* See if it's the same. */ /* See if it's the same. */
referenceSurface = SDLTest_ImagePrimitivesBlend(); referenceSurface = SDLTest_ImagePrimitivesBlend();
@ -365,7 +365,7 @@ int render_testPrimitivesBlend(void *arg)
* @brief Tests some blitting routines. * @brief Tests some blitting routines.
* *
* \sa * \sa
* http://wiki.libsdl.org/SDL_RenderCopy * http://wiki.libsdl.org/SDL_RenderTexture
* http://wiki.libsdl.org/SDL_DestroyTexture * http://wiki.libsdl.org/SDL_DestroyTexture
*/ */
int render_testBlit(void *arg) int render_testBlit(void *arg)
@ -407,13 +407,13 @@ int render_testBlit(void *arg)
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
ret = SDL_RenderCopy(renderer, tface, NULL, &rect); ret = SDL_RenderTexture(renderer, tface, NULL, &rect);
if (ret != 0) { if (ret != 0) {
checkFailCount1++; checkFailCount1++;
} }
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_RenderTexture, expected: 0, got: %i", checkFailCount1);
/* See if it's the same */ /* See if it's the same */
referenceSurface = SDLTest_ImageBlit(); referenceSurface = SDLTest_ImageBlit();
@ -435,7 +435,7 @@ int render_testBlit(void *arg)
* *
* \sa * \sa
* http://wiki.libsdl.org/SDL_SetTextureColorMod * http://wiki.libsdl.org/SDL_SetTextureColorMod
* http://wiki.libsdl.org/SDL_RenderCopy * http://wiki.libsdl.org/SDL_RenderTexture
* http://wiki.libsdl.org/SDL_DestroyTexture * http://wiki.libsdl.org/SDL_DestroyTexture
*/ */
int render_testBlitColor(void *arg) int render_testBlitColor(void *arg)
@ -482,14 +482,14 @@ int render_testBlitColor(void *arg)
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
ret = SDL_RenderCopy(renderer, tface, NULL, &rect); ret = SDL_RenderTexture(renderer, tface, NULL, &rect);
if (ret != 0) { if (ret != 0) {
checkFailCount2++; checkFailCount2++;
} }
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderTexture, expected: 0, got: %i", checkFailCount2);
/* See if it's the same. */ /* See if it's the same. */
referenceSurface = SDLTest_ImageBlitColor(); referenceSurface = SDLTest_ImageBlitColor();
@ -511,7 +511,7 @@ int render_testBlitColor(void *arg)
* *
* \sa * \sa
* http://wiki.libsdl.org/SDL_SetTextureAlphaMod * http://wiki.libsdl.org/SDL_SetTextureAlphaMod
* http://wiki.libsdl.org/SDL_RenderCopy * http://wiki.libsdl.org/SDL_RenderTexture
* http://wiki.libsdl.org/SDL_DestroyTexture * http://wiki.libsdl.org/SDL_DestroyTexture
*/ */
int render_testBlitAlpha(void *arg) int render_testBlitAlpha(void *arg)
@ -561,14 +561,14 @@ int render_testBlitAlpha(void *arg)
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
ret = SDL_RenderCopy(renderer, tface, NULL, &rect); ret = SDL_RenderTexture(renderer, tface, NULL, &rect);
if (ret != 0) { if (ret != 0) {
checkFailCount2++; checkFailCount2++;
} }
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderTexture, expected: 0, got: %i", checkFailCount2);
/* See if it's the same. */ /* See if it's the same. */
referenceSurface = SDLTest_ImageBlitAlpha(); referenceSurface = SDLTest_ImageBlitAlpha();
@ -592,7 +592,7 @@ int render_testBlitAlpha(void *arg)
* *
* \sa * \sa
* http://wiki.libsdl.org/SDL_SetTextureBlendMode * http://wiki.libsdl.org/SDL_SetTextureBlendMode
* http://wiki.libsdl.org/SDL_RenderCopy * http://wiki.libsdl.org/SDL_RenderTexture
*/ */
static void static void
_testBlitBlendMode(SDL_Texture *tface, int mode) _testBlitBlendMode(SDL_Texture *tface, int mode)
@ -630,14 +630,14 @@ _testBlitBlendMode(SDL_Texture *tface, int mode)
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
ret = SDL_RenderCopy(renderer, tface, NULL, &rect); ret = SDL_RenderTexture(renderer, tface, NULL, &rect);
if (ret != 0) { if (ret != 0) {
checkFailCount2++; checkFailCount2++;
} }
} }
} }
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_RenderTexture, expected: 0, got: %i", checkFailCount2);
} }
/** /**
@ -773,7 +773,7 @@ int render_testBlitBlend(void *arg)
/* Blitting. */ /* Blitting. */
rect.x = i; rect.x = i;
rect.y = j; rect.y = j;
ret = SDL_RenderCopy(renderer, tface, NULL, &rect); ret = SDL_RenderTexture(renderer, tface, NULL, &rect);
if (ret != 0) { if (ret != 0) {
checkFailCount4++; checkFailCount4++;
} }
@ -782,7 +782,7 @@ int render_testBlitBlend(void *arg)
SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i", checkFailCount1); SDLTest_AssertCheck(checkFailCount1 == 0, "Validate results from calls to SDL_SetTextureColorMod, expected: 0, got: %i", checkFailCount1);
SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount2); SDLTest_AssertCheck(checkFailCount2 == 0, "Validate results from calls to SDL_SetTextureAlphaMod, expected: 0, got: %i", checkFailCount2);
SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i", checkFailCount3); SDLTest_AssertCheck(checkFailCount3 == 0, "Validate results from calls to SDL_SetTextureBlendMode, expected: 0, got: %i", checkFailCount3);
SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_RenderCopy, expected: 0, got: %i", checkFailCount4); SDLTest_AssertCheck(checkFailCount4 == 0, "Validate results from calls to SDL_RenderTexture, expected: 0, got: %i", checkFailCount4);
/* Clean up. */ /* Clean up. */
SDL_DestroyTexture(tface); SDL_DestroyTexture(tface);

View File

@ -45,7 +45,7 @@ void DrawPoints(SDL_Renderer *renderer)
SDL_Rect viewport; SDL_Rect viewport;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
for (i = 0; i < num_objects * 4; ++i) { for (i = 0; i < num_objects * 4; ++i) {
/* Cycle the color and alpha, if desired */ /* Cycle the color and alpha, if desired */
@ -76,7 +76,7 @@ void DrawPoints(SDL_Renderer *renderer)
x = rand() % viewport.w; x = rand() % viewport.w;
y = rand() % viewport.h; y = rand() % viewport.h;
SDL_RenderDrawPoint(renderer, x, y); SDL_RenderPoint(renderer, x, y);
} }
} }
@ -87,7 +87,7 @@ void DrawLines(SDL_Renderer *renderer)
SDL_Rect viewport; SDL_Rect viewport;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
for (i = 0; i < num_objects; ++i) { for (i = 0; i < num_objects; ++i) {
/* Cycle the color and alpha, if desired */ /* Cycle the color and alpha, if desired */
@ -117,16 +117,16 @@ void DrawLines(SDL_Renderer *renderer)
(Uint8)current_color, (Uint8)current_alpha); (Uint8)current_color, (Uint8)current_alpha);
if (i == 0) { if (i == 0) {
SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); SDL_RenderLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);
SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0); SDL_RenderLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0);
SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2); SDL_RenderLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2);
SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1); SDL_RenderLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1);
} else { } else {
x1 = (rand() % (viewport.w * 2)) - viewport.w; x1 = (rand() % (viewport.w * 2)) - viewport.w;
x2 = (rand() % (viewport.w * 2)) - viewport.w; x2 = (rand() % (viewport.w * 2)) - viewport.w;
y1 = (rand() % (viewport.h * 2)) - viewport.h; y1 = (rand() % (viewport.h * 2)) - viewport.h;
y2 = (rand() % (viewport.h * 2)) - viewport.h; y2 = (rand() % (viewport.h * 2)) - viewport.h;
SDL_RenderDrawLine(renderer, x1, y1, x2, y2); SDL_RenderLine(renderer, x1, y1, x2, y2);
} }
} }
} }
@ -138,7 +138,7 @@ void DrawRects(SDL_Renderer *renderer)
SDL_Rect viewport; SDL_Rect viewport;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
for (i = 0; i < num_objects / 4; ++i) { for (i = 0; i < num_objects / 4; ++i) {
/* Cycle the color and alpha, if desired */ /* Cycle the color and alpha, if desired */

View File

@ -32,7 +32,7 @@ void DrawChessBoard()
SDL_Rect rect, darea; SDL_Rect rect, darea;
/* Get the Size of drawing surface */ /* Get the Size of drawing surface */
SDL_RenderGetViewport(renderer, &darea); SDL_GetRenderViewport(renderer, &darea);
for (; row < 8; row++) { for (; row < 8; row++) {
column = row % 2; column = row % 2;

View File

@ -682,7 +682,7 @@ void loop(void *arg)
/* blank screen, set up for drawing this frame. */ /* blank screen, set up for drawing this frame. */
SDL_SetRenderDrawColor(screen, 0xFF, 0xFF, 0xFF, SDL_ALPHA_OPAQUE); SDL_SetRenderDrawColor(screen, 0xFF, 0xFF, 0xFF, SDL_ALPHA_OPAQUE);
SDL_RenderClear(screen); SDL_RenderClear(screen);
SDL_RenderCopy(screen, showing_front ? background_front : background_back, NULL, NULL); SDL_RenderTexture(screen, showing_front ? background_front : background_back, NULL, NULL);
if (gamecontroller) { if (gamecontroller) {
/* Update visual controller state */ /* Update visual controller state */
@ -695,7 +695,7 @@ void loop(void *arg)
dst.y = button_positions[i].y; dst.y = button_positions[i].y;
dst.w = BUTTON_SIZE; dst.w = BUTTON_SIZE;
dst.h = BUTTON_SIZE; dst.h = BUTTON_SIZE;
SDL_RenderCopyEx(screen, button_texture, NULL, &dst, 0, NULL, SDL_FLIP_NONE); SDL_RenderTextureRotated(screen, button_texture, NULL, &dst, 0, NULL, SDL_FLIP_NONE);
} }
} }
} }
@ -711,7 +711,7 @@ void loop(void *arg)
dst.y = axis_positions[i].y; dst.y = axis_positions[i].y;
dst.w = AXIS_SIZE; dst.w = AXIS_SIZE;
dst.h = AXIS_SIZE; dst.h = AXIS_SIZE;
SDL_RenderCopyEx(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE); SDL_RenderTextureRotated(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
} else if (value > deadzone) { } else if (value > deadzone) {
const double angle = axis_positions[i].angle + 180.0; const double angle = axis_positions[i].angle + 180.0;
SDL_Rect dst; SDL_Rect dst;
@ -719,7 +719,7 @@ void loop(void *arg)
dst.y = axis_positions[i].y; dst.y = axis_positions[i].y;
dst.w = AXIS_SIZE; dst.w = AXIS_SIZE;
dst.h = AXIS_SIZE; dst.h = AXIS_SIZE;
SDL_RenderCopyEx(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE); SDL_RenderTextureRotated(screen, axis_texture, NULL, &dst, angle, NULL, SDL_FLIP_NONE);
} }
} }
} }
@ -905,7 +905,7 @@ int main(int argc, char *argv[])
SDL_RenderPresent(screen); SDL_RenderPresent(screen);
/* scale for platforms that don't give you the window size you asked for. */ /* scale for platforms that don't give you the window size you asked for. */
SDL_RenderSetLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT); SDL_SetRenderLogicalSize(screen, SCREEN_WIDTH, SCREEN_HEIGHT);
background_front = LoadTexture(screen, "controllermap.bmp", SDL_FALSE, NULL, NULL); background_front = LoadTexture(screen, "controllermap.bmp", SDL_FALSE, NULL, NULL);
background_back = LoadTexture(screen, "controllermap_back.bmp", SDL_FALSE, NULL, NULL); background_back = LoadTexture(screen, "controllermap_back.bmp", SDL_FALSE, NULL, NULL);
@ -921,7 +921,7 @@ int main(int argc, char *argv[])
SDL_SetTextureColorMod(axis_texture, 10, 255, 21); SDL_SetTextureColorMod(axis_texture, 10, 255, 21);
/* !!! FIXME: */ /* !!! FIXME: */
/*SDL_RenderSetLogicalSize(screen, background->w, background->h);*/ /*SDL_SetRenderLogicalSize(screen, background->w, background->h);*/
for (i = 1; i < argc; ++i) { for (i = 1; i < argc; ++i) {
if (SDL_strcmp(argv[i], "--virtual") == 0) { if (SDL_strcmp(argv[i], "--virtual") == 0) {

View File

@ -110,7 +110,7 @@ void loop()
int cx, cy; int cx, cy;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
SDL_zeroa(verts); SDL_zeroa(verts);
cx = viewport.x + viewport.w / 2; cx = viewport.x + viewport.w / 2;
cy = viewport.y + viewport.h / 2; cy = viewport.y + viewport.h / 2;

View File

@ -345,7 +345,7 @@ static Sint32 unifont_draw_glyph(Uint32 codepoint, int rendererID, SDL_Rect *dst
const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE; const Uint32 cInTex = codepoint % UNIFONT_GLYPHS_IN_TEXTURE;
srcrect.x = cInTex % UNIFONT_GLYPHS_IN_ROW * 16; srcrect.x = cInTex % UNIFONT_GLYPHS_IN_ROW * 16;
srcrect.y = cInTex / UNIFONT_GLYPHS_IN_ROW * 16; srcrect.y = cInTex / UNIFONT_GLYPHS_IN_ROW * 16;
SDL_RenderCopy(state->renderers[rendererID], texture, &srcrect, dstrect); SDL_RenderTexture(state->renderers[rendererID], texture, &srcrect, dstrect);
} }
return unifontGlyph[codepoint].width; return unifontGlyph[codepoint].width;
} }
@ -498,7 +498,7 @@ static void _Redraw(int rendererID)
texture = SDL_CreateTextureFromSurface(renderer, textSur); texture = SDL_CreateTextureFromSurface(renderer, textSur);
SDL_FreeSurface(textSur); SDL_FreeSurface(textSur);
SDL_RenderCopy(renderer, texture, NULL, &drawnTextRect); SDL_RenderTexture(renderer, texture, NULL, &drawnTextRect);
SDL_DestroyTexture(texture); SDL_DestroyTexture(texture);
#else #else
char *utext = text; char *utext = text;
@ -569,7 +569,7 @@ static void _Redraw(int rendererID)
texture = SDL_CreateTextureFromSurface(renderer, textSur); texture = SDL_CreateTextureFromSurface(renderer, textSur);
SDL_FreeSurface(textSur); SDL_FreeSurface(textSur);
SDL_RenderCopy(renderer, texture, NULL, &drawnTextRect); SDL_RenderTexture(renderer, texture, NULL, &drawnTextRect);
SDL_DestroyTexture(texture); SDL_DestroyTexture(texture);
#else #else
int i = 0; int i = 0;

View File

@ -49,7 +49,7 @@ void DrawPoints(SDL_Renderer *renderer)
SDL_Rect viewport; SDL_Rect viewport;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
for (i = 0; i < num_objects * 4; ++i) { for (i = 0; i < num_objects * 4; ++i) {
/* Cycle the color and alpha, if desired */ /* Cycle the color and alpha, if desired */
@ -80,7 +80,7 @@ void DrawPoints(SDL_Renderer *renderer)
x = rand() % viewport.w; x = rand() % viewport.w;
y = rand() % viewport.h; y = rand() % viewport.h;
SDL_RenderDrawPoint(renderer, x, y); SDL_RenderPoint(renderer, x, y);
} }
} }
@ -112,18 +112,18 @@ void DrawLines(SDL_Renderer *renderer)
SDL_Rect viewport; SDL_Rect viewport;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255); SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
for (i = 0; i < num_lines; ++i) { for (i = 0; i < num_lines; ++i) {
if (i == -1) { if (i == -1) {
SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); SDL_RenderLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);
SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0); SDL_RenderLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0);
SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2); SDL_RenderLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2);
SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1); SDL_RenderLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1);
} else { } else {
SDL_RenderDrawLine(renderer, lines[i].x, lines[i].y, lines[i].w, lines[i].h); SDL_RenderLine(renderer, lines[i].x, lines[i].y, lines[i].w, lines[i].h);
} }
} }
} }
@ -185,7 +185,7 @@ DrawRectLineIntersections(SDL_Renderer *renderer)
y2 = lines[j].h; y2 = lines[j].h;
if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) { if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {
SDL_RenderDrawLine(renderer, x1, y1, x2, y2); SDL_RenderLine(renderer, x1, y1, x2, y2);
} }
} }
} }

View File

@ -74,10 +74,10 @@ void DrawObject(SDL_Renderer *renderer, Object *object)
rect.h = object->y2 - object->y1; rect.h = object->y2 - object->y1;
} }
/* SDL_RenderDrawRect(renderer, &rect); */ /* SDL_RenderRect(renderer, &rect); */
SDL_RenderFillRect(renderer, &rect); SDL_RenderFillRect(renderer, &rect);
} else { } else {
SDL_RenderDrawLine(renderer, object->x1, object->y1, object->x2, object->y2); SDL_RenderLine(renderer, object->x1, object->y1, object->x2, object->y2);
} }
} }
@ -229,10 +229,10 @@ void loop(void *arg)
/* Mouse wheel */ /* Mouse wheel */
SDL_SetRenderDrawColor(renderer, 0, 255, 128, 255); SDL_SetRenderDrawColor(renderer, 0, 255, 128, 255);
if (wheel_x_active) { if (wheel_x_active) {
SDL_RenderDrawLine(renderer, (int)wheel_x, 0, (int)wheel_x, SCREEN_HEIGHT); SDL_RenderLine(renderer, (int)wheel_x, 0, (int)wheel_x, SCREEN_HEIGHT);
} }
if (wheel_y_active) { if (wheel_y_active) {
SDL_RenderDrawLine(renderer, 0, (int)wheel_y, SCREEN_WIDTH, (int)wheel_y); SDL_RenderLine(renderer, 0, (int)wheel_y, SCREEN_WIDTH, (int)wheel_y);
} }
/* Objects from mouse clicks */ /* Objects from mouse clicks */

View File

@ -59,7 +59,7 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
SDL_Rect *position, *velocity; SDL_Rect *position, *velocity;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
SDL_QueryTexture(sprite, NULL, NULL, &sprite_w, &sprite_h); SDL_QueryTexture(sprite, NULL, NULL, &sprite_w, &sprite_h);
/* Draw a gray background */ /* Draw a gray background */
@ -82,7 +82,7 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
} }
/* Blit the sprite onto the screen */ /* Blit the sprite onto the screen */
SDL_RenderCopy(renderer, sprite, NULL, position); SDL_RenderTexture(renderer, sprite, NULL, position);
} }
/* Update the screen! */ /* Update the screen! */

View File

@ -192,7 +192,7 @@ void MoveSprites(SDL_Renderer *renderer)
SDL_UpdateTexture(MooseTexture, NULL, MooseYUVSurfaces[i]->pixels, MooseYUVSurfaces[i]->pitch); SDL_UpdateTexture(MooseTexture, NULL, MooseYUVSurfaces[i]->pixels, MooseYUVSurfaces[i]->pitch);
} }
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, MooseTexture, NULL, &displayrect); SDL_RenderTexture(renderer, MooseTexture, NULL, &displayrect);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
} else { } else {
SDL_Texture *tmp; SDL_Texture *tmp;
@ -209,7 +209,7 @@ void MoveSprites(SDL_Renderer *renderer)
} }
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, tmp, NULL, &displayrect); SDL_RenderTexture(renderer, tmp, NULL, &displayrect);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
SDL_DestroyTexture(tmp); SDL_DestroyTexture(tmp);
} }
@ -230,7 +230,7 @@ void loop()
switch (event.type) { switch (event.type) {
case SDL_WINDOWEVENT_RESIZED: case SDL_WINDOWEVENT_RESIZED:
SDL_RenderSetViewport(renderer, NULL); SDL_SetRenderViewport(renderer, NULL);
displayrect.w = window_w = event.window.data1; displayrect.w = window_w = event.window.data1;
displayrect.h = window_h = event.window.data2; displayrect.h = window_h = event.window.data2;
break; break;

View File

@ -58,7 +58,7 @@ loop()
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
/* Wrap the cursor rectangle at the screen edges to keep it visible */ /* Wrap the cursor rectangle at the screen edges to keep it visible */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
if (rect.x < viewport.x) { if (rect.x < viewport.x) {
rect.x += viewport.w; rect.x += viewport.w;
} }

View File

@ -51,13 +51,13 @@ void Draw(DrawState *s)
SDL_Point *center = NULL; SDL_Point *center = NULL;
SDL_Point origin = { 0, 0 }; SDL_Point origin = { 0, 0 };
SDL_RenderGetViewport(s->renderer, &viewport); SDL_GetRenderViewport(s->renderer, &viewport);
target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h); target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);
SDL_SetRenderTarget(s->renderer, target); SDL_SetRenderTarget(s->renderer, target);
/* Draw the background */ /* Draw the background */
SDL_RenderCopy(s->renderer, s->background, NULL, NULL); SDL_RenderTexture(s->renderer, s->background, NULL, NULL);
/* Scale and draw the sprite */ /* Scale and draw the sprite */
s->sprite_rect.w += s->scale_direction; s->sprite_rect.w += s->scale_direction;
@ -75,10 +75,10 @@ void Draw(DrawState *s)
s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2; s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2; s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
SDL_RenderCopyEx(s->renderer, s->sprite, NULL, &s->sprite_rect, (double)s->sprite_rect.w, center, (SDL_RendererFlip)s->scale_direction); SDL_RenderTextureRotated(s->renderer, s->sprite, NULL, &s->sprite_rect, (double)s->sprite_rect.w, center, (SDL_RendererFlip)s->scale_direction);
SDL_SetRenderTarget(s->renderer, NULL); SDL_SetRenderTarget(s->renderer, NULL);
SDL_RenderCopy(s->renderer, target, NULL, NULL); SDL_RenderTexture(s->renderer, target, NULL, NULL);
SDL_DestroyTexture(target); SDL_DestroyTexture(target);
/* Update the screen! */ /* Update the screen! */

View File

@ -69,7 +69,7 @@ DrawComposite(DrawState *s)
SDL_SetRenderTarget(s->renderer, B); SDL_SetRenderTarget(s->renderer, B);
SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00); SDL_SetRenderDrawColor(s->renderer, 0x00, 0x00, 0x00, 0x00);
SDL_RenderFillRect(s->renderer, NULL); SDL_RenderFillRect(s->renderer, NULL);
SDL_RenderCopy(s->renderer, A, NULL, NULL); SDL_RenderTexture(s->renderer, A, NULL, NULL);
SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P)); SDL_RenderReadPixels(s->renderer, NULL, SDL_PIXELFORMAT_ARGB8888, &P, sizeof(P));
SDL_Log("Blended pixel: 0x%8.8" SDL_PRIX32 "\n", P); SDL_Log("Blended pixel: 0x%8.8" SDL_PRIX32 "\n", P);
@ -79,7 +79,7 @@ DrawComposite(DrawState *s)
blend_tested = SDL_TRUE; blend_tested = SDL_TRUE;
} }
SDL_RenderGetViewport(s->renderer, &viewport); SDL_GetRenderViewport(s->renderer, &viewport);
target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h); target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);
SDL_SetTextureBlendMode(target, SDL_BLENDMODE_BLEND); SDL_SetTextureBlendMode(target, SDL_BLENDMODE_BLEND);
@ -106,10 +106,10 @@ DrawComposite(DrawState *s)
s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2; s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2; s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect); SDL_RenderTexture(s->renderer, s->sprite, NULL, &s->sprite_rect);
SDL_SetRenderTarget(s->renderer, NULL); SDL_SetRenderTarget(s->renderer, NULL);
SDL_RenderCopy(s->renderer, s->background, NULL, NULL); SDL_RenderTexture(s->renderer, s->background, NULL, NULL);
SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_BLEND); SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_BLEND);
SDL_SetRenderDrawColor(s->renderer, 0xff, 0x00, 0x00, 0x80); SDL_SetRenderDrawColor(s->renderer, 0xff, 0x00, 0x00, 0x80);
@ -120,7 +120,7 @@ DrawComposite(DrawState *s)
SDL_RenderFillRect(s->renderer, &R); SDL_RenderFillRect(s->renderer, &R);
SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_NONE); SDL_SetRenderDrawBlendMode(s->renderer, SDL_BLENDMODE_NONE);
SDL_RenderCopy(s->renderer, target, NULL, NULL); SDL_RenderTexture(s->renderer, target, NULL, NULL);
SDL_DestroyTexture(target); SDL_DestroyTexture(target);
/* Update the screen! */ /* Update the screen! */
@ -134,7 +134,7 @@ Draw(DrawState *s)
SDL_Rect viewport; SDL_Rect viewport;
SDL_Texture *target; SDL_Texture *target;
SDL_RenderGetViewport(s->renderer, &viewport); SDL_GetRenderViewport(s->renderer, &viewport);
target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h); target = SDL_CreateTexture(s->renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_TARGET, viewport.w, viewport.h);
if (target == NULL) { if (target == NULL) {
@ -144,7 +144,7 @@ Draw(DrawState *s)
SDL_SetRenderTarget(s->renderer, target); SDL_SetRenderTarget(s->renderer, target);
/* Draw the background */ /* Draw the background */
SDL_RenderCopy(s->renderer, s->background, NULL, NULL); SDL_RenderTexture(s->renderer, s->background, NULL, NULL);
/* Scale and draw the sprite */ /* Scale and draw the sprite */
s->sprite_rect.w += s->scale_direction; s->sprite_rect.w += s->scale_direction;
@ -161,10 +161,10 @@ Draw(DrawState *s)
s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2; s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2; s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect); SDL_RenderTexture(s->renderer, s->sprite, NULL, &s->sprite_rect);
SDL_SetRenderTarget(s->renderer, NULL); SDL_SetRenderTarget(s->renderer, NULL);
SDL_RenderCopy(s->renderer, target, NULL, NULL); SDL_RenderTexture(s->renderer, target, NULL, NULL);
SDL_DestroyTexture(target); SDL_DestroyTexture(target);
/* Update the screen! */ /* Update the screen! */

View File

@ -51,10 +51,10 @@ void Draw(DrawState *s)
{ {
SDL_Rect viewport; SDL_Rect viewport;
SDL_RenderGetViewport(s->renderer, &viewport); SDL_GetRenderViewport(s->renderer, &viewport);
/* Draw the background */ /* Draw the background */
SDL_RenderCopy(s->renderer, s->background, NULL, NULL); SDL_RenderTexture(s->renderer, s->background, NULL, NULL);
/* Scale and draw the sprite */ /* Scale and draw the sprite */
s->sprite_rect.w += s->scale_direction; s->sprite_rect.w += s->scale_direction;
@ -71,7 +71,7 @@ void Draw(DrawState *s)
s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2; s->sprite_rect.x = (viewport.w - s->sprite_rect.w) / 2;
s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2; s->sprite_rect.y = (viewport.h - s->sprite_rect.h) / 2;
SDL_RenderCopy(s->renderer, s->sprite, NULL, &s->sprite_rect); SDL_RenderTexture(s->renderer, s->sprite, NULL, &s->sprite_rect);
/* Update the screen! */ /* Update the screen! */
SDL_RenderPresent(s->renderer); SDL_RenderPresent(s->renderer);

View File

@ -33,7 +33,7 @@ void render(SDL_Renderer *renderer, SDL_Texture *texture, SDL_Rect texture_dimen
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
/* Render the texture. */ /* Render the texture. */
SDL_RenderCopy(renderer, texture, &texture_dimensions, &texture_dimensions); SDL_RenderTexture(renderer, texture, &texture_dimensions, &texture_dimensions);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
} }

View File

@ -93,7 +93,7 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
SDL_Rect *position, *velocity; SDL_Rect *position, *velocity;
/* Query the sizes */ /* Query the sizes */
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
/* Cycle the color and alpha, if desired */ /* Cycle the color and alpha, if desired */
if (cycle_color) { if (cycle_color) {
@ -128,17 +128,17 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
/* Test points */ /* Test points */
SDL_SetRenderDrawColor(renderer, 0xFF, 0x00, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0xFF, 0x00, 0x00, 0xFF);
SDL_RenderDrawPoint(renderer, 0, 0); SDL_RenderPoint(renderer, 0, 0);
SDL_RenderDrawPoint(renderer, viewport.w - 1, 0); SDL_RenderPoint(renderer, viewport.w - 1, 0);
SDL_RenderDrawPoint(renderer, 0, viewport.h - 1); SDL_RenderPoint(renderer, 0, viewport.h - 1);
SDL_RenderDrawPoint(renderer, viewport.w - 1, viewport.h - 1); SDL_RenderPoint(renderer, viewport.w - 1, viewport.h - 1);
/* Test horizontal and vertical lines */ /* Test horizontal and vertical lines */
SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);
SDL_RenderDrawLine(renderer, 1, 0, viewport.w - 2, 0); SDL_RenderLine(renderer, 1, 0, viewport.w - 2, 0);
SDL_RenderDrawLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1); SDL_RenderLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1);
SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h - 2); SDL_RenderLine(renderer, 0, 1, 0, viewport.h - 2);
SDL_RenderDrawLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2); SDL_RenderLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2);
/* Test fill and copy */ /* Test fill and copy */
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
@ -178,31 +178,31 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
SDL_RenderGeometry(renderer, NULL, verts, 3, NULL, 0); SDL_RenderGeometry(renderer, NULL, verts, 3, NULL, 0);
} }
SDL_RenderCopy(renderer, sprite, NULL, &temp); SDL_RenderTexture(renderer, sprite, NULL, &temp);
temp.x = viewport.w - sprite_w - 1; temp.x = viewport.w - sprite_w - 1;
temp.y = 1; temp.y = 1;
temp.w = sprite_w; temp.w = sprite_w;
temp.h = sprite_h; temp.h = sprite_h;
SDL_RenderFillRect(renderer, &temp); SDL_RenderFillRect(renderer, &temp);
SDL_RenderCopy(renderer, sprite, NULL, &temp); SDL_RenderTexture(renderer, sprite, NULL, &temp);
temp.x = 1; temp.x = 1;
temp.y = viewport.h - sprite_h - 1; temp.y = viewport.h - sprite_h - 1;
temp.w = sprite_w; temp.w = sprite_w;
temp.h = sprite_h; temp.h = sprite_h;
SDL_RenderFillRect(renderer, &temp); SDL_RenderFillRect(renderer, &temp);
SDL_RenderCopy(renderer, sprite, NULL, &temp); SDL_RenderTexture(renderer, sprite, NULL, &temp);
temp.x = viewport.w - sprite_w - 1; temp.x = viewport.w - sprite_w - 1;
temp.y = viewport.h - sprite_h - 1; temp.y = viewport.h - sprite_h - 1;
temp.w = sprite_w; temp.w = sprite_w;
temp.h = sprite_h; temp.h = sprite_h;
SDL_RenderFillRect(renderer, &temp); SDL_RenderFillRect(renderer, &temp);
SDL_RenderCopy(renderer, sprite, NULL, &temp); SDL_RenderTexture(renderer, sprite, NULL, &temp);
/* Test diagonal lines */ /* Test diagonal lines */
SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);
SDL_RenderDrawLine(renderer, sprite_w, sprite_h, SDL_RenderLine(renderer, sprite_w, sprite_h,
viewport.w - sprite_w - 2, viewport.h - sprite_h - 2); viewport.w - sprite_w - 2, viewport.h - sprite_h - 2);
SDL_RenderDrawLine(renderer, viewport.w - sprite_w - 2, sprite_h, SDL_RenderLine(renderer, viewport.w - sprite_w - 2, sprite_h,
sprite_w, viewport.h - sprite_h - 2); sprite_w, viewport.h - sprite_h - 2);
/* Conditionally move the sprites, bounce at the wall */ /* Conditionally move the sprites, bounce at the wall */
@ -238,7 +238,7 @@ void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
position = &positions[i]; position = &positions[i];
/* Blit the sprite onto the screen */ /* Blit the sprite onto the screen */
SDL_RenderCopy(renderer, sprite, NULL, position); SDL_RenderTexture(renderer, sprite, NULL, position);
} }
} else if (use_rendergeometry == 1) { } else if (use_rendergeometry == 1) {
/* /*

View File

@ -70,7 +70,7 @@ void MoveSprites()
} }
/* Blit the sprite onto the screen */ /* Blit the sprite onto the screen */
SDL_RenderCopy(renderer, sprite, NULL, position); SDL_RenderTexture(renderer, sprite, NULL, position);
} }
/* Update the screen! */ /* Update the screen! */

View File

@ -115,7 +115,7 @@ void loop()
UpdateTexture(MooseTexture); UpdateTexture(MooseTexture);
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, MooseTexture, NULL, NULL); SDL_RenderTexture(renderer, MooseTexture, NULL, NULL);
SDL_RenderPresent(renderer); SDL_RenderPresent(renderer);
#ifdef __EMSCRIPTEN__ #ifdef __EMSCRIPTEN__

View File

@ -46,7 +46,7 @@ void DrawOnViewport(SDL_Renderer *renderer)
SDL_Rect rect; SDL_Rect rect;
/* Set the viewport */ /* Set the viewport */
SDL_RenderSetViewport(renderer, &viewport); SDL_SetRenderViewport(renderer, &viewport);
/* Draw a gray background */ /* Draw a gray background */
SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF); SDL_SetRenderDrawColor(renderer, 0x80, 0x80, 0x80, 0xFF);
@ -54,29 +54,29 @@ void DrawOnViewport(SDL_Renderer *renderer)
/* Test inside points */ /* Test inside points */
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF);
SDL_RenderDrawPoint(renderer, viewport.h / 2 + 20, viewport.w / 2); SDL_RenderPoint(renderer, viewport.h / 2 + 20, viewport.w / 2);
SDL_RenderDrawPoint(renderer, viewport.h / 2 - 20, viewport.w / 2); SDL_RenderPoint(renderer, viewport.h / 2 - 20, viewport.w / 2);
SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 - 20); SDL_RenderPoint(renderer, viewport.h / 2, viewport.w / 2 - 20);
SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 + 20); SDL_RenderPoint(renderer, viewport.h / 2, viewport.w / 2 + 20);
/* Test horizontal and vertical lines */ /* Test horizontal and vertical lines */
SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);
SDL_RenderDrawLine(renderer, 1, 0, viewport.w - 2, 0); SDL_RenderLine(renderer, 1, 0, viewport.w - 2, 0);
SDL_RenderDrawLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1); SDL_RenderLine(renderer, 1, viewport.h - 1, viewport.w - 2, viewport.h - 1);
SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h - 2); SDL_RenderLine(renderer, 0, 1, 0, viewport.h - 2);
SDL_RenderDrawLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2); SDL_RenderLine(renderer, viewport.w - 1, 1, viewport.w - 1, viewport.h - 2);
/* Test diagonal lines */ /* Test diagonal lines */
SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF); SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0xFF, 0xFF);
SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1); SDL_RenderLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);
SDL_RenderDrawLine(renderer, viewport.w - 1, 0, 0, viewport.h - 1); SDL_RenderLine(renderer, viewport.w - 1, 0, 0, viewport.h - 1);
/* Test outside points */ /* Test outside points */
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF); SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0x00, 0xFF);
SDL_RenderDrawPoint(renderer, viewport.h / 2 + viewport.h, viewport.w / 2); SDL_RenderPoint(renderer, viewport.h / 2 + viewport.h, viewport.w / 2);
SDL_RenderDrawPoint(renderer, viewport.h / 2 - viewport.h, viewport.w / 2); SDL_RenderPoint(renderer, viewport.h / 2 - viewport.h, viewport.w / 2);
SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 - viewport.w); SDL_RenderPoint(renderer, viewport.h / 2, viewport.w / 2 - viewport.w);
SDL_RenderDrawPoint(renderer, viewport.h / 2, viewport.w / 2 + viewport.w); SDL_RenderPoint(renderer, viewport.h / 2, viewport.w / 2 + viewport.w);
/* Add a box at the top */ /* Add a box at the top */
rect.w = 8; rect.w = 8;
@ -89,9 +89,9 @@ void DrawOnViewport(SDL_Renderer *renderer)
SDL_QueryTexture(sprite, NULL, NULL, &rect.w, &rect.h); SDL_QueryTexture(sprite, NULL, NULL, &rect.w, &rect.h);
rect.x = (viewport.w - rect.w) / 2; rect.x = (viewport.w - rect.w) / 2;
rect.y = (viewport.h - rect.h) / 2; rect.y = (viewport.h - rect.h) / 2;
SDL_RenderSetClipRect(renderer, &rect); SDL_SetRenderClipRect(renderer, &rect);
SDL_RenderCopy(renderer, sprite, NULL, &rect); SDL_RenderTexture(renderer, sprite, NULL, &rect);
SDL_RenderSetClipRect(renderer, NULL); SDL_SetRenderClipRect(renderer, NULL);
} }
void loop() void loop()
@ -129,7 +129,7 @@ void loop()
/* Update the screen! */ /* Update the screen! */
if (use_target) { if (use_target) {
SDL_SetRenderTarget(state->renderers[i], NULL); SDL_SetRenderTarget(state->renderers[i], NULL);
SDL_RenderCopy(state->renderers[i], state->targets[i], NULL, NULL); SDL_RenderTexture(state->renderers[i], state->targets[i], NULL, NULL);
SDL_RenderPresent(state->renderers[i]); SDL_RenderPresent(state->renderers[i]);
SDL_SetRenderTarget(state->renderers[i], state->targets[i]); SDL_SetRenderTarget(state->renderers[i], state->targets[i]);
} else { } else {

View File

@ -225,7 +225,7 @@ void loop()
int y = 0; int y = 0;
SDL_Rect viewport, menurect; SDL_Rect viewport, menurect;
SDL_RenderGetViewport(renderer, &viewport); SDL_GetRenderViewport(renderer, &viewport);
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
SDL_RenderClear(renderer); SDL_RenderClear(renderer);

View File

@ -429,7 +429,7 @@ int main(int argc, char **argv)
} }
SDL_RenderClear(renderer); SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, output[current], NULL, NULL); SDL_RenderTexture(renderer, output[current], NULL, NULL);
SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF); SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
if (current == 0) { if (current == 0) {
SDLTest_DrawString(renderer, 4, 4, titles[current]); SDLTest_DrawString(renderer, 4, 4, titles[current]);