[DDK]
[reactos.git] / reactos / include / psdk / 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 __GNU_EXTENSION union {
25 PDD_DIRECTDRAW_GLOBAL lpDDGbl;
26 PDD_DIRECTDRAW_LOCAL lpDDLcl;
27 };
28 __GNU_EXTENSION union {
29 PDD_SURFACE_LOCAL lpDDS;
30 PDD_SURFACE_LOCAL lpDDSLcl;
31 };
32 __GNU_EXTENSION union {
33 PDD_SURFACE_LOCAL lpDDSZ;
34 PDD_SURFACE_LOCAL lpDDSZLcl;
35 };
36 DWORD dwPID;
37 ULONG_PTR dwhContext;
38 HRESULT ddrval;
39 } D3DNTHAL_CONTEXTCREATEDATA, *LPD3DNTHAL_CONTEXTCREATEDATA;
40
41 typedef struct _D3DNTHAL_CONTEXTDESTROYDATA {
42 ULONG_PTR dwhContext;
43 HRESULT ddrval;
44 } D3DNTHAL_CONTEXTDESTROYDATA, *LPD3DNTHAL_CONTEXTDESTROYDATA;
45
46 typedef struct _D3DNTHAL_CONTEXTDESTROYALLDATA {
47 DWORD dwPID;
48 HRESULT ddrval;
49 } D3DNTHAL_CONTEXTDESTROYALLDATA, *LPD3DNTHAL_CONTEXTDESTROYALLDATA;
50
51 typedef struct _D3DNTHAL_SCENECAPTUREDATA {
52 ULONG_PTR dwhContext;
53 DWORD dwFlag;
54 HRESULT ddrval;
55 } D3DNTHAL_SCENECAPTUREDATA, *LPD3DNTHAL_SCENECAPTUREDATA;
56
57 typedef struct _D3DNTHAL_TEXTURECREATEDATA {
58 ULONG_PTR dwhContext;
59 HANDLE hDDS;
60 ULONG_PTR dwHandle;
61 HRESULT ddrval;
62 } D3DNTHAL_TEXTURECREATEDATA, *LPD3DNTHAL_TEXTURECREATEDATA;
63
64 typedef struct _D3DNTHAL_TEXTUREDESTROYDATA {
65 ULONG_PTR dwhContext;
66 ULONG_PTR dwHandle;
67 HRESULT ddrval;
68 } D3DNTHAL_TEXTUREDESTROYDATA, *LPD3DNTHAL_TEXTUREDESTROYDATA;
69
70 typedef struct _D3DNTHAL_TEXTURESWAPDATA {
71 ULONG_PTR dwhContext;
72 ULONG_PTR dwHandle1;
73 ULONG_PTR dwHandle2;
74 HRESULT ddrval;
75 } D3DNTHAL_TEXTURESWAPDATA, *LPD3DNTHAL_TEXTURESWAPDATA;
76
77 typedef struct _D3DNTHAL_TEXTUREGETSURFDATA {
78 ULONG_PTR dwhContext;
79 HANDLE hDDS;
80 ULONG_PTR dwHandle;
81 HRESULT ddrval;
82 } D3DNTHAL_TEXTUREGETSURFDATA, *LPD3DNTHAL_TEXTUREGETSURFDATA;
83
84 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTCREATECB)(LPD3DNTHAL_CONTEXTCREATEDATA);
85 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYCB)(LPD3DNTHAL_CONTEXTDESTROYDATA);
86 typedef DWORD (APIENTRY *LPD3DNTHAL_CONTEXTDESTROYALLCB)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
87 typedef DWORD (APIENTRY *LPD3DNTHAL_SCENECAPTURECB)(LPD3DNTHAL_SCENECAPTUREDATA);
88 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURECREATECB)(LPD3DNTHAL_TEXTURECREATEDATA);
89 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREDESTROYCB)(LPD3DNTHAL_TEXTUREDESTROYDATA);
90 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTURESWAPCB)(LPD3DNTHAL_TEXTURESWAPDATA);
91 typedef DWORD (APIENTRY *LPD3DNTHAL_TEXTUREGETSURFCB)(LPD3DNTHAL_TEXTUREGETSURFDATA);
92
93 typedef struct _D3DNTHALDeviceDesc_V1 {
94 DWORD dwSize;
95 DWORD dwFlags;
96 D3DCOLORMODEL dcmColorModel;
97 DWORD dwDevCaps;
98 D3DTRANSFORMCAPS dtcTransformCaps;
99 BOOL bClipping;
100 D3DLIGHTINGCAPS dlcLightingCaps;
101 D3DPRIMCAPS dpcLineCaps;
102 D3DPRIMCAPS dpcTriCaps;
103 DWORD dwDeviceRenderBitDepth;
104 DWORD dwDeviceZBufferBitDepth;
105 DWORD dwMaxBufferSize;
106 DWORD dwMaxVertexCount;
107 } D3DNTHALDEVICEDESC_V1, *LPD3DNTHALDEVICEDESC_V1;
108
109 typedef struct _D3DNTHAL_GLOBALDRIVERDATA {
110 DWORD dwSize;
111 D3DNTHALDEVICEDESC_V1 hwCaps;
112 DWORD dwNumVertices;
113 DWORD dwNumClipVertices;
114 DWORD dwNumTextureFormats;
115 LPDDSURFACEDESC lpTextureFormats;
116 } D3DNTHAL_GLOBALDRIVERDATA, *LPD3DNTHAL_GLOBALDRIVERDATA;
117
118 typedef struct _D3DNTHAL_CALLBACKS {
119 DWORD dwSize;
120 LPD3DNTHAL_CONTEXTCREATECB ContextCreate;
121 LPD3DNTHAL_CONTEXTDESTROYCB ContextDestroy;
122 LPD3DNTHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
123 LPD3DNTHAL_SCENECAPTURECB SceneCapture;
124 LPVOID dwReserved10;
125 LPVOID dwReserved11;
126 LPVOID dwReserved22;
127 LPVOID dwReserved23;
128 ULONG_PTR dwReserved;
129 LPD3DNTHAL_TEXTURECREATECB TextureCreate;
130 LPD3DNTHAL_TEXTUREDESTROYCB TextureDestroy;
131 LPD3DNTHAL_TEXTURESWAPCB TextureSwap;
132 LPD3DNTHAL_TEXTUREGETSURFCB TextureGetSurf;
133 LPVOID dwReserved12;
134 LPVOID dwReserved13;
135 LPVOID dwReserved14;
136 LPVOID dwReserved15;
137 LPVOID dwReserved16;
138 LPVOID dwReserved17;
139 LPVOID dwReserved18;
140 LPVOID dwReserved19;
141 LPVOID dwReserved20;
142 LPVOID dwReserved21;
143 LPVOID dwReserved24;
144 ULONG_PTR dwReserved0;
145 ULONG_PTR dwReserved1;
146 ULONG_PTR dwReserved2;
147 ULONG_PTR dwReserved3;
148 ULONG_PTR dwReserved4;
149 ULONG_PTR dwReserved5;
150 ULONG_PTR dwReserved6;
151 ULONG_PTR dwReserved7;
152 ULONG_PTR dwReserved8;
153 ULONG_PTR dwReserved9;
154 } D3DNTHAL_CALLBACKS, *LPD3DNTHAL_CALLBACKS;
155
156 typedef struct _D3DNTHAL_SETRENDERTARGETDATA {
157 ULONG_PTR dwhContext;
158 PDD_SURFACE_LOCAL lpDDS;
159 PDD_SURFACE_LOCAL lpDDSZ;
160 HRESULT ddrval;
161 } D3DNTHAL_SETRENDERTARGETDATA, *LPD3DNTHAL_SETRENDERTARGETDATA;
162
163 typedef DWORD (APIENTRY *LPD3DNTHAL_SETRENDERTARGETCB)(LPD3DNTHAL_SETRENDERTARGETDATA);
164
165 typedef struct _D3DNTHAL_CALLBACKS2 {
166 DWORD dwSize;
167 DWORD dwFlags;
168 LPD3DNTHAL_SETRENDERTARGETCB SetRenderTarget;
169 LPVOID dwReserved1;
170 LPVOID dwReserved2;
171 LPVOID dwReserved3;
172 LPVOID dwReserved4;
173 } D3DNTHAL_CALLBACKS2, *LPD3DNTHAL_CALLBACKS2;
174
175 typedef struct _D3DNTHAL_CLEAR2DATA {
176 ULONG_PTR dwhContext;
177 DWORD dwFlags;
178 DWORD dwFillColor;
179 D3DVALUE dvFillDepth;
180 DWORD dwFillStencil;
181 LPD3DRECT lpRects;
182 DWORD dwNumRects;
183 HRESULT ddrval;
184 } D3DNTHAL_CLEAR2DATA, FAR *LPD3DNTHAL_CLEAR2DATA;
185
186 typedef struct _D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA {
187 ULONG_PTR dwhContext;
188 DWORD dwFlags;
189 ULONG_PTR dwReserved;
190 DWORD dwNumPasses;
191 HRESULT ddrval;
192 } D3DNTHAL_VALIDATETEXTURESTAGESTATEDATA, FAR *LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA;
193
194 typedef struct _D3DNTHAL_DRAWPRIMITIVES2DATA {
195 ULONG_PTR dwhContext;
196 DWORD dwFlags;
197 DWORD dwVertexType;
198 PDD_SURFACE_LOCAL lpDDCommands;
199 DWORD dwCommandOffset;
200 DWORD dwCommandLength;
201 __GNU_EXTENSION union {
202 PDD_SURFACE_LOCAL lpDDVertex;
203 LPVOID lpVertices;
204 };
205 DWORD dwVertexOffset;
206 DWORD dwVertexLength;
207 DWORD dwReqVertexBufSize;
208 DWORD dwReqCommandBufSize;
209 LPDWORD lpdwRStates;
210 __GNU_EXTENSION union {
211 DWORD dwVertexSize;
212 HRESULT ddrval;
213 };
214 DWORD dwErrorOffset;
215 } D3DNTHAL_DRAWPRIMITIVES2DATA, FAR *LPD3DNTHAL_DRAWPRIMITIVES2DATA;
216
217 typedef DWORD (APIENTRY *LPD3DNTHAL_CLEAR2CB)(LPD3DNTHAL_CLEAR2DATA);
218 typedef DWORD (APIENTRY *LPD3DNTHAL_VALIDATETEXTURESTAGESTATECB)(LPD3DNTHAL_VALIDATETEXTURESTAGESTATEDATA);
219 typedef DWORD (APIENTRY *LPD3DNTHAL_DRAWPRIMITIVES2CB)(LPD3DNTHAL_DRAWPRIMITIVES2DATA);
220
221 typedef struct _D3DNTHAL_CALLBACKS3 {
222 DWORD dwSize;
223 DWORD dwFlags;
224 LPD3DNTHAL_CLEAR2CB Clear2;
225 LPVOID lpvReserved;
226 LPD3DNTHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
227 LPD3DNTHAL_DRAWPRIMITIVES2CB DrawPrimitives2;
228 } D3DNTHAL_CALLBACKS3, *LPD3DNTHAL_CALLBACKS3;
229
230 #ifdef __cplusplus
231 } /* extern "C" */
232 #endif
233
234 #endif /* __DDK_D3DNTHAL_H */