sdlRenderGetD3D12Device function
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 2.24.0.
extern DECLSPEC ID3D12Device* SDLCALL SDL_RenderGetD3D12Device(SDL_Renderer* renderer)
Implementation
Pointer<ID3D12Device> sdlRenderGetD3D12Device(Pointer<SdlRenderer> renderer) {
final sdlRenderGetD3D12DeviceLookupFunction = libSdl2.lookupFunction<
Pointer<ID3D12Device> Function(Pointer<SdlRenderer> renderer),
Pointer<ID3D12Device> Function(
Pointer<SdlRenderer> renderer)>('SDL_RenderGetD3D12Device');
return sdlRenderGetD3D12DeviceLookupFunction(renderer);
}