mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-23 13:09:11 +00:00
render: Added SDL_GetTextureRenderer().
This commit is contained in:
parent
7eae08cfc4
commit
9bc7cfc755
5 changed files with 26 additions and 0 deletions
|
@ -702,6 +702,23 @@ extern DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureWithProperties(SDL_Rendere
|
||||||
*/
|
*/
|
||||||
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture);
|
extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *texture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the renderer that created an SDL_Texture.
|
||||||
|
*
|
||||||
|
* \param texture the texture to query
|
||||||
|
* \returns a pointer to the SDL_Renderer that created the texture, or NULL
|
||||||
|
* on failure; call SDL_GetError() for more information.
|
||||||
|
*
|
||||||
|
* \threadsafety It is safe to call this function from any thread.
|
||||||
|
*
|
||||||
|
* \since This function is available since SDL 3.0.0.
|
||||||
|
*
|
||||||
|
* \sa SDL_CreateTexture
|
||||||
|
* \sa SDL_CreateTextureFromSurface
|
||||||
|
* \sa SDL_CreateTextureWithProperties
|
||||||
|
*/
|
||||||
|
extern DECLSPEC SDL_Renderer *SDLCALL SDL_GetTextureRenderer(SDL_Texture *texture);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query the attributes of a texture.
|
* Query the attributes of a texture.
|
||||||
*
|
*
|
||||||
|
|
|
@ -961,6 +961,7 @@ SDL3_0.0.0 {
|
||||||
SDL_wcsnstr;
|
SDL_wcsnstr;
|
||||||
SDL_SyncWindow;
|
SDL_SyncWindow;
|
||||||
SDL_GetGamepadSteamHandle;
|
SDL_GetGamepadSteamHandle;
|
||||||
|
SDL_GetTextureRenderer;
|
||||||
# extra symbols go here (don't modify this line)
|
# extra symbols go here (don't modify this line)
|
||||||
local: *;
|
local: *;
|
||||||
};
|
};
|
||||||
|
|
|
@ -986,3 +986,4 @@
|
||||||
#define SDL_wcsnstr SDL_wcsnstr_REAL
|
#define SDL_wcsnstr SDL_wcsnstr_REAL
|
||||||
#define SDL_SyncWindow SDL_SyncWindow_REAL
|
#define SDL_SyncWindow SDL_SyncWindow_REAL
|
||||||
#define SDL_GetGamepadSteamHandle SDL_GetGamepadSteamHandle_REAL
|
#define SDL_GetGamepadSteamHandle SDL_GetGamepadSteamHandle_REAL
|
||||||
|
#define SDL_GetTextureRenderer SDL_GetTextureRenderer_REAL
|
||||||
|
|
|
@ -1011,3 +1011,4 @@ SDL_DYNAPI_PROC(char*,SDL_strnstr,(const char *a, const char *b, size_t c),(a,b,
|
||||||
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsnstr,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsnstr,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
||||||
SDL_DYNAPI_PROC(int,SDL_SyncWindow,(SDL_Window *a),(a),return)
|
SDL_DYNAPI_PROC(int,SDL_SyncWindow,(SDL_Window *a),(a),return)
|
||||||
SDL_DYNAPI_PROC(Uint64,SDL_GetGamepadSteamHandle,(SDL_Gamepad *a),(a),return)
|
SDL_DYNAPI_PROC(Uint64,SDL_GetGamepadSteamHandle,(SDL_Gamepad *a),(a),return)
|
||||||
|
SDL_DYNAPI_PROC(SDL_Renderer*,SDL_GetTextureRenderer,(SDL_Texture *a),(a),return)
|
||||||
|
|
|
@ -1396,6 +1396,12 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
||||||
return texture;
|
return texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDL_Renderer *SDL_GetTextureRenderer(SDL_Texture *texture)
|
||||||
|
{
|
||||||
|
CHECK_TEXTURE_MAGIC(texture, NULL);
|
||||||
|
return texture->renderer;
|
||||||
|
}
|
||||||
|
|
||||||
SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture *texture)
|
SDL_PropertiesID SDL_GetTextureProperties(SDL_Texture *texture)
|
||||||
{
|
{
|
||||||
CHECK_TEXTURE_MAGIC(texture, 0);
|
CHECK_TEXTURE_MAGIC(texture, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue