mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-21 10:48:14 +00:00
Replaced SDL_RenderGetD3D11Device(), SDL_RenderGetD3D12Device(), and SDL_RenderGetD3D9Device() with renderer properties.
This commit is contained in:
@@ -462,10 +462,6 @@
|
||||
#define SDL_UpperBlit SDL_BlitSurface
|
||||
#define SDL_UpperBlitScaled SDL_BlitSurfaceScaled
|
||||
|
||||
/* ##SDL_system.h */
|
||||
#define SDL_RenderGetD3D11Device SDL_GetRenderD3D11Device
|
||||
#define SDL_RenderGetD3D9Device SDL_GetRenderD3D9Device
|
||||
|
||||
/* ##SDL_thread.h */
|
||||
#define SDL_TLSCleanup SDL_CleanupTLS
|
||||
#define SDL_TLSCreate SDL_CreateTLS
|
||||
@@ -911,10 +907,6 @@
|
||||
#define SDL_UpperBlit SDL_UpperBlit_renamed_SDL_BlitSurface
|
||||
#define SDL_UpperBlitScaled SDL_UpperBlitScaled_renamed_SDL_BlitSurfaceScaled
|
||||
|
||||
/* ##SDL_system.h */
|
||||
#define SDL_RenderGetD3D11Device SDL_RenderGetD3D11Device_renamed_SDL_GetRenderD3D11Device
|
||||
#define SDL_RenderGetD3D9Device SDL_RenderGetD3D9Device_renamed_SDL_GetRenderD3D9Device
|
||||
|
||||
/* ##SDL_thread.h */
|
||||
#define SDL_TLSCleanup SDL_TLSCleanup_renamed_SDL_CleanupTLS
|
||||
#define SDL_TLSCreate SDL_TLSCreate_renamed_SDL_CreateTLS
|
||||
|
@@ -309,6 +309,11 @@ extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_Renderer *renderer, SDL_Rend
|
||||
/**
|
||||
* Get the properties associated with a renderer.
|
||||
*
|
||||
* The following properties are provided by SDL:
|
||||
* "SDL.renderer.d3d9.device" - the IDirect3DDevice9 associated with the renderer
|
||||
* "SDL.renderer.d3d11.device" - the ID3D11Device associated with the renderer
|
||||
* "SDL.renderer.d3d12.device" - the ID3D12Device associated with the renderer
|
||||
*
|
||||
* \param renderer the rendering context
|
||||
* \returns a valid property ID on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
|
@@ -73,60 +73,8 @@ extern DECLSPEC void SDLCALL SDL_SetWindowsMessageHook(SDL_WindowsMessageHook ca
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Direct3D9GetAdapterIndex(SDL_DisplayID displayID);
|
||||
|
||||
typedef struct IDirect3DDevice9 IDirect3DDevice9;
|
||||
|
||||
/**
|
||||
* Get the D3D9 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D device
|
||||
* \returns the D3D9 device associated with given renderer or NULL if it is
|
||||
* not a D3D9 renderer; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC IDirect3DDevice9* SDLCALL SDL_GetRenderD3D9Device(SDL_Renderer * renderer);
|
||||
|
||||
typedef struct ID3D11Device ID3D11Device;
|
||||
|
||||
/**
|
||||
* Get the D3D11 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D11 device
|
||||
* \returns the D3D11 device associated with given renderer or NULL if it is
|
||||
* not a D3D11 renderer; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC ID3D11Device* SDLCALL SDL_GetRenderD3D11Device(SDL_Renderer * renderer);
|
||||
|
||||
#endif /* defined(__WIN32__) || defined(__WINGDK__) */
|
||||
|
||||
#if defined(__WIN32__) || defined(__GDK__)
|
||||
|
||||
typedef struct ID3D12Device ID3D12Device;
|
||||
|
||||
/**
|
||||
* Get the D3D12 device associated with a renderer.
|
||||
*
|
||||
* Once you are done using the device, you should release it to avoid a
|
||||
* resource leak.
|
||||
*
|
||||
* \param renderer the renderer from which to get the associated D3D12 device
|
||||
* \returns the D3D12 device associated with given renderer or NULL if it is
|
||||
* not a D3D12 renderer; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
*/
|
||||
extern DECLSPEC ID3D12Device* SDLCALL SDL_RenderGetD3D12Device(SDL_Renderer* renderer);
|
||||
|
||||
#endif /* defined(__WIN32__) || defined(__GDK__) */
|
||||
|
||||
#if defined(__WIN32__) || defined(__WINGDK__)
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user