add win64 D3D9 headers
[xonotic/xonotic.git] / misc / builddeps / dp.win64 / include / 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 #ifndef _D3DHAL_H_
23 #define _D3DHAL_H_
24
25 #include <_mingw_dxhelper.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 #include <d3d.h>
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   WINBOOL               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 } D3DHAL_DP2OPERATION;
352
353 /* point primitives */
354
355 typedef struct _D3DHAL_POINTS {
356   WORD wCount;
357   WORD wVStart;
358 } D3DHAL_DP2POINTS,*LPD3DHAL_DP2POINTS;
359
360 /* line primitives */
361
362 typedef struct _D3DHAL_DP2STARTVERTEX {
363   WORD wVStart;
364 } D3DHAL_DP2STARTVERTEX,*LPD3DHAL_DP2STARTVERTEX;
365
366 typedef struct _D3DHAL_DP2LINELIST {
367   WORD wVStart;
368 } D3DHAL_DP2LINELIST,*LPD3DHAL_DP2LINELIST;
369
370 typedef struct _D3DHAL_DP2INDEXEDLINELIST {
371   WORD wV1;
372   WORD wV2;
373 } D3DHAL_DP2INDEXEDLINELIST,*LPD3DHAL_DP2INDEXEDLINELIST;
374
375 typedef struct _D3DHAL_DP2LINESTRIP {
376   WORD wVStart;
377 } D3DHAL_DP2LINESTRIP,*LPD3DHAL_DP2LINESTRIP;
378
379 typedef struct _D3DHAL_DP2INDEXEDLINESTRIP {
380   WORD wV[2];
381 } D3DHAL_DP2INDEXEDLINESTRIP,*LPD3DHAL_DP2INDEXEDLINESTRIP;
382
383 /* triangle primitives */
384
385 typedef struct _D3DHAL_DP2TRIANGLELIST {
386   WORD wVStart;
387 } D3DHAL_DP2TRIANGLELIST,*LPD3DHAL_DP2TRIANGLELIST;
388
389 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST {
390   WORD wV1;
391   WORD wV2;
392   WORD wV3;
393   WORD wFlags;
394 } D3DHAL_DP2INDEXEDTRIANGLELIST,*LPD3DHAL_DP2INDEXEDTRIANGLELIST;
395
396 typedef struct _D3DHAL_DP2INDEXEDTRIANGLELIST2 {
397   WORD wV1;
398   WORD wV2;
399   WORD wV3;
400 } D3DHAL_DP2INDEXEDTRIANGLELIST2,*LPD3DHAL_DP2INDEXEDTRIANGLELIST2;
401
402 typedef struct _D3DHAL_DP2TRIANGLESTRIP {
403   WORD wVStart;
404 } D3DHAL_DP2TRIANGLESTRIP,*LPD3DHAL_DP2TRIANGLESTRIP;
405
406 typedef struct _D3DHAL_DP2INDEXEDTRIANGLESTRIP {
407   WORD wV[3];
408 } D3DHAL_DP2INDEXEDTRIANGLESTRIP,*LPD3DHAL_DP2INDEXEDTRIANGLESTRIP;
409
410 typedef struct _D3DHAL_DP2TRIANGLEFAN {
411   WORD wVStart;
412 } D3DHAL_DP2TRIANGLEFAN,*LPD3DHAL_DP2TRIANGLEFAN;
413
414 typedef struct _D3DHAL_DP2INDEXEDTRIANGLEFAN {
415   WORD wV[3];
416 } D3DHAL_DP2INDEXEDTRIANGLEFAN,*LPD3DHAL_DP2INDEXEDTRIANGLEFAN;
417
418 typedef struct _D3DHAL_DP2TRIANGLEFAN_IMM {
419   DWORD dwEdgeFlags;
420 } D3DHAL_DP2TRIANGLEFAN_IMM,*LPD3DHAL_DP2TRIANGLEFAN_IMM;
421
422 /* render states */
423 typedef struct _D3DHAL_DP2RENDERSTATE {
424   D3DRENDERSTATETYPE    RenderState;
425   union {
426     D3DVALUE dvState;
427     DWORD dwState;
428   } DUMMYUNIONNAME;
429 } D3DHAL_DP2RENDERSTATE,*LPD3DHAL_DP2RENDERSTATE;
430
431 typedef struct _D3DHAL_DP2TEXTURESTAGESTATE {
432   WORD  wStage;
433   WORD  TSState;
434   DWORD dwValue;
435 } D3DHAL_DP2TEXTURESTAGESTATE,*LPD3DHAL_DP2TEXTURESTAGESTATE;
436
437 #define D3DTSS_TEXTUREMAP 0
438
439 typedef struct _D3DHAL_DP2VIEWPORTINFO {
440   DWORD dwX;
441   DWORD dwY;
442   DWORD dwWidth;
443   DWORD dwHeight;
444 } D3DHAL_DP2VIEWPORTINFO,*LPD3DHAL_DP2VIEWPORTINFO;
445
446 typedef struct _D3DHAL_DP2WINFO {
447   D3DVALUE dwWNear;
448   D3DVALUE dwWFar;
449 } D3DHAL_DP2WINFO,*LPD3DHAL_DP2WINFO;
450
451 typedef struct _D3DHAL_DP2SETPALETTE {
452   DWORD dwPaletteHandle;
453   DWORD dwPaletteFlags;
454   DWORD dwSurfaceHandle;
455 } D3DHAL_DP2SETPALETTE,*LPD3DHAL_DP2SETPALETTE;
456
457 typedef struct _D3DHAL_DP2UPDATEPALETTE {
458   DWORD dwPaletteHandle;
459   WORD  wStartIndex;
460   WORD  wNumEntries;
461 } D3DHAL_DP2UPDATEPALETTE,*LPD3DHAL_DP2UPDATEPALETTE;
462
463 typedef struct _D3DHAL_DP2ZRANGE {
464   D3DVALUE dvMinZ;
465   D3DVALUE dvMaxZ;
466 } D3DHAL_DP2ZRANGE,*LPD3DHAL_DP2ZRANGE;
467
468 typedef D3DMATERIAL7 D3DHAL_DP2SETMATERIAL,*LPD3DHAL_DP2SETMATERIAL;
469
470 typedef struct _D3DHAL_DP2SETLIGHT {
471   DWORD dwIndex;
472   DWORD dwDataType;
473 } D3DHAL_DP2SETLIGHT,*LPD3DHAL_DP2SETLIGHT;
474
475 #define D3DHAL_SETLIGHT_ENABLE  0
476 #define D3DHAL_SETLIGHT_DISABLE 1
477 #define D3DHAL_SETLIGHT_DATA    2
478
479 typedef struct _D3DHAL_DP2CREATELIGHT {
480   DWORD dwIndex;
481 } D3DHAL_DP2CREATELIGHT,*LPD3DHAL_DP2CREATELIGHT;
482
483 typedef struct _D3DHAL_DP2SETTRANSFORM {
484   D3DTRANSFORMSTATETYPE xfrmType;
485   D3DMATRIX             matrix;
486 } D3DHAL_DP2SETTRANSFORM,*LPD3DHAL_DP2SETTRANSFORM;
487
488 typedef struct _D3DHAL_DP2TEXBLT {
489   DWORD dwDDDestSurface;
490   DWORD dwDDSrcSurface;
491   POINT pDest;
492   RECTL rSrc;
493   DWORD dwFlags;
494 } D3DHAL_DP2TEXBLT,*LPD3DHAL_DP2TEXBLT;
495
496 typedef struct _D3DHAL_DP2STATESET {
497   DWORD               dwOperation;
498   DWORD               dwParam;
499   D3DSTATEBLOCKTYPE   sbType;
500 } D3DHAL_DP2STATESET,*LPD3DHAL_DP2STATESET;
501
502 #define D3DHAL_STATESETBEGIN    0
503 #define D3DHAL_STATESETEND      1
504 #define D3DHAL_STATESETDELETE   2
505 #define D3DHAL_STATESETEXECUTE  3
506 #define D3DHAL_STATESETCAPTURE  4
507
508 typedef struct _D3DHAL_DP2SETPRIORITY {
509   DWORD dwDDSurface;
510   DWORD dwPriority;
511 } D3DHAL_DP2SETPRIORITY,*LPD3DHAL_DP2SETPRIORITY;
512
513 typedef struct _D3DHAL_DP2SETRENDERTARGET {
514   DWORD hRenderTarget;
515   DWORD hZBuffer;
516 } D3DHAL_DP2SETRENDERTARGET,*LPD3DHAL_DP2SETRENDERTARGET;
517
518 typedef struct _D3DHAL_DP2CLEAR {
519   DWORD         dwFlags;
520   DWORD         dwFillColor;
521   D3DVALUE      dvFillDepth;
522   DWORD         dwFillStencil;
523   RECT          Rects[1];
524 } D3DHAL_DP2CLEAR,*LPD3DHAL_DP2CLEAR;
525
526 typedef struct _D3DHAL_DP2SETTEXLOD {
527   DWORD dwDDSurface;
528   DWORD dwLOD;
529 } D3DHAL_DP2SETTEXLOD,*LPD3DHAL_DP2SETTEXLOD;
530
531 #ifdef __cplusplus
532 } /* extern "C" */
533 #endif
534
535 #endif /* _D3DHAL_H_ */