-
Notifications
You must be signed in to change notification settings - Fork 3
/
D3DX11core.h
128 lines (92 loc) · 3.65 KB
/
D3DX11core.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
///////////////////////////////////////////////////////////////////////////
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
// File: d3dx11core.h
// Content: D3DX11 core types and functions
//
///////////////////////////////////////////////////////////////////////////
#include "d3dx11.h"
#ifndef __D3DX11CORE_H__
#define __D3DX11CORE_H__
// Current name of the DLL shipped in the same SDK as this header.
#define D3DX11_DLL_W L"d3dx11_43.dll"
#define D3DX11_DLL_A "d3dx11_43.dll"
#ifdef UNICODE
#define D3DX11_DLL D3DX11_DLL_W
#else
#define D3DX11_DLL D3DX11_DLL_A
#endif
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
// D3DX11_SDK_VERSION:
// -----------------
// This identifier is passed to D3DX11CheckVersion in order to ensure that an
// application was built against the correct header files and lib files.
// This number is incremented whenever a header (or other) change would
// require applications to be rebuilt. If the version doesn't match,
// D3DX11CreateVersion will return FALSE. (The number itself has no meaning.)
///////////////////////////////////////////////////////////////////////////
#define D3DX11_SDK_VERSION 43
#ifdef D3D_DIAG_DLL
BOOL WINAPI D3DX11DebugMute(BOOL Mute);
#endif
HRESULT WINAPI D3DX11CheckVersion(UINT D3DSdkVersion, UINT D3DX11SdkVersion);
#ifdef __cplusplus
}
#endif //__cplusplus
//////////////////////////////////////////////////////////////////////////////
// ID3DX11ThreadPump:
//////////////////////////////////////////////////////////////////////////////
#undef INTERFACE
#define INTERFACE ID3DX11DataLoader
DECLARE_INTERFACE(ID3DX11DataLoader)
{
STDMETHOD(Load)(THIS) PURE;
STDMETHOD(Decompress)(THIS_ void **ppData, SIZE_T *pcBytes) PURE;
STDMETHOD(Destroy)(THIS) PURE;
};
#undef INTERFACE
#define INTERFACE ID3DX11DataProcessor
DECLARE_INTERFACE(ID3DX11DataProcessor)
{
STDMETHOD(Process)(THIS_ void *pData, SIZE_T cBytes) PURE;
STDMETHOD(CreateDeviceObject)(THIS_ void **ppDataObject) PURE;
STDMETHOD(Destroy)(THIS) PURE;
};
// {C93FECFA-6967-478a-ABBC-402D90621FCB}
DEFINE_GUID(IID_ID3DX11ThreadPump,
0xc93fecfa, 0x6967, 0x478a, 0xab, 0xbc, 0x40, 0x2d, 0x90, 0x62, 0x1f, 0xcb);
#undef INTERFACE
#define INTERFACE ID3DX11ThreadPump
DECLARE_INTERFACE_(ID3DX11ThreadPump, IUnknown)
{
// IUnknown
STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
STDMETHOD_(ULONG, AddRef)(THIS) PURE;
STDMETHOD_(ULONG, Release)(THIS) PURE;
// ID3DX11ThreadPump
STDMETHOD(AddWorkItem)(THIS_ ID3DX11DataLoader *pDataLoader, ID3DX11DataProcessor *pDataProcessor, HRESULT *pHResult, void **ppDeviceObject) PURE;
STDMETHOD_(UINT, GetWorkItemCount)(THIS) PURE;
STDMETHOD(WaitForAllItems)(THIS) PURE;
STDMETHOD(ProcessDeviceWorkItems)(THIS_ UINT iWorkItemCount);
STDMETHOD(PurgeAllItems)(THIS) PURE;
STDMETHOD(GetQueueStatus)(THIS_ UINT *pIoQueue, UINT *pProcessQueue, UINT *pDeviceQueue) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
HRESULT WINAPI D3DX11CreateThreadPump(UINT cIoThreads, UINT cProcThreads, ID3DX11ThreadPump **ppThreadPump);
HRESULT WINAPI D3DX11UnsetAllDeviceObjects(ID3D11DeviceContext *pContext);
#ifdef __cplusplus
}
#endif //__cplusplus
///////////////////////////////////////////////////////////////////////////
#define _FACD3D 0x876
#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code )
#define MAKE_D3DSTATUS( code ) MAKE_HRESULT( 0, _FACD3D, code )
#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156)
#define D3DERR_WASSTILLDRAWING MAKE_D3DHRESULT(540)
#endif //__D3DX11CORE_H__