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