39142c4d2dfafa397ee272ee8e77caa7c6a74761
[reactos.git] / reactos / include / ddk / d3dnthal.h
1 /*
2 * Direct3D NT driver interface
3 */
4
5 #ifndef __DDK_D3DNTHAL_H
6 #define __DDK_D3DNTHAL_H
7
8 #include <ddrawint.h>
9 #include <d3dtypes.h>
10 #include <d3dcaps.h>
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 DEFINE_GUID(GUID_D3DCallbacks, 0x7BF06990, 0x8794, 0x11D0, 0x91, 0x39, 0x08, 0x00, 0x36, 0xD2, 0xEF, 0x02);
17 DEFINE_GUID(GUID_D3DCallbacks3, 0xDDF41230, 0xEC0A, 0x11D0, 0xA9, 0xB6, 0x00, 0xAA, 0x00, 0xC0, 0x99, 0x3E);
18 DEFINE_GUID(GUID_D3DExtendedCaps, 0x7DE41F80, 0x9D93, 0x11D0, 0x89, 0xAB, 0x00, 0xA0, 0xC9, 0x05, 0x41, 0x29);
19 DEFINE_GUID(GUID_D3DParseUnknownCommandCallback, 0x2E04FFA0, 0x98E4, 0x11D1, 0x8C, 0xE1, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0xA8);
20 DEFINE_GUID(GUID_ZPixelFormats, 0x93869880, 0x36CF, 0x11D1, 0x9B, 0x1B, 0x00, 0xAA, 0x00, 0xBB, 0xB8, 0xAE);
21 DEFINE_GUID(GUID_DDStereoMode, 0xF828169C, 0xA8E8, 0x11D2, 0xA1, 0xF2, 0x00, 0xA0, 0xC9, 0x83, 0xEA, 0xF6);
22
23 typedef struct _D3DNTHAL_CONTEXTCREATEDATA
24 {
25 union
26 {
27 PDD_DIRECTDRAW_GLOBAL lpDDGbl;
28 PDD_DIRECTDRAW_LOCAL lpDDLcl;
29 };
30 union
31 {
32 PDD_SURFACE_LOCAL lpDDS;
33 PDD_SURFACE_LOCAL lpDDSLcl;
34 };
35 union
36 {
37 PDD_SURFACE_LOCAL lpDDSZ;
38 PDD_SURFACE_LOCAL lpDDSZLcl;
39 };
40 DWORD dwPID;
41 ULONG_PTR dwhContext;
42 HRESULT ddrval;
43 } D3DNTHAL_CONTEXTCREATEDATA, *LPD3DNTHAL_CONTEXTCREATEDATA;
44
45 typedef struct _D3DNTHAL_CONTEXTDESTROYDATA
46 {
47 ULONG_PTR dwhContext;
48 HRESULT ddrval;
49 } D3DNTHAL_CONTEXTDESTROYDATA, *LPD3DNTHAL_CONTEXTDESTROYDATA;
50
51 typedef struct _D3DNTHAL_CONTEXTDESTROYALLDATA
52 {
53 DWORD dwPID;
54 HRESULT ddrval;
55 } D3DNTHAL_CONTEXTDESTROYALLDATA, *LPD3DNTHAL_CONTEXTDESTROYALLDATA;
56
57 typedef struct _D3DNTHAL_SCENECAPTUREDATA
58 {
59 ULONG_PTR dwhContext;
60 DWORD dwFlag;
61 HRESULT ddrval;
62 } D3DNTHAL_SCENECAPTUREDATA, *LPD3DNTHAL_SCENECAPTUREDATA;
63
64 typedef struct _D3DNTHAL_TEXTURECREATEDATA
65 {
66 ULONG_PTR dwhContext;
67 HANDLE hDDS;
68 ULONG_PTR dwHandle;
69 HRESULT ddrval;
70 } D3DNTHAL_TEXTURECREATEDATA, *LPD3DNTHAL_TEXTURECREATEDATA;
71
72 typedef struct _D3DNTHAL_TEXTUREDESTROYDATA
73 {
74 ULONG_PTR dwhContext;
75 ULONG_PTR dwHandle;
76 HRESULT ddrval;
77 } D3DNTHAL_TEXTUREDESTROYDATA, *LPD3DNTHAL_TEXTUREDESTROYDATA;
78
79 typedef struct _D3DNTHAL_TEXTURESWAPDATA
80 {
81 ULONG_PTR dwhContext;
82 ULONG_PTR dwHandle1;
83 ULONG_PTR dwHandle2;
84 HRESULT ddrval;
85 } D3DNTHAL_TEXTURESWAPDATA, *LPD3DNTHAL_TEXTURESWAPDATA;
86
87 typedef struct _D3DNTHAL_TEXTUREGETSURFDATA
88 {
89 ULONG_PTR dwhContext;
90 HANDLE hDDS;
91 ULONG_PTR dwHandle;
92 HRESULT ddrval;
93 } D3DNTHAL_TEXTUREGETSURFDATA, *LPD3DNTHAL_TEXTUREGETSURFDATA;
94
95 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTCREATECB)(LPD3DNTHAL_CONTEXTCREATEDATA);
96 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYCB)(LPD3DNTHAL_CONTEXTDESTROYDATA);
97 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYALLCB)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
98 typedef DWORD (APIENTRY *LPD3DNTHAL_SCENECAPTURECB)(LPD3DNTHAL_SCENECAPTUREDATA);
99 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURECREATECB)(LPD3DNTHAL_TEXTURECREATEDATA);
100 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREDESTROYCB)(LPD3DNTHAL_TEXTUREDESTROYDATA);
101 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURESWAPCB)(LPD3DNTHAL_TEXTURESWAPDATA);
102 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREGETSURFCB)(LPD3DNTHAL_TEXTUREGETSURFDATA);
103
104 typedef struct _D3DNTHALDeviceDesc_V1
105 {
106 DWORD dwSize;
107 DWORD dwFlags;
108 D3DCOLORMODEL dcmColorModel;
109 DWORD dwDevCaps;
110 D3DTRANSFORMCAPS dtcTransformCaps;
111 BOOL bClipping;
112 D3DLIGHTINGCAPS dlcLightingCaps;
113 D3DPRIMCAPS dpcLineCaps;
114 D3DPRIMCAPS dpcTriCaps;
115 DWORD dwDeviceRenderBitDepth;
116 DWORD dwDeviceZBufferBitDepth;
117 DWORD dwMaxBufferSize;
118 DWORD dwMaxVertexCount;
119 } D3DNTHALDEVICEDESC_V1, *LPD3DNTHALDEVICEDESC_V1;
120
121 typedef struct _D3DNTHAL_GLOBALDRIVERDATA
122 {
123 DWORD dwSize;
124 D3DNTHALDEVICEDESC_V1 hwCaps;
125 DWORD dwNumVertices;
126 DWORD dwNumClipVertices;
127 DWORD dwNumTextureFormats;
128 LPDDSURFACEDESC lpTextureFormats;
129 } D3DNTHAL_GLOBALDRIVERDATA, *LPD3DNTHAL_GLOBALDRIVERDATA;
130
131 typedef struct _D3DNTHAL_CALLBACKS
132 {
133 DWORD dwSize;
134 LPD3DNTHAL_CONTEXTCREATECB ContextCreate;
135 LPD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
136 LPD3DNTHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
137 LPD3DNTHAL_SCENECAPTURECB SceneCapture;
138 LPVOID dwReserved10;
139 LPVOID dwReserved11;
140 LPVOID dwReserved22;
141 LPVOID dwReserved23;
142 ULONG_PTR dwReserved;
143 LPD3DNTHAL_TEXTURECREATECB TextureCreate;
144 LPD3DNTHAL_TEXTUREDESTROYCB TextureDestroy;
145 LPD3DNTHAL_TEXTURESWAPCB TextureSwap;
146 LPD3DNTHAL_TEXTUREGETSURFCB TextureGetSurf;
147 LPVOID dwReserved12;
148 LPVOID dwReserved13;
149 LPVOID dwReserved14;
150 LPVOID dwReserved15;
151 LPVOID dwReserved16;
152 LPVOID dwReserved17;
153 LPVOID dwReserved18;
154 LPVOID dwReserved19;
155 LPVOID dwReserved20;
156 LPVOID dwReserved21;
157 LPVOID dwReserved24;
158 ULONG_PTR dwReserved0;
159 ULONG_PTR dwReserved1;
160 ULONG_PTR dwReserved2;
161 ULONG_PTR dwReserved3;
162 ULONG_PTR dwReserved4;
163 ULONG_PTR dwReserved5;
164 ULONG_PTR dwReserved6;
165 ULONG_PTR dwReserved7;
166 ULONG_PTR dwReserved8;
167 ULONG_PTR dwReserved9;
168 } D3DNTHAL_CALLBACKS, *LPD3DNTHAL_CALLBACKS;
169
170 typedef DWORD (APIENTRY *LPD3DNTHAL_SETRENDERTARGETCB)(LPD3DNTHAL_SETRENDERTARGETDATA);
171
172 typedef struct _D3DNTHAL_CALLBACKS2
173 {
174 DWORD dwSize;
175 DWORD dwFlags;
176
177 LPD3DNTHAL_SETRENDERTARGETCB SetRenderTarget;
178 LPVOID dwReserved1;
179 LPVOID dwReserved2;
180 LPVOID dwReserved3;
181 LPVOID dwReserved4;
182 } D3DNTHAL_CALLBACKS2, *LPD3DNTHAL_CALLBACKS2;
183
184 typedef DWORD (APIENTRY *LPD3DNTHAL_CLEAR2CB)(LPD3DNTHAL_CLEAR2DATA);
185 typedef DWORD (APIENTRY *LPD3DNTHAL_VALIDATETEXTURESTAGESTATECB)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
186 typedef DWORD (APIENTRY *LPD3DNTHAL_DRAWPRIMITIVES2CB)(LPD3DNTHAL_DRAWPRIMITIVES2DATA);
187
188 typedef struct _D3DNTHAL_CALLBACKS3
189 {
190 DWORD dwSize;
191 DWORD dwFlags;
192
193 LPD3DNTHAL_CLEAR2CB Clear2;
194 LPVOID lpvReserved;
195 LPD3DNTHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
196 LPD3DNTHAL_DRAWPRIMITIVES2CB DrawPrimitives2;
197 } D3DNTHAL_CALLBACKS3, *LPD3DNTHAL_CALLBACKS3;
198
199
200 typedef struct _D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA
201 {
202 ULONG_PTR dwhContext;
203 DWORD dwFlags;
204 ULONG_PTR dwReserved;
205 DWORD dwNumPasses;
206 HRESULT ddrval;
207 } D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA, FAR *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
208
209 typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA
210 {
211 ULONG_PTR dwhContext;
212 DWORD dwFlags;
213 DWORD dwVertexType;
214 PDD_SURFACE_LOCAL lpDDCommands;
215 DWORD dwCommandOffset;
216 DWORD dwCommandLength;
217 union
218 {
219 PDD_SURFACE_LOCAL lpDDVertex;
220 LPVOID lpVertices;
221 };
222 DWORD dwVertexOffset;
223 DWORD dwVertexLength;
224 DWORD dwReqVertexBufSize;
225 DWORD dwReqCommandBufSize;
226 LPDWORD lpdwRStates;
227 union
228 {
229 DWORD dwVertexSize;
230 HRESULT ddrval;
231 };
232 DWORD dwErrorOffset;
233 } D3DNTHAL_DRAWPRIMITIVES2DATA, FAR *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
234
235 #ifdef __cplusplus
236 } /* extern "C" */
237 #endif
238
239 #endif /* __DDK_D3DNTHAL_H */