SDL
2.0
|
#include "SDL_stdinc.h"
#include "SDL_keyboard.h"
#include "SDL_render.h"
#include "SDL_video.h"
#include "begin_code.h"
#include "close_code.h"
Go to the source code of this file.
Typedefs | |
typedef void(* | SDL_WindowsMessageHook) (void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam) |
typedef struct IDirect3DDevice9 | IDirect3DDevice9 |
typedef struct ID3D11Device | ID3D11Device |
Functions | |
void | SDL_SetWindowsMessageHook (SDL_WindowsMessageHook callback, void *userdata) |
int | SDL_Direct3D9GetAdapterIndex (int displayIndex) |
IDirect3DDevice9 * | SDL_RenderGetD3D9Device (SDL_Renderer *renderer) |
ID3D11Device * | SDL_RenderGetD3D11Device (SDL_Renderer *renderer) |
SDL_bool | SDL_DXGIGetOutputInfo (int displayIndex, int *adapterIndex, int *outputIndex) |
SDL_bool | SDL_IsTablet (void) |
void | SDL_OnApplicationWillTerminate (void) |
void | SDL_OnApplicationDidReceiveMemoryWarning (void) |
void | SDL_OnApplicationWillResignActive (void) |
void | SDL_OnApplicationDidEnterBackground (void) |
void | SDL_OnApplicationWillEnterForeground (void) |
void | SDL_OnApplicationDidBecomeActive (void) |
Include file for platform specific SDL API functions
Definition in file SDL_system.h.
typedef struct ID3D11Device ID3D11Device |
Definition at line 87 of file SDL_system.h.
typedef struct IDirect3DDevice9 IDirect3DDevice9 |
Definition at line 71 of file SDL_system.h.
typedef void( * SDL_WindowsMessageHook) (void *userdata, void *hWnd, unsigned int message, Uint64 wParam, Sint64 lParam) |
Definition at line 46 of file SDL_system.h.
int SDL_Direct3D9GetAdapterIndex | ( | int | displayIndex | ) |
Get the D3D9 adapter index that matches the specified display index.
The returned adapter index can be passed to IDirect3D9::CreateDevice
and controls on which monitor a full screen application will appear.
displayIndex | the display index for which to get the D3D9 adapter index |
SDL_bool SDL_DXGIGetOutputInfo | ( | int | displayIndex, |
int * | adapterIndex, | ||
int * | outputIndex | ||
) |
Get the DXGI Adapter and Output indices for the specified display index.
The DXGI Adapter and Output indices can be passed to EnumAdapters
and EnumOutputs
respectively to get the objects required to create a DX10 or DX11 device and swap chain.
Before SDL 2.0.4 this function did not return a value. Since SDL 2.0.4 it returns an SDL_bool.
displayIndex | the display index for which to get both indices |
adapterIndex | a pointer to be filled in with the adapter index |
outputIndex | a pointer to be filled in with the output index |
SDL_bool SDL_IsTablet | ( | void | ) |
Query if the current device is a tablet.
If SDL can't determine this, it will return SDL_FALSE.
void SDL_OnApplicationDidBecomeActive | ( | void | ) |
void SDL_OnApplicationDidEnterBackground | ( | void | ) |
void SDL_OnApplicationDidReceiveMemoryWarning | ( | void | ) |
void SDL_OnApplicationWillEnterForeground | ( | void | ) |
void SDL_OnApplicationWillResignActive | ( | void | ) |
void SDL_OnApplicationWillTerminate | ( | void | ) |
ID3D11Device* SDL_RenderGetD3D11Device | ( | SDL_Renderer * | renderer | ) |
Get the D3D11 device associated with a renderer.
Once you are done using the device, you should release it to avoid a resource leak.
renderer | the renderer from which to get the associated D3D11 device |
IDirect3DDevice9* SDL_RenderGetD3D9Device | ( | SDL_Renderer * | renderer | ) |
Get the D3D9 device associated with a renderer.
Once you are done using the device, you should release it to avoid a resource leak.
renderer | the renderer from which to get the associated D3D device |
void SDL_SetWindowsMessageHook | ( | SDL_WindowsMessageHook | callback, |
void * | userdata | ||
) |
Set a callback for every Windows message, run before TranslateMessage().
callback | The SDL_WindowsMessageHook function to call. |
userdata | a pointer to pass to every iteration of callback |