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