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