update d3dhal.h it need be rewriten it does not contain all info we need.
[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_RESERVED0 = 4,
308 D3DDP2OP_RENDERSTATE = 8,
309 D3DDP2OP_LINELIST = 15,
310 D3DDP2OP_LINESTRIP = 16,
311 D3DDP2OP_INDEXEDLINESTRIP = 17,
312 D3DDP2OP_TRIANGLELIST = 18,
313 D3DDP2OP_TRIANGLESTRIP = 19,
314 D3DDP2OP_INDEXEDTRIANGLESTRIP = 20,
315 D3DDP2OP_TRIANGLEFAN = 21,
316 D3DDP2OP_INDEXEDTRIANGLEFAN = 22,
317 D3DDP2OP_TRIANGLEFAN_IMM = 23,
318 D3DDP2OP_LINELIST_IMM = 24,
319 D3DDP2OP_TEXTURESTAGESTATE = 25,
320 D3DDP2OP_INDEXEDTRIANGLELIST2 = 26,
321 D3DDP2OP_INDEXEDLINELIST2 = 27,
322 D3DDP2OP_VIEWPORTINFO = 28,
323 D3DDP2OP_WINFO = 29,
324 /* pre-DirectX 7 interfaces */
325 D3DDP2OP_SETPALETTE = 30,
326 D3DDP2OP_UPDATEPALETTE = 31,
327 /* DirectX 7 interfaces */
328 D3DDP2OP_ZRANGE = 32,
329 D3DDP2OP_SETMATERIAL = 33,
330 D3DDP2OP_SETLIGHT = 34,
331 D3DDP2OP_CREATELIGHT = 35,
332 D3DDP2OP_SETTRANSFORM = 36,
333 D3DDP2OP_EXT = 37,
334 D3DDP2OP_TEXBLT = 38,
335 D3DDP2OP_STATESET = 39,
336 D3DDP2OP_SETPRIORITY = 40,
337 /* all interfaces */
338 D3DDP2OP_SETRENDERTARGET = 41,
339 D3DDP2OP_CLEAR = 42,
340 /* DirectX 7 interfaces */
341 D3DDP2OP_SETTEXLOD = 43,
342 D3DPP2OP_SETCLIPPLANE = 44
343 } D3DHAL_DP2OPERATION;
344
345 /* point primitives */
346
347 typedef struct _D3DHAL_POINTS {
348 WORD wCount;
349 WORD wVStart;
350 } D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
351
352 /* line primitives */
353
354 typedef struct _D3DHAL_DP2STARTVERTEX {
355 WORD wVStart;
356 } D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
357
358 typedef struct _D3DHAL_DP2LINELIST {
359 WORD wVStart;
360 } D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
361
362 typedef struct _D3DHAL_DP2INDEXEDLINELIST {
363 WORD wV1;
364 WORD wV2;
365 } D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
366
367 typedef struct _D3DHAL_DP2LINESTRIP {
368 WORD wVStart;
369 } D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
370
371 typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
372 WORD wV[2];
373 } D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
374
375 /* triangle primitives */
376
377 typedef struct _D3DHAL_DP2TRIANGLELIST {
378 WORD wVStart;
379 } D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
380
381 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
382 WORD wV1;
383 WORD wV2;
384 WORD wV3;
385 WORD wFlags;
386 } D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
387
388 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
389 WORD wV1;
390 WORD wV2;
391 WORD wV3;
392 } D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
393
394 typedef struct _D3DHAL_DP2TRIANGLESTRIP {
395 WORD wVStart;
396 } D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
397
398 typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
399 WORD wV[3];
400 } D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
401
402 typedef struct _D3DHAL_DP2TRIANGLEFAN {
403 WORD wVStart;
404 } D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
405
406 typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
407 WORD wV[3];
408 } D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
409
410 typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
411 DWORD dwEdgeFlags;
412 } D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
413
414 /* render states */
415 typedef struct _D3DHAL_DP2RENDERSTATE {
416 D3DRENDERSTATETYPE RenderState;
417 union {
418 D3DVALUE dvState;
419 DWORD dwState;
420 } DUMMYUNIONNAME;
421 } D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
422
423 typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
424 WORD wStage;
425 WORD TSState;
426 DWORD dwValue;
427 } D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
428
429 #define D3DTSS_TEXTUREMAP 0
430
431 typedef struct _D3DHAL_DP2VIEWPORTINFO {
432 DWORD dwX;
433 DWORD dwY;
434 DWORD dwWidth;
435 DWORD dwHeight;
436 } D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
437
438 typedef struct _D3DHAL_DP2WINFO {
439 D3DVALUE dwWNear;
440 D3DVALUE dwWFar;
441 } D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
442
443 typedef struct _D3DHAL_DP2SETPALETTE {
444 DWORD dwPaletteHandle;
445 DWORD dwPaletteFlags;
446 DWORD dwSurfaceHandle;
447 } D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
448
449 typedef struct _D3DHAL_DP2UPDATEPALETTE {
450 DWORD dwPaletteHandle;
451 WORD wStartIndex;
452 WORD wNumEntries;
453 } D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
454
455 typedef struct _D3DHAL_DP2ZRANGE {
456 D3DVALUE dvMinZ;
457 D3DVALUE dvMaxZ;
458 } D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
459
460 typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
461
462 typedef struct _D3DHAL_DP2SETLIGHT {
463 DWORD dwIndex;
464 DWORD dwDataType;
465 } D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
466
467 #define D3DHAL_SETLIGHT_ENABLE 0
468 #define D3DHAL_SETLIGHT_DISABLE 1
469 #define D3DHAL_SETLIGHT_DATA 2
470
471 typedef struct _D3DHAL_DP2CREATELIGHT {
472 DWORD dwIndex;
473 } D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
474
475 typedef struct _D3DHAL_DP2SETTRANSFORM {
476 D3DTRANSFORMSTATETYPE xfrmType;
477 D3DMATRIX matrix;
478 } D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
479
480 typedef struct _D3DHAL_DP2TEXBLT {
481 DWORD dwDDDestSurface;
482 DWORD dwDDSrcSurface;
483 POINT pDest;
484 RECTL rSrc;
485 DWORD dwFlags;
486 } D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
487
488 typedef struct _D3DHAL_DP2STATESET {
489 DWORD dwOperation;
490 DWORD dwParam;
491 D3DSTATEBLOCKTYPE sbType;
492 } D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
493
494 #define D3DHAL_STATESETBEGIN 0
495 #define D3DHAL_STATESETEND 1
496 #define D3DHAL_STATESETDELETE 2
497 #define D3DHAL_STATESETEXECUTE 3
498 #define D3DHAL_STATESETCAPTURE 4
499
500 typedef struct _D3DHAL_DP2SETPRIORITY {
501 DWORD dwDDSurface;
502 DWORD dwPriority;
503 } D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
504
505 typedef struct _D3DHAL_DP2SETRENDERTARGET {
506 DWORD hRenderTarget;
507 DWORD hZBuffer;
508 } D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
509
510 typedef struct _D3DHAL_DP2CLEAR {
511 DWORD dwFlags;
512 DWORD dwFillColor;
513 D3DVALUE dvFillDepth;
514 DWORD dwFillStencil;
515 RECT Rects[1];
516 } D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
517
518 typedef struct _D3DHAL_DP2SETTEXLOD {
519 DWORD dwDDSurface;
520 DWORD dwLOD;
521 } D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
522
523 #ifdef __cplusplus
524 } /* extern "C" */
525 #endif
526
527 #endif /* _D3DHAL_H_ */