include: Add the IDXGIFactory2 interface.

This commit is contained in:
Henri Verbeet 2016-10-22 16:04:53 +02:00
parent 110309b623
commit f34b9f9347
2 changed files with 56 additions and 0 deletions

View File

@ -34,6 +34,8 @@ typedef enum DXGI_MODE_ROTATION
DXGI_MODE_ROTATION_ROTATE270 = 0x4,
} DXGI_MODE_ROTATION;
interface IDXGIAdapter;
interface IDXGIAdapter1;
interface IDXGIOutput;
typedef struct DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC;
typedef struct DXGI_FRAME_STATISTICS DXGI_FRAME_STATISTICS;
@ -82,3 +84,33 @@ interface IDXGISwapChain : IDXGIDeviceSubObject
HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS *stats);
HRESULT GetLastPresentCount(UINT *last_present_count);
};
[
local,
object,
uuid(7b7166ec-21c7-44ae-b21a-c9ae321ae369),
pointer_default(unique)
]
interface IDXGIFactory : IDXGIObject
{
HRESULT EnumAdapters(UINT adapter_idx, IDXGIAdapter **adapter);
HRESULT MakeWindowAssociation(HWND hwnd, UINT flags);
HRESULT GetWindowAssociation(HWND *hwnd);
HRESULT CreateSwapChain(IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain);
HRESULT CreateSoftwareAdapter(HMODULE hmodule, IDXGIAdapter **adapter);
};
[
local,
object,
uuid(770aae78-f26f-4dba-a829-253c83d1b387),
pointer_default(unique)
]
interface IDXGIFactory1 : IDXGIFactory
{
HRESULT EnumAdapters1(UINT adapter_idx, IDXGIAdapter1 **adpter);
BOOL IsCurrent();
};
[local] HRESULT __stdcall CreateDXGIFactory(REFIID riid, void **factory);
[local] HRESULT __stdcall CreateDXGIFactory1(REFIID riid, void **factory);

View File

@ -47,3 +47,27 @@ interface IDXGISwapChain1 : IDXGISwapChain
HRESULT SetRotation(DXGI_MODE_ROTATION rotation);
HRESULT GetRotation(DXGI_MODE_ROTATION *rotation);
};
[
local,
object,
uuid(50c83a1c-e072-4c48-87b0-3630fa36a6d0),
pointer_default(unique)
]
interface IDXGIFactory2 : IDXGIFactory1
{
BOOL IsWindowedStereoEnabled();
HRESULT CreateSwapChainForHwnd(IUnknown *device, HWND window, const DXGI_SWAP_CHAIN_DESC1 *desc,
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain);
HRESULT CreateSwapChainForCoreWindow(IUnknown *device, IUnknown *window, const DXGI_SWAP_CHAIN_DESC1 *desc,
IDXGIOutput *output, IDXGISwapChain1 **swapchain);
HRESULT GetSharedResourceAdapterLuid(HANDLE resource, LUID *luid);
HRESULT RegisterStereoStatusWindow(HWND window, UINT msg, DWORD *cookie);
HRESULT RegisterStereoStatusEvent(HANDLE event, DWORD *cookie);
void UnregisterStereoStatus(DWORD cookie);
HRESULT RegisterOcclusionStatusWindow(HWND window, UINT msg, DWORD *cookie);
HRESULT RegisterOcclusionStatusEvent(HANDLE event, DWORD *cookie);
void UnregisterOcclusionStatus(DWORD cookie);
HRESULT CreateSwapChainForComposition(IUnknown *device, const DXGI_SWAP_CHAIN_DESC1 *desc,
IDXGIOutput *output, IDXGISwapChain1 **swapchain);
};