67a5e1781b94bc7ce368a0fd7d87d9d4c84eacb6
[reactos.git] / reactos / include / ddk / d3dhal.h
1 /*
2 * Direct3D driver interface
3 * (DirectX 7 version)
4 *
5 * Copyright (C) 2001 Ove Kaaven
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22 #ifndef _D3DHAL_H_
23 #define _D3DHAL_H_
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 #include <d3d.h>
30
31 #define D3DERR_COMMAND_UNPARSED 0x88760BB8;
32
33 /*****************************************************************************
34 * device info structures
35 */
36 typedef struct _D3DDeviceDesc_V1 {
37 DWORD dwSize;
38 DWORD dwFlags;
39 D3DCOLORMODEL dcmColorModel;
40 DWORD dwDevCaps;
41 D3DTRANSFORMCAPS dtcTransformCaps;
42 BOOL bClipping;
43 D3DLIGHTINGCAPS dlcLightingCaps;
44 D3DPRIMCAPS dpcLineCaps;
45 D3DPRIMCAPS dpcTriCaps;
46 DWORD dwDeviceRenderBitDepth;
47 DWORD dwDeviceZBufferBitDepth;
48 DWORD dwMaxBufferSize;
49 DWORD dwMaxVertexCount;
50 } D3DDEVICEDESC_V1,*LPD3DDEVICEDESC_V1;
51
52 /* this is to allow keeping the bulk of our OpenGL code out of x11drv */
53 #define D3DDD_WINE_OPENGL_DEVICE 0x00008000
54
55 typedef struct _D3DHAL_GLOBALDRIVERDATA {
56 DWORD dwSize;
57 D3DDEVICEDESC_V1 hwCaps;
58 DWORD dwNumVertices;
59 DWORD dwNumClipVertices;
60 DWORD dwNumTextureFormats;
61 LPDDSURFACEDESC lpTextureFormats;
62 } D3DHAL_GLOBALDRIVERDATA,*LPD3DHAL_GLOBALDRIVERDATA;
63
64 typedef struct _D3DHAL_D3DEXTENDEDCAPS {
65 DWORD dwSize;
66 /* DirectX 5 */
67 DWORD dwMinTextureWidth, dwMaxTextureWidth;
68 DWORD dwMinTextureHeight, dwMaxTextureHeight;
69 DWORD dwMinStippleWidth, dwMaxStippleWidth;
70 DWORD dwMinStippleHeight, dwMaxStippleHeight;
71 /* DirectX 6 */
72 DWORD dwMaxTextureRepeat;
73 DWORD dwMaxTextureAspectRatio;
74 DWORD dwMaxAnisotropy;
75 D3DVALUE dvGuardBandLeft;
76 D3DVALUE dvGuardBandTop;
77 D3DVALUE dvGuardBandRight;
78 D3DVALUE dvGuardBandBottom;
79 D3DVALUE dvExtentsAdjust;
80 DWORD dwStencilCaps;
81 DWORD dwFVFCaps;
82 DWORD dwTextureOpCaps;
83 WORD wMaxTextureBlendStages;
84 WORD wMaxSimultaneousTextures;
85 /* DirectX 7 */
86 DWORD dwMaxActiveLights;
87 D3DVALUE dvMaxVertexW;
88 WORD wMaxUserClipPlanes;
89 WORD wMaxVertexBlendMatrices;
90 DWORD dwVertexProcessingCaps;
91 DWORD dwReserved1;
92 DWORD dwReserved2;
93 DWORD dwReserved3;
94 DWORD dwReserved4;
95 } D3DHAL_D3DEXTENDEDCAPS,*LPD3DHAL_D3DEXTENDEDCAPS;
96
97 /*****************************************************************************
98 * d3d->driver callbacks
99 */
100 typedef struct _D3DHAL_CONTEXTCREATEDATA *LPD3DHAL_CONTEXTCREATEDATA;
101 typedef struct _D3DHAL_CONTEXTDESTROYDATA *LPD3DHAL_CONTEXTDESTROYDATA;
102 typedef struct _D3DHAL_CONTEXTDESTROYALLDATA *LPD3DHAL_CONTEXTDESTROYALLDATA;
103 typedef struct _D3DHAL_SCENECAPTUREDATA *LPD3DHAL_SCENECAPTUREDATA;
104 typedef struct _D3DHAL_RENDERSTATEDATA *LPD3DHAL_RENDERSTATEDATA;
105 typedef struct _D3DHAL_RENDERPRIMITIVEDATA *LPD3DHAL_RENDERPRIMITIVEDATA;
106 typedef struct _D3DHAL_TEXTURECREATEDATA *LPD3DHAL_TEXTURECREATEDATA;
107 typedef struct _D3DHAL_TEXTUREDESTROYDATA *LPD3DHAL_TEXTUREDESTROYDATA;
108 typedef struct _D3DHAL_TEXTURESWAPDATA *LPD3DHAL_TEXTURESWAPDATA;
109 typedef struct _D3DHAL_TEXTUREGETSURFDATA *LPD3DHAL_TEXTUREGETSURFDATA;
110 typedef struct _D3DHAL_GETSTATEDATA *LPD3DHAL_GETSTATEDATA;
111
112 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTCREATECB) (LPD3DHAL_CONTEXTCREATEDATA);
113 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYCB) (LPD3DHAL_CONTEXTDESTROYDATA);
114 typedef DWORD (PASCAL *LPD3DHAL_CONTEXTDESTROYALLCB)(LPD3DHAL_CONTEXTDESTROYALLDATA);
115 typedef DWORD (PASCAL *LPD3DHAL_SCENECAPTURECB) (LPD3DHAL_SCENECAPTUREDATA);
116 typedef DWORD (PASCAL *LPD3DHAL_RENDERSTATECB) (LPD3DHAL_RENDERSTATEDATA);
117 typedef DWORD (PASCAL *LPD3DHAL_RENDERPRIMITIVECB) (LPD3DHAL_RENDERPRIMITIVEDATA);
118 typedef DWORD (PASCAL *LPD3DHAL_TEXTURECREATECB) (LPD3DHAL_TEXTURECREATEDATA);
119 typedef DWORD (PASCAL *LPD3DHAL_TEXTUREDESTROYCB) (LPD3DHAL_TEXTUREDESTROYDATA);
120 typedef DWORD (PASCAL *LPD3DHAL_TEXTURESWAPCB) (LPD3DHAL_TEXTURESWAPDATA);
121 typedef DWORD (PASCAL *LPD3DHAL_TEXTUREGETSURFCB) (LPD3DHAL_TEXTUREGETSURFDATA);
122 typedef DWORD (PASCAL *LPD3DHAL_GETSTATECB) (LPD3DHAL_GETSTATEDATA);
123
124 typedef struct _D3DHAL_CALLBACKS {
125 DWORD dwSize;
126 LPD3DHAL_CONTEXTCREATECB ContextCreate;
127 LPD3DHAL_CONTEXTDESTROYCB ContextDestroy;
128 LPD3DHAL_CONTEXTDESTROYALLCB ContextDestroyAll;
129 LPD3DHAL_SCENECAPTURECB SceneCapture;
130 LPVOID lpReserved10;
131 LPVOID lpReserved11;
132 LPD3DHAL_RENDERSTATECB RenderState;
133 LPD3DHAL_RENDERPRIMITIVECB RenderPrimitive;
134 DWORD dwReserved;
135 LPD3DHAL_TEXTURECREATECB TextureCreate;
136 LPD3DHAL_TEXTUREDESTROYCB TextureDestroy;
137 LPD3DHAL_TEXTURESWAPCB TextureSwap;
138 LPD3DHAL_TEXTUREGETSURFCB TextureGetSurf;
139 /* now why did MS create CALLBACKS2 and CALLBACKS3 structures if
140 * all these reserved fields were available? we may never know */
141 LPVOID lpReserved12;
142 LPVOID lpReserved13;
143 LPVOID lpReserved14;
144 LPVOID lpReserved15;
145 LPVOID lpReserved16;
146 LPVOID lpReserved17;
147 LPVOID lpReserved18;
148 LPVOID lpReserved19;
149 LPVOID lpReserved20;
150 LPVOID lpReserved21;
151 LPD3DHAL_GETSTATECB GetState;
152 DWORD dwReserved0;
153 DWORD dwReserved1;
154 DWORD dwReserved2;
155 DWORD dwReserved3;
156 DWORD dwReserved4;
157 DWORD dwReserved5;
158 DWORD dwReserved6;
159 DWORD dwReserved7;
160 DWORD dwReserved8;
161 DWORD dwReserved9;
162 } D3DHAL_CALLBACKS,*LPD3DHAL_CALLBACKS;
163
164 typedef struct _D3DHAL_SETRENDERTARGETDATA *LPD3DHAL_SETRENDERTARGETDATA;
165 typedef struct _D3DHAL_CLEARDATA *LPD3DHAL_CLEARDATA;
166 typedef struct _D3DHAL_DRAWONEPRIMITIVEDATA *LPD3DHAL_DRAWONEPRIMITIVEDATA;
167 typedef struct _D3DHAL_DRAWONEINDEXEDPRIMITIVEDATA *LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA;
168 typedef struct _D3DHAL_DRAWPRIMITIVESDATA *LPD3DHAL_DRAWPRIMITIVESDATA;
169
170 typedef DWORD (PASCAL *LPD3DHAL_SETRENDERTARGETCB) (LPD3DHAL_SETRENDERTARGETDATA);
171 typedef DWORD (PASCAL *LPD3DHAL_CLEARCB) (LPD3DHAL_CLEARDATA);
172 typedef DWORD (PASCAL *LPD3DHAL_DRAWONEPRIMITIVECB) (LPD3DHAL_DRAWONEPRIMITIVEDATA);
173 typedef DWORD (PASCAL *LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB)(LPD3DHAL_DRAWONEINDEXEDPRIMITIVEDATA);
174 typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVESCB) (LPD3DHAL_DRAWPRIMITIVESDATA);
175
176 typedef struct _D3DHAL_CALLBACKS2 {
177 DWORD dwSize;
178 DWORD dwFlags;
179 LPD3DHAL_SETRENDERTARGETCB SetRenderTarget;
180 LPD3DHAL_CLEARCB Clear;
181 LPD3DHAL_DRAWONEPRIMITIVECB DrawOnePrimitive;
182 LPD3DHAL_DRAWONEINDEXEDPRIMITIVECB DrawOneIndexedPrimitive;
183 LPD3DHAL_DRAWPRIMITIVESCB DrawPrimitives;
184 } D3DHAL_CALLBACKS2,*LPD3DHAL_CALLBACKS2;
185
186 typedef struct _D3DHAL_CLEAR2DATA *LPD3DHAL_CLEAR2DATA;
187 typedef struct _D3DHAL_VALIDATETEXTURESTAGESTATEDATA *LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA;
188 typedef struct _D3DHAL_DRAWPRIMITIVES2DATA *LPD3DHAL_DRAWPRIMITIVES2DATA;
189
190 typedef DWORD (PASCAL *LPD3DHAL_CLEAR2CB) (LPD3DHAL_CLEAR2DATA);
191 typedef DWORD (PASCAL *LPD3DHAL_VALIDATETEXTURESTAGESTATECB)(LPD3DHAL_VALIDATETEXTURESTAGESTATEDATA);
192 typedef DWORD (PASCAL *LPD3DHAL_DRAWPRIMITIVES2CB) (LPD3DHAL_DRAWPRIMITIVES2DATA);
193
194 typedef struct _D3DHAL_CALLBACKS3 {
195 DWORD dwSize;
196 DWORD dwFlags;
197 LPD3DHAL_CLEAR2CB Clear2;
198 LPVOID lpvReserved;
199 LPD3DHAL_VALIDATETEXTURESTAGESTATECB ValidateTextureStageState;
200 LPD3DHAL_DRAWPRIMITIVES2CB DrawPrimitives2;
201 } D3DHAL_CALLBACKS3,*LPD3DHAL_CALLBACKS3;
202
203 /*****************************************************************************
204 * parameter structures
205 */
206 typedef struct _D3DHAL_CONTEXTCREATEDATA {
207 union {
208 LPDDRAWI_DIRECTDRAW_GBL lpDDGbl; /* pre-DirectX 7 */
209 LPDDRAWI_DIRECTDRAW_LCL lpDDLcl; /* DirectX 7 */
210 } DUMMYUNIONNAME1;
211 union {
212 LPDIRECTDRAWSURFACE lpDDS;
213 LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl; /* DirectX 7 */
214 } DUMMYUNIONNAME2;
215 union {
216 LPDIRECTDRAWSURFACE lpDDSZ;
217 LPDDRAWI_DDRAWSURFACE_LCL lpDDSZLcl; /* DirectX 7 */
218 } DUMMYUNIONNAME3;
219 union {
220 DWORD dwPID;
221 ULONG_PTR dwrstates;
222 } DUMMYUNIONNAME4;
223 ULONG_PTR dwhContext;
224 HRESULT ddrval;
225 } D3DHAL_CONTEXTCREATEDATA;
226
227 typedef struct _D3DHAL_CONTEXTDESTROYDATA {
228 ULONG_PTR dwhContext;
229 HRESULT ddrval;
230 } D3DHAL_CONTEXTDESTROYDATA;
231
232 typedef struct _D3DHAL_CONTEXTDESTROYALLDATA {
233 DWORD dwPID;
234 HRESULT ddrval;
235 } D3DHAL_CONTEXTDESTROYALLDATA;
236
237 typedef struct _D3DHAL_SCENECAPTUREDATA {
238 ULONG_PTR dwhContext;
239 DWORD dwFlag;
240 HRESULT ddrval;
241 } D3DHAL_SCENECAPTUREDATA;
242
243 #define D3DHAL_SCENE_CAPTURE_START 0x00000000
244 #define D3DHAL_SCENE_CAPTURE_END 0x00000001
245
246 typedef struct _D3DHAL_SETRENDERTARGETDATA {
247 ULONG_PTR dwhContext;
248 union {
249 LPDIRECTDRAWSURFACE lpDDS;
250 LPDDRAWI_DDRAWSURFACE_LCL lpDDSLcl;
251 } DUMMYUNIONNAME1;
252 union {
253 LPDIRECTDRAWSURFACE lpDDSZ;
254 LPDDRAWI_DDRAWSURFACE_LCL lpDDSZLcl;
255 } DUMMYUNIONNAME2;
256 HRESULT ddrval;
257 } D3DHAL_SETRENDERTARGETDATA;
258
259 typedef struct _D3DHAL_DRAWPRIMITIVES2DATA {
260 ULONG_PTR dwhContext;
261 DWORD dwFlags;
262 DWORD dwVertexType;
263 LPDDRAWI_DDRAWSURFACE_LCL lpDDCommands;
264 DWORD dwCommandOffset;
265 DWORD dwCommandLength;
266 union {
267 LPDDRAWI_DDRAWSURFACE_LCL lpDDVertex;
268 LPVOID lpVertices;
269 } DUMMYUNIONNAME1;
270 DWORD dwVertexOffset;
271 DWORD dwVertexLength;
272 DWORD dwReqVertexBufSize;
273 DWORD dwReqCommandBufSize;
274 LPDWORD lpdwRStates;
275 union {
276 DWORD dwVertexSize;
277 HRESULT ddrval;
278 } DUMMYUNIONNAME2;
279 DWORD dwErrorOffset;
280 } D3DHAL_DRAWPRIMITIVES2DATA;
281
282 #define D3DHALDP2_USERMEMVERTICES 0x00000001
283 #define D3DHALDP2_EXECUTEBUFFER 0x00000002
284 #define D3DHALDP2_SWAPVERTEXBUFFER 0x00000004
285 #define D3DHALDP2_SWAPCOMMANDBUFFER 0x00000008
286 #define D3DHALDP2_REQVERTEXBUFSIZE 0x00000010
287 #define D3DHALDP2_REQCOMMANDBUFSIZE 0x00000020
288 #define D3DHALDP2_VIDMEMVERTEXBUF 0x00000040
289 #define D3DHALDP2_VIDMEMCOMMANDBUF 0x00000080
290
291 /*****************************************************************************
292 * DrawPrimitives2 command structures
293 */
294 typedef struct _D3DHAL_DP2COMMAND {
295 BYTE bCommand;
296 BYTE bReserved;
297 union {
298 WORD wPrimitiveCount;
299 WORD wStateCount;
300 } DUMMYUNIONNAME;
301 } D3DHAL_DP2COMMAND,*LPD3DHAL_DP2COMMAND;
302
303 typedef enum _D3DHAL_DP2OPERATION {
304 D3DDP2OP_POINTS = 1,
305 D3DDP2OP_INDEXEDLINELIST = 2,
306 D3DDP2OP_INDEXEDTRIANGLELIST = 3,
307 D3DDP2OP_RENDERSTATE = 8,
308 D3DDP2OP_LINELIST = 15,
309 D3DDP2OP_LINESTRIP = 16,
310 D3DDP2OP_INDEXEDLINESTRIP = 17,
311 D3DDP2OP_TRIANGLELIST = 18,
312 D3DDP2OP_TRIANGLESTRIP = 19,
313 D3DDP2OP_INDEXEDTRIANGLESTRIP = 20,
314 D3DDP2OP_TRIANGLEFAN = 21,
315 D3DDP2OP_INDEXEDTRIANGLEFAN = 22,
316 D3DDP2OP_TRIANGLEFAN_IMM = 23,
317 D3DDP2OP_LINELIST_IMM = 24,
318 D3DDP2OP_TEXTURESTAGESTATE = 25,
319 D3DDP2OP_INDEXEDTRIANGLELIST2 = 26,
320 D3DDP2OP_INDEXEDLINELIST2 = 27,
321 D3DDP2OP_VIEWPORTINFO = 28,
322 D3DDP2OP_WINFO = 29,
323 /* pre-DirectX 7 interfaces */
324 D3DDP2OP_SETPALETTE = 30,
325 D3DDP2OP_UPDATEPALETTE = 31,
326 /* DirectX 7 interfaces */
327 D3DDP2OP_ZRANGE = 32,
328 D3DDP2OP_SETMATERIAL = 33,
329 D3DDP2OP_SETLIGHT = 34,
330 D3DDP2OP_CREATELIGHT = 35,
331 D3DDP2OP_SETTRANSFORM = 36,
332 D3DDP2OP_TEXBLT = 38,
333 D3DDP2OP_STATESET = 39,
334 D3DDP2OP_SETPRIORITY = 40,
335 /* all interfaces */
336 D3DDP2OP_SETRENDERTARGET = 41,
337 D3DDP2OP_CLEAR = 42,
338 /* DirectX 7 interfaces */
339 D3DDP2OP_SETTEXLOD = 43,
340 D3DPP2OP_SETCLIPPLANE = 44,
341 #if(DIRECT3D_VERSION >= 0x0800)
342 D3DDP2OP_CREATEVERTEXSHADER = 45,
343 D3DDP2OP_DELETEVERTEXSHADER = 46,
344 D3DDP2OP_SETVERTEXSHADER = 47,
345 D3DDP2OP_SETVERTEXSHADERCONST = 48,
346 D3DDP2OP_SETSTREAMSOURCE = 49,
347 D3DDP2OP_SETSTREAMSOURCEUM = 50,
348 D3DDP2OP_SETINDICES = 51,
349 D3DDP2OP_DRAWPRIMITIVE = 52,
350 D3DDP2OP_DRAWINDEXEDPRIMITIVE = 53,
351 D3DDP2OP_CREATEPIXELSHADER = 54,
352 D3DDP2OP_DELETEPIXELSHADER = 55,
353 D3DDP2OP_SETPIXELSHADER = 56,
354 D3DDP2OP_SETPIXELSHADERCONST = 57,
355 D3DDP2OP_CLIPPEDTRIANGLEFAN = 58,
356 D3DDP2OP_DRAWPRIMITIVE2 = 59,
357 D3DDP2OP_DRAWINDEXEDPRIMITIVE2= 60,
358 D3DDP2OP_DRAWRECTPATCH = 61,
359 D3DDP2OP_DRAWTRIPATCH = 62,
360 D3DDP2OP_VOLUMEBLT = 63,
361 D3DDP2OP_BUFFERBLT = 64,
362 D3DDP2OP_MULTIPLYTRANSFORM = 65,
363 D3DDP2OP_ADDDIRTYRECT = 66,
364 D3DDP2OP_ADDDIRTYBOX = 67,
365 #endif
366 #if(DIRECT3D_VERSION >= 0x0900)
367 D3DDP2OP_CREATEVERTEXSHADERDECL = 71,
368 D3DDP2OP_DELETEVERTEXSHADERDECL = 72,
369 D3DDP2OP_SETVERTEXSHADERDECL = 73,
370 D3DDP2OP_CREATEVERTEXSHADERFUNC = 74,
371 D3DDP2OP_DELETEVERTEXSHADERFUNC = 75,
372 D3DDP2OP_SETVERTEXSHADERFUNC = 76,
373 D3DDP2OP_SETVERTEXSHADERCONSTI = 77,
374 D3DDP2OP_SETSCISSORRECT = 79,
375 D3DDP2OP_SETSTREAMSOURCE2 = 80,
376 D3DDP2OP_BLT = 81,
377 D3DDP2OP_COLORFILL = 82,
378 D3DDP2OP_SETVERTEXSHADERCONSTB = 83,
379 D3DDP2OP_CREATEQUERY = 84,
380 D3DDP2OP_SETRENDERTARGET2 = 85,
381 D3DDP2OP_SETDEPTHSTENCIL = 86,
382 D3DDP2OP_RESPONSECONTINUE = 87,
383 D3DDP2OP_RESPONSEQUERY = 88,
384 D3DDP2OP_GENERATEMIPSUBLEVELS = 89,
385 D3DDP2OP_DELETEQUERY = 90,
386 D3DDP2OP_ISSUEQUERY = 91,
387 D3DDP2OP_SETPIXELSHADERCONSTI = 93,
388 D3DDP2OP_SETPIXELSHADERCONSTB = 94,
389 D3DDP2OP_SETSTREAMSOURCEFREQ = 95,
390 D3DDP2OP_SURFACEBLT = 96
391 #endif
392 } D3DHAL_DP2OPERATION;
393
394 /* point primitives */
395
396 typedef struct _D3DHAL_POINTS {
397 WORD wCount;
398 WORD wVStart;
399 } D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
400
401 /* line primitives */
402
403 typedef struct _D3DHAL_DP2STARTVERTEX {
404 WORD wVStart;
405 } D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
406
407 typedef struct _D3DHAL_DP2LINELIST {
408 WORD wVStart;
409 } D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
410
411 typedef struct _D3DHAL_DP2INDEXEDLINELIST {
412 WORD wV1;
413 WORD wV2;
414 } D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
415
416 typedef struct _D3DHAL_DP2LINESTRIP {
417 WORD wVStart;
418 } D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
419
420 typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
421 WORD wV[2];
422 } D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
423
424 /* triangle primitives */
425
426 typedef struct _D3DHAL_DP2TRIANGLELIST {
427 WORD wVStart;
428 } D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
429
430 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
431 WORD wV1;
432 WORD wV2;
433 WORD wV3;
434 WORD wFlags;
435 } D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
436
437 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
438 WORD wV1;
439 WORD wV2;
440 WORD wV3;
441 } D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
442
443 typedef struct _D3DHAL_DP2TRIANGLESTRIP {
444 WORD wVStart;
445 } D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
446
447 typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
448 WORD wV[3];
449 } D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
450
451 typedef struct _D3DHAL_DP2TRIANGLEFAN {
452 WORD wVStart;
453 } D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
454
455 typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
456 WORD wV[3];
457 } D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
458
459 typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
460 DWORD dwEdgeFlags;
461 } D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
462
463 /* render states */
464 typedef struct _D3DHAL_DP2RENDERSTATE {
465 D3DRENDERSTATETYPE RenderState;
466 union {
467 D3DVALUE dvState;
468 DWORD dwState;
469 } DUMMYUNIONNAME;
470 } D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
471
472 typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
473 WORD wStage;
474 WORD TSState;
475 DWORD dwValue;
476 } D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
477
478 #define D3DTSS_TEXTUREMAP 0
479
480 typedef struct _D3DHAL_DP2VIEWPORTINFO {
481 DWORD dwX;
482 DWORD dwY;
483 DWORD dwWidth;
484 DWORD dwHeight;
485 } D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
486
487 typedef struct _D3DHAL_DP2WINFO {
488 D3DVALUE dwWNear;
489 D3DVALUE dwWFar;
490 } D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
491
492 typedef struct _D3DHAL_DP2SETPALETTE {
493 DWORD dwPaletteHandle;
494 DWORD dwPaletteFlags;
495 DWORD dwSurfaceHandle;
496 } D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
497
498 typedef struct _D3DHAL_DP2UPDATEPALETTE {
499 DWORD dwPaletteHandle;
500 WORD wStartIndex;
501 WORD wNumEntries;
502 } D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
503
504 typedef struct _D3DHAL_DP2ZRANGE {
505 D3DVALUE dvMinZ;
506 D3DVALUE dvMaxZ;
507 } D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
508
509 typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
510
511 typedef struct _D3DHAL_DP2SETLIGHT {
512 DWORD dwIndex;
513 DWORD dwDataType;
514 } D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
515
516 #define D3DHAL_SETLIGHT_ENABLE 0
517 #define D3DHAL_SETLIGHT_DISABLE 1
518 #define D3DHAL_SETLIGHT_DATA 2
519
520 typedef struct _D3DHAL_DP2CREATELIGHT {
521 DWORD dwIndex;
522 } D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
523
524 typedef struct _D3DHAL_DP2SETTRANSFORM {
525 D3DTRANSFORMSTATETYPE xfrmType;
526 D3DMATRIX matrix;
527 } D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
528
529 typedef struct _D3DHAL_DP2TEXBLT {
530 DWORD dwDDDestSurface;
531 DWORD dwDDSrcSurface;
532 POINT pDest;
533 RECTL rSrc;
534 DWORD dwFlags;
535 } D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
536
537 typedef struct _D3DHAL_DP2STATESET {
538 DWORD dwOperation;
539 DWORD dwParam;
540 D3DSTATEBLOCKTYPE sbType;
541 } D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
542
543 #define D3DHAL_STATESETBEGIN 0
544 #define D3DHAL_STATESETEND 1
545 #define D3DHAL_STATESETDELETE 2
546 #define D3DHAL_STATESETEXECUTE 3
547 #define D3DHAL_STATESETCAPTURE 4
548
549 typedef struct _D3DHAL_DP2SETPRIORITY {
550 DWORD dwDDSurface;
551 DWORD dwPriority;
552 } D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
553
554 typedef struct _D3DHAL_DP2SETRENDERTARGET {
555 DWORD hRenderTarget;
556 DWORD hZBuffer;
557 } D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
558
559 typedef struct _D3DHAL_DP2CLEAR {
560 DWORD dwFlags;
561 DWORD dwFillColor;
562 D3DVALUE dvFillDepth;
563 DWORD dwFillStencil;
564 RECT Rects[1];
565 } D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
566
567 typedef struct _D3DHAL_DP2SETTEXLOD {
568 DWORD dwDDSurface;
569 DWORD dwLOD;
570 } D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
571
572 #ifdef __cplusplus
573 } /* extern "C" */
574 #endif
575
576 #endif /* _D3DHAL_H_ */