1 /* Direct3D private include file
2 * Copyright (c) 1998-2004 Lionel ULMER
3 * Copyright (c) 2002-2004 Christian Costa
5 * This file contains all the structure that are not exported
6 * through d3d.h and all common macros.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __GRAPHICS_WINE_D3D_PRIVATE_H
24 #define __GRAPHICS_WINE_D3D_PRIVATE_H
26 /* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES */
35 #define MAX_TEXTURES 8
38 #define HIGHEST_RENDER_STATE 152
39 #define HIGHEST_TEXTURE_STAGE_STATE 24
41 /*****************************************************************************
42 * Predeclare the interface implementation structures
44 typedef struct IDirect3DLightImpl IDirect3DLightImpl;
45 typedef struct IDirect3DMaterialImpl IDirect3DMaterialImpl;
46 typedef struct IDirect3DViewportImpl IDirect3DViewportImpl;
47 typedef struct IDirect3DExecuteBufferImpl IDirect3DExecuteBufferImpl;
48 typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl;
50 #include "ddraw_private.h"
52 typedef struct STATEBLOCKFLAGS {
53 BOOL render_state[HIGHEST_RENDER_STATE];
54 BOOL texture_stage_state[MAX_TEXTURES][HIGHEST_TEXTURE_STAGE_STATE];
57 typedef struct STATEBLOCK {
58 STATEBLOCKFLAGS set_flags;
59 DWORD render_state[HIGHEST_RENDER_STATE];
60 DWORD texture_stage_state[MAX_TEXTURES][HIGHEST_TEXTURE_STAGE_STATE];
64 /*****************************************************************************
65 * IDirect3DLight implementation structure
67 struct IDirect3DLightImpl
69 ICOM_VFIELD_MULTI(IDirect3DLight);
71 /* IDirect3DLight fields */
73 /* If this light is active for one viewport, put the viewport here */
74 IDirect3DViewportImpl *active_viewport;
81 /* Chained list used for adding / removing from viewports */
82 IDirect3DLightImpl *next;
84 /* Activation function */
85 void (*activate)(IDirect3DLightImpl*);
86 void (*desactivate)(IDirect3DLightImpl*);
87 void (*update)(IDirect3DLightImpl*);
90 /*****************************************************************************
91 * IDirect3DMaterial implementation structure
93 struct IDirect3DMaterialImpl
95 ICOM_VFIELD_MULTI(IDirect3DMaterial3);
96 ICOM_VFIELD_MULTI(IDirect3DMaterial2);
97 ICOM_VFIELD_MULTI(IDirect3DMaterial);
99 /* IDirect3DMaterial2 fields */
100 IDirectDrawImpl *d3d;
101 IDirect3DDeviceImpl *active_device;
105 void (*activate)(IDirect3DMaterialImpl* this);
108 /*****************************************************************************
109 * IDirect3DViewport implementation structure
111 struct IDirect3DViewportImpl
113 ICOM_VFIELD_MULTI(IDirect3DViewport3);
115 /* IDirect3DViewport fields */
116 IDirectDrawImpl *d3d;
117 /* If this viewport is active for one device, put the device here */
118 IDirect3DDeviceImpl *active_device;
129 /* Activation function */
130 void (*activate)(IDirect3DViewportImpl*);
132 /* Field used to chain viewports together */
133 IDirect3DViewportImpl *next;
136 IDirect3DLightImpl *lights;
138 /* Background material */
139 IDirect3DMaterialImpl *background;
142 /*****************************************************************************
143 * IDirect3DExecuteBuffer implementation structure
145 struct IDirect3DExecuteBufferImpl
147 ICOM_VFIELD_MULTI(IDirect3DExecuteBuffer);
149 /* IDirect3DExecuteBuffer fields */
150 IDirectDrawImpl *d3d;
151 IDirect3DDeviceImpl* d3ddev;
153 D3DEXECUTEBUFFERDESC desc;
156 /* This buffer will store the transformed vertices */
161 /* This flags is set to TRUE if we allocated ourselves the
165 void (*execute)(IDirect3DExecuteBufferImpl* this,
166 IDirect3DDeviceImpl* dev,
167 IDirect3DViewportImpl* vp);
170 /* Internal structure to store the state of the clipping planes */
171 typedef struct d3d7clippingplane
176 /*****************************************************************************
177 * IDirect3DDevice implementation structure
180 #define WORLDMAT_CHANGED (0x00000001 << 0)
181 #define VIEWMAT_CHANGED (0x00000001 << 1)
182 #define PROJMAT_CHANGED (0x00000001 << 2)
183 #define TEXMAT0_CHANGED (0x00000001 << 3)
184 #define TEXMAT1_CHANGED (0x00000001 << 4)
185 #define TEXMAT2_CHANGED (0x00000001 << 5)
186 #define TEXMAT3_CHANGED (0x00000001 << 6)
187 #define TEXMAT4_CHANGED (0x00000001 << 7)
188 #define TEXMAT5_CHANGED (0x00000001 << 8)
189 #define TEXMAT6_CHANGED (0x00000001 << 9)
190 #define TEXMAT7_CHANGED (0x00000001 << 10)
192 struct IDirect3DDeviceImpl
194 ICOM_VFIELD_MULTI(IDirect3DDevice7);
195 ICOM_VFIELD_MULTI(IDirect3DDevice3);
196 ICOM_VFIELD_MULTI(IDirect3DDevice2);
197 ICOM_VFIELD_MULTI(IDirect3DDevice);
200 /* Version of the Direct3D object from which the device has been created */
203 /* IDirect3DDevice fields */
204 IDirectDrawImpl *d3d;
205 IDirectDrawSurfaceImpl *surface;
207 IDirect3DViewportImpl *viewport_list;
208 IDirect3DViewportImpl *current_viewport;
209 D3DVIEWPORT7 active_viewport;
211 IDirectDrawSurfaceImpl *current_texture[MAX_TEXTURES];
212 IDirectDrawSurfaceImpl *current_zbuffer;
214 /* Current transformation matrices */
215 D3DMATRIX *world_mat;
218 D3DMATRIX *tex_mat[MAX_TEXTURES];
219 BOOLEAN tex_mat_is_identity[MAX_TEXTURES];
221 /* Current material used in D3D7 mode */
222 D3DMATERIAL7 current_material;
227 /* Light parameters */
228 DWORD num_set_lights;
229 DWORD max_active_lights;
230 LPD3DLIGHT7 light_parameters;
231 DWORD *active_lights;
233 /* clipping planes */
234 DWORD max_clipping_planes;
235 d3d7clippingplane *clipping_planes;
237 void (*set_context)(IDirect3DDeviceImpl*);
238 HRESULT (*clear)(IDirect3DDeviceImpl *This,
245 void (*matrices_updated)(IDirect3DDeviceImpl *This, DWORD matrices);
246 void (*set_matrices)(IDirect3DDeviceImpl *This, DWORD matrices,
247 D3DMATRIX *world_mat, D3DMATRIX *view_mat, D3DMATRIX *proj_mat);
248 void (*flush_to_framebuffer)(IDirect3DDeviceImpl *This, LPCRECT pRect, IDirectDrawSurfaceImpl *surf);
250 STATEBLOCK state_block;
252 /* Used to prevent locks and rendering to overlap */
253 CRITICAL_SECTION crit;
256 /*****************************************************************************
257 * IDirect3DVertexBuffer implementation structure
259 struct IDirect3DVertexBufferImpl
261 ICOM_VFIELD_MULTI(IDirect3DVertexBuffer7);
262 ICOM_VFIELD_MULTI(IDirect3DVertexBuffer);
264 IDirectDrawImpl *d3d;
265 D3DVERTEXBUFFERDESC desc;
267 DWORD vertex_buffer_size;
272 /* Various dump and helper functions */
273 #define GET_TEXCOUNT_FROM_FVF(d3dvtVertexType) \
274 (((d3dvtVertexType) & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT)
276 #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
277 (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
279 extern const char *_get_renderstate(D3DRENDERSTATETYPE type);
280 extern void dump_D3DMATERIAL7(LPD3DMATERIAL7 lpMat);
281 extern void dump_D3DCOLORVALUE(D3DCOLORVALUE *lpCol);
282 extern void dump_D3DLIGHT7(LPD3DLIGHT7 lpLight);
283 extern void dump_DPFLAGS(DWORD dwFlags);
284 extern void dump_D3DMATRIX(D3DMATRIX *mat);
285 extern void dump_D3DVECTOR(D3DVECTOR *lpVec);
286 extern void dump_flexible_vertex(DWORD d3dvtVertexType);
287 extern DWORD get_flexible_vertex_size(DWORD d3dvtVertexType);
288 extern void convert_FVF_to_strided_data(DWORD d3dvtVertexType, LPVOID lpvVertices, D3DDRAWPRIMITIVESTRIDEDDATA *strided, DWORD dwStartVertex);
289 extern void dump_D3DVOP(DWORD dwVertexOp);
290 extern void dump_D3DPV(DWORD dwFlags);
291 extern void multiply_matrix(LPD3DMATRIX,LPD3DMATRIX,LPD3DMATRIX);
292 extern void InitDefaultStateBlock(STATEBLOCK* lpStateBlock, int version);
294 extern const float id_mat[16];
296 /*****************************************************************************
297 * IDirect3D object methods
300 Main_IDirect3DImpl_7_EnumDevices(LPDIRECT3D7 iface,
301 LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback,
305 Main_IDirect3DImpl_7_CreateDevice(LPDIRECT3D7 iface,
307 LPDIRECTDRAWSURFACE7 lpDDS,
308 LPDIRECT3DDEVICE7* lplpD3DDevice);
311 Main_IDirect3DImpl_7_3T_CreateVertexBuffer(LPDIRECT3D7 iface,
312 LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,
313 LPDIRECT3DVERTEXBUFFER7* lplpD3DVertBuf,
317 Main_IDirect3DImpl_7_3T_EnumZBufferFormats(LPDIRECT3D7 iface,
319 LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,
323 Main_IDirect3DImpl_7_3T_EvictManagedTextures(LPDIRECT3D7 iface);
326 Main_IDirect3DImpl_3_2T_1T_EnumDevices(LPDIRECT3D3 iface,
327 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback,
331 Main_IDirect3DImpl_3_2T_1T_CreateLight(LPDIRECT3D3 iface,
332 LPDIRECT3DLIGHT* lplpDirect3DLight,
333 IUnknown* pUnkOuter);
336 Main_IDirect3DImpl_3_2T_1T_CreateMaterial(LPDIRECT3D3 iface,
337 LPDIRECT3DMATERIAL3* lplpDirect3DMaterial3,
338 IUnknown* pUnkOuter);
341 Main_IDirect3DImpl_3_2T_1T_CreateViewport(LPDIRECT3D3 iface,
342 LPDIRECT3DVIEWPORT3* lplpD3DViewport3,
343 IUnknown* pUnkOuter);
346 Main_IDirect3DImpl_3_2T_1T_FindDevice(LPDIRECT3D3 iface,
347 LPD3DFINDDEVICESEARCH lpD3DDFS,
348 LPD3DFINDDEVICERESULT lpD3DFDR);
351 Main_IDirect3DImpl_3_CreateDevice(LPDIRECT3D3 iface,
353 LPDIRECTDRAWSURFACE4 lpDDS,
354 LPDIRECT3DDEVICE3* lplpD3DDevice3,
358 Thunk_IDirect3DImpl_3_CreateVertexBuffer(LPDIRECT3D3 iface,
359 LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc,
360 LPDIRECT3DVERTEXBUFFER* lplpD3DVertBuf,
365 Thunk_IDirect3DImpl_2_CreateMaterial(LPDIRECT3D2 iface,
366 LPDIRECT3DMATERIAL2* lplpDirect3DMaterial2,
367 IUnknown* pUnkOuter);
370 Thunk_IDirect3DImpl_2_CreateViewport(LPDIRECT3D2 iface,
371 LPDIRECT3DVIEWPORT2* lplpD3DViewport2,
372 IUnknown* pUnkOuter);
375 Main_IDirect3DImpl_2_CreateDevice(LPDIRECT3D2 iface,
377 LPDIRECTDRAWSURFACE lpDDS,
378 LPDIRECT3DDEVICE2* lplpD3DDevice2);
381 Main_IDirect3DImpl_1_Initialize(LPDIRECT3D iface,
385 Thunk_IDirect3DImpl_1_CreateMaterial(LPDIRECT3D iface,
386 LPDIRECT3DMATERIAL* lplpDirect3DMaterial,
387 IUnknown* pUnkOuter);
390 Thunk_IDirect3DImpl_1_CreateViewport(LPDIRECT3D iface,
391 LPDIRECT3DVIEWPORT* lplpD3DViewport,
392 IUnknown* pUnkOuter);
395 Main_IDirect3DImpl_1_FindDevice(LPDIRECT3D iface,
396 LPD3DFINDDEVICESEARCH lpD3DDFS,
397 LPD3DFINDDEVICERESULT lplpD3DDevice);
400 Thunk_IDirect3DImpl_7_QueryInterface(LPDIRECT3D7 iface,
405 Thunk_IDirect3DImpl_3_QueryInterface(LPDIRECT3D3 iface,
410 Thunk_IDirect3DImpl_2_QueryInterface(LPDIRECT3D2 iface,
415 Thunk_IDirect3DImpl_1_QueryInterface(LPDIRECT3D iface,
420 Thunk_IDirect3DImpl_7_AddRef(LPDIRECT3D7 iface);
423 Thunk_IDirect3DImpl_3_AddRef(LPDIRECT3D3 iface);
426 Thunk_IDirect3DImpl_2_AddRef(LPDIRECT3D2 iface);
429 Thunk_IDirect3DImpl_1_AddRef(LPDIRECT3D iface);
432 Thunk_IDirect3DImpl_7_Release(LPDIRECT3D7 iface);
435 Thunk_IDirect3DImpl_3_Release(LPDIRECT3D3 iface);
438 Thunk_IDirect3DImpl_2_Release(LPDIRECT3D2 iface);
441 Thunk_IDirect3DImpl_1_Release(LPDIRECT3D iface);
444 Thunk_IDirect3DImpl_3_EnumZBufferFormats(LPDIRECT3D3 iface,
446 LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback,
450 Thunk_IDirect3DImpl_3_EvictManagedTextures(LPDIRECT3D3 iface);
453 Thunk_IDirect3DImpl_2_EnumDevices(LPDIRECT3D2 iface,
454 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback,
458 Thunk_IDirect3DImpl_1_EnumDevices(LPDIRECT3D iface,
459 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback,
463 Thunk_IDirect3DImpl_2_CreateLight(LPDIRECT3D2 iface,
464 LPDIRECT3DLIGHT* lplpDirect3DLight,
465 IUnknown* pUnkOuter);
468 Thunk_IDirect3DImpl_1_CreateLight(LPDIRECT3D iface,
469 LPDIRECT3DLIGHT* lplpDirect3DLight,
470 IUnknown* pUnkOuter);
473 Thunk_IDirect3DImpl_1_FindDevice(LPDIRECT3D iface,
474 LPD3DFINDDEVICESEARCH lpD3DDFS,
475 LPD3DFINDDEVICERESULT lplpD3DDevice);
478 Thunk_IDirect3DImpl_2_FindDevice(LPDIRECT3D2 iface,
479 LPD3DFINDDEVICESEARCH lpD3DDFS,
480 LPD3DFINDDEVICERESULT lpD3DFDR);
482 /*****************************************************************************
483 * IDirect3DDevice object methods
486 Main_IDirect3DDeviceImpl_7_3T_2T_1T_QueryInterface(LPDIRECT3DDEVICE7 iface,
491 Main_IDirect3DDeviceImpl_7_3T_2T_1T_AddRef(LPDIRECT3DDEVICE7 iface);
494 Main_IDirect3DDeviceImpl_7_3T_2T_1T_Release(LPDIRECT3DDEVICE7 iface);
497 Main_IDirect3DDeviceImpl_7_GetCaps(LPDIRECT3DDEVICE7 iface,
498 LPD3DDEVICEDESC7 lpD3DHELDevDesc);
501 Main_IDirect3DDeviceImpl_7_3T_EnumTextureFormats(LPDIRECT3DDEVICE7 iface,
502 LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc,
506 Main_IDirect3DDeviceImpl_7_3T_2T_1T_BeginScene(LPDIRECT3DDEVICE7 iface);
509 Main_IDirect3DDeviceImpl_7_3T_2T_1T_EndScene(LPDIRECT3DDEVICE7 iface);
512 Main_IDirect3DDeviceImpl_7_3T_2T_1T_GetDirect3D(LPDIRECT3DDEVICE7 iface,
513 LPDIRECT3D7* lplpDirect3D3);
516 Main_IDirect3DDeviceImpl_7_3T_2T_SetRenderTarget(LPDIRECT3DDEVICE7 iface,
517 LPDIRECTDRAWSURFACE7 lpNewRenderTarget,
521 Main_IDirect3DDeviceImpl_7_3T_2T_GetRenderTarget(LPDIRECT3DDEVICE7 iface,
522 LPDIRECTDRAWSURFACE7* lplpRenderTarget);
525 Main_IDirect3DDeviceImpl_7_Clear(LPDIRECT3DDEVICE7 iface,
534 Main_IDirect3DDeviceImpl_7_3T_2T_SetTransform(LPDIRECT3DDEVICE7 iface,
535 D3DTRANSFORMSTATETYPE dtstTransformStateType,
536 LPD3DMATRIX lpD3DMatrix);
539 Main_IDirect3DDeviceImpl_7_3T_2T_GetTransform(LPDIRECT3DDEVICE7 iface,
540 D3DTRANSFORMSTATETYPE dtstTransformStateType,
541 LPD3DMATRIX lpD3DMatrix);
544 Main_IDirect3DDeviceImpl_7_SetViewport(LPDIRECT3DDEVICE7 iface,
545 LPD3DVIEWPORT7 lpData);
548 Main_IDirect3DDeviceImpl_7_3T_2T_MultiplyTransform(LPDIRECT3DDEVICE7 iface,
549 D3DTRANSFORMSTATETYPE dtstTransformStateType,
550 LPD3DMATRIX lpD3DMatrix);
553 Main_IDirect3DDeviceImpl_7_GetViewport(LPDIRECT3DDEVICE7 iface,
554 LPD3DVIEWPORT7 lpData);
557 Main_IDirect3DDeviceImpl_7_SetMaterial(LPDIRECT3DDEVICE7 iface,
558 LPD3DMATERIAL7 lpMat);
561 Main_IDirect3DDeviceImpl_7_GetMaterial(LPDIRECT3DDEVICE7 iface,
562 LPD3DMATERIAL7 lpMat);
565 Main_IDirect3DDeviceImpl_7_SetLight(LPDIRECT3DDEVICE7 iface,
567 LPD3DLIGHT7 lpLight);
570 Main_IDirect3DDeviceImpl_7_GetLight(LPDIRECT3DDEVICE7 iface,
572 LPD3DLIGHT7 lpLight);
575 Main_IDirect3DDeviceImpl_7_3T_2T_SetRenderState(LPDIRECT3DDEVICE7 iface,
576 D3DRENDERSTATETYPE dwRenderStateType,
577 DWORD dwRenderState);
580 Main_IDirect3DDeviceImpl_7_3T_2T_GetRenderState(LPDIRECT3DDEVICE7 iface,
581 D3DRENDERSTATETYPE dwRenderStateType,
582 LPDWORD lpdwRenderState);
585 Main_IDirect3DDeviceImpl_7_BeginStateBlock(LPDIRECT3DDEVICE7 iface);
588 Main_IDirect3DDeviceImpl_7_EndStateBlock(LPDIRECT3DDEVICE7 iface,
589 LPDWORD lpdwBlockHandle);
592 Main_IDirect3DDeviceImpl_7_PreLoad(LPDIRECT3DDEVICE7 iface,
593 LPDIRECTDRAWSURFACE7 lpddsTexture);
596 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitive(LPDIRECT3DDEVICE7 iface,
597 D3DPRIMITIVETYPE d3dptPrimitiveType,
598 DWORD d3dvtVertexType,
604 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitive(LPDIRECT3DDEVICE7 iface,
605 D3DPRIMITIVETYPE d3dptPrimitiveType,
606 DWORD d3dvtVertexType,
614 Main_IDirect3DDeviceImpl_7_3T_2T_SetClipStatus(LPDIRECT3DDEVICE7 iface,
615 LPD3DCLIPSTATUS lpD3DClipStatus);
618 Main_IDirect3DDeviceImpl_7_3T_2T_GetClipStatus(LPDIRECT3DDEVICE7 iface,
619 LPD3DCLIPSTATUS lpD3DClipStatus);
622 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
623 D3DPRIMITIVETYPE d3dptPrimitiveType,
625 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,
630 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE7 iface,
631 D3DPRIMITIVETYPE d3dptPrimitiveType,
633 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,
640 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitiveVB(LPDIRECT3DDEVICE7 iface,
641 D3DPRIMITIVETYPE d3dptPrimitiveType,
642 LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,
648 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE7 iface,
649 D3DPRIMITIVETYPE d3dptPrimitiveType,
650 LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf,
658 Main_IDirect3DDeviceImpl_7_3T_ComputeSphereVisibility(LPDIRECT3DDEVICE7 iface,
659 LPD3DVECTOR lpCenters,
663 LPDWORD lpdwReturnValues);
666 Main_IDirect3DDeviceImpl_7_3T_GetTexture(LPDIRECT3DDEVICE7 iface,
668 LPDIRECTDRAWSURFACE7* lpTexture);
671 Main_IDirect3DDeviceImpl_7_3T_SetTexture(LPDIRECT3DDEVICE7 iface,
673 LPDIRECTDRAWSURFACE7 lpTexture);
676 Main_IDirect3DDeviceImpl_7_3T_GetTextureStageState(LPDIRECT3DDEVICE7 iface,
678 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,
682 Main_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface,
684 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,
688 Main_IDirect3DDeviceImpl_7_3T_ValidateDevice(LPDIRECT3DDEVICE7 iface,
692 Main_IDirect3DDeviceImpl_7_ApplyStateBlock(LPDIRECT3DDEVICE7 iface,
693 DWORD dwBlockHandle);
696 Main_IDirect3DDeviceImpl_7_CaptureStateBlock(LPDIRECT3DDEVICE7 iface,
697 DWORD dwBlockHandle);
700 Main_IDirect3DDeviceImpl_7_DeleteStateBlock(LPDIRECT3DDEVICE7 iface,
701 DWORD dwBlockHandle);
704 Main_IDirect3DDeviceImpl_7_CreateStateBlock(LPDIRECT3DDEVICE7 iface,
705 D3DSTATEBLOCKTYPE d3dsbType,
706 LPDWORD lpdwBlockHandle);
709 Main_IDirect3DDeviceImpl_7_Load(LPDIRECT3DDEVICE7 iface,
710 LPDIRECTDRAWSURFACE7 lpDestTex,
712 LPDIRECTDRAWSURFACE7 lpSrcTex,
717 Main_IDirect3DDeviceImpl_7_LightEnable(LPDIRECT3DDEVICE7 iface,
722 Main_IDirect3DDeviceImpl_7_GetLightEnable(LPDIRECT3DDEVICE7 iface,
727 Main_IDirect3DDeviceImpl_7_SetClipPlane(LPDIRECT3DDEVICE7 iface,
729 D3DVALUE* pPlaneEquation);
732 Main_IDirect3DDeviceImpl_7_GetClipPlane(LPDIRECT3DDEVICE7 iface,
734 D3DVALUE* pPlaneEquation);
737 Main_IDirect3DDeviceImpl_7_GetInfo(LPDIRECT3DDEVICE7 iface,
739 LPVOID pDevInfoStruct,
743 Main_IDirect3DDeviceImpl_3_2T_1T_GetCaps(LPDIRECT3DDEVICE3 iface,
744 LPD3DDEVICEDESC lpD3DHWDevDesc,
745 LPD3DDEVICEDESC lpD3DHELDevDesc);
748 Main_IDirect3DDeviceImpl_3_2T_1T_GetStats(LPDIRECT3DDEVICE3 iface,
749 LPD3DSTATS lpD3DStats);
752 Main_IDirect3DDeviceImpl_3_2T_1T_AddViewport(LPDIRECT3DDEVICE3 iface,
753 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3);
756 Main_IDirect3DDeviceImpl_3_2T_1T_DeleteViewport(LPDIRECT3DDEVICE3 iface,
757 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3);
760 Main_IDirect3DDeviceImpl_3_2T_1T_NextViewport(LPDIRECT3DDEVICE3 iface,
761 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3,
762 LPDIRECT3DVIEWPORT3* lplpDirect3DViewport3,
766 Main_IDirect3DDeviceImpl_3_2T_SetCurrentViewport(LPDIRECT3DDEVICE3 iface,
767 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3);
770 Main_IDirect3DDeviceImpl_3_2T_GetCurrentViewport(LPDIRECT3DDEVICE3 iface,
771 LPDIRECT3DVIEWPORT3* lplpDirect3DViewport3);
774 Main_IDirect3DDeviceImpl_3_Begin(LPDIRECT3DDEVICE3 iface,
775 D3DPRIMITIVETYPE d3dptPrimitiveType,
776 DWORD dwVertexTypeDesc,
780 Main_IDirect3DDeviceImpl_3_BeginIndexed(LPDIRECT3DDEVICE3 iface,
781 D3DPRIMITIVETYPE d3dptPrimitiveType,
782 DWORD d3dvtVertexType,
788 Main_IDirect3DDeviceImpl_3_2T_Vertex(LPDIRECT3DDEVICE3 iface,
789 LPVOID lpVertexType);
792 Main_IDirect3DDeviceImpl_3_2T_Index(LPDIRECT3DDEVICE3 iface,
796 Main_IDirect3DDeviceImpl_3_2T_End(LPDIRECT3DDEVICE3 iface,
800 Main_IDirect3DDeviceImpl_3_2T_GetLightState(LPDIRECT3DDEVICE3 iface,
801 D3DLIGHTSTATETYPE dwLightStateType,
802 LPDWORD lpdwLightState);
805 Main_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface,
806 D3DLIGHTSTATETYPE dwLightStateType,
810 Main_IDirect3DDeviceImpl_2_1T_SwapTextureHandles(LPDIRECT3DDEVICE2 iface,
811 LPDIRECT3DTEXTURE2 lpD3DTex1,
812 LPDIRECT3DTEXTURE2 lpD3DTex2);
815 Main_IDirect3DDeviceImpl_2_1T_EnumTextureFormats(LPDIRECT3DDEVICE2 iface,
816 LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc,
820 Main_IDirect3DDeviceImpl_2_Begin(LPDIRECT3DDEVICE2 iface,
821 D3DPRIMITIVETYPE d3dpt,
822 D3DVERTEXTYPE dwVertexTypeDesc,
826 Main_IDirect3DDeviceImpl_2_BeginIndexed(LPDIRECT3DDEVICE2 iface,
827 D3DPRIMITIVETYPE d3dptPrimitiveType,
828 D3DVERTEXTYPE d3dvtVertexType,
834 Main_IDirect3DDeviceImpl_2_DrawPrimitive(LPDIRECT3DDEVICE2 iface,
835 D3DPRIMITIVETYPE d3dptPrimitiveType,
836 D3DVERTEXTYPE d3dvtVertexType,
842 Main_IDirect3DDeviceImpl_2_DrawIndexedPrimitive(LPDIRECT3DDEVICE2 iface,
843 D3DPRIMITIVETYPE d3dptPrimitiveType,
844 D3DVERTEXTYPE d3dvtVertexType,
852 Main_IDirect3DDeviceImpl_1_Initialize(LPDIRECT3DDEVICE iface,
853 LPDIRECT3D lpDirect3D,
855 LPD3DDEVICEDESC lpD3DDVDesc);
858 Main_IDirect3DDeviceImpl_1_CreateExecuteBuffer(LPDIRECT3DDEVICE iface,
859 LPD3DEXECUTEBUFFERDESC lpDesc,
860 LPDIRECT3DEXECUTEBUFFER* lplpDirect3DExecuteBuffer,
861 IUnknown* pUnkOuter);
864 Main_IDirect3DDeviceImpl_1_Execute(LPDIRECT3DDEVICE iface,
865 LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer,
866 LPDIRECT3DVIEWPORT lpDirect3DViewport,
870 Main_IDirect3DDeviceImpl_1_Pick(LPDIRECT3DDEVICE iface,
871 LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer,
872 LPDIRECT3DVIEWPORT lpDirect3DViewport,
877 Main_IDirect3DDeviceImpl_1_GetPickRecords(LPDIRECT3DDEVICE iface,
879 LPD3DPICKRECORD lpD3DPickRec);
882 Main_IDirect3DDeviceImpl_1_CreateMatrix(LPDIRECT3DDEVICE iface,
883 LPD3DMATRIXHANDLE lpD3DMatHandle);
886 Main_IDirect3DDeviceImpl_1_SetMatrix(LPDIRECT3DDEVICE iface,
887 D3DMATRIXHANDLE D3DMatHandle,
888 LPD3DMATRIX lpD3DMatrix);
891 Main_IDirect3DDeviceImpl_1_GetMatrix(LPDIRECT3DDEVICE iface,
892 D3DMATRIXHANDLE D3DMatHandle,
893 LPD3DMATRIX lpD3DMatrix);
896 Main_IDirect3DDeviceImpl_1_DeleteMatrix(LPDIRECT3DDEVICE iface,
897 D3DMATRIXHANDLE D3DMatHandle);
900 Thunk_IDirect3DDeviceImpl_3_QueryInterface(LPDIRECT3DDEVICE3 iface,
905 Thunk_IDirect3DDeviceImpl_2_QueryInterface(LPDIRECT3DDEVICE2 iface,
910 Thunk_IDirect3DDeviceImpl_1_QueryInterface(LPDIRECT3DDEVICE iface,
915 Thunk_IDirect3DDeviceImpl_3_AddRef(LPDIRECT3DDEVICE3 iface);
918 Thunk_IDirect3DDeviceImpl_2_AddRef(LPDIRECT3DDEVICE2 iface);
921 Thunk_IDirect3DDeviceImpl_1_AddRef(LPDIRECT3DDEVICE iface);
924 Thunk_IDirect3DDeviceImpl_3_Release(LPDIRECT3DDEVICE3 iface);
927 Thunk_IDirect3DDeviceImpl_2_Release(LPDIRECT3DDEVICE2 iface);
930 Thunk_IDirect3DDeviceImpl_1_Release(LPDIRECT3DDEVICE iface);
933 Thunk_IDirect3DDeviceImpl_2_AddViewport(LPDIRECT3DDEVICE2 iface,
934 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2);
937 Thunk_IDirect3DDeviceImpl_1_AddViewport(LPDIRECT3DDEVICE iface,
938 LPDIRECT3DVIEWPORT lpDirect3DViewport);
941 Thunk_IDirect3DDeviceImpl_2_DeleteViewport(LPDIRECT3DDEVICE2 iface,
942 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2);
945 Thunk_IDirect3DDeviceImpl_1_DeleteViewport(LPDIRECT3DDEVICE iface,
946 LPDIRECT3DVIEWPORT lpDirect3DViewport);
949 Thunk_IDirect3DDeviceImpl_2_NextViewport(LPDIRECT3DDEVICE3 iface,
950 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2,
951 LPDIRECT3DVIEWPORT2* lplpDirect3DViewport2,
955 Thunk_IDirect3DDeviceImpl_1_NextViewport(LPDIRECT3DDEVICE3 iface,
956 LPDIRECT3DVIEWPORT lpDirect3DViewport,
957 LPDIRECT3DVIEWPORT* lplpDirect3DViewport,
961 Thunk_IDirect3DDeviceImpl_3_GetDirect3D(LPDIRECT3DDEVICE3 iface,
962 LPDIRECT3D3* lplpDirect3D3);
965 Thunk_IDirect3DDeviceImpl_2_GetDirect3D(LPDIRECT3DDEVICE2 iface,
966 LPDIRECT3D2* lplpDirect3D2);
969 Thunk_IDirect3DDeviceImpl_1_GetDirect3D(LPDIRECT3DDEVICE iface,
970 LPDIRECT3D* lplpDirect3D);
973 Thunk_IDirect3DDeviceImpl_2_SetCurrentViewport(LPDIRECT3DDEVICE2 iface,
974 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2);
977 Thunk_IDirect3DDeviceImpl_2_GetCurrentViewport(LPDIRECT3DDEVICE2 iface,
978 LPDIRECT3DVIEWPORT2* lpDirect3DViewport2);
981 Thunk_IDirect3DDeviceImpl_3_EnumTextureFormats(LPDIRECT3DDEVICE3 iface,
982 LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc,
986 Thunk_IDirect3DDeviceImpl_3_BeginScene(LPDIRECT3DDEVICE3 iface);
989 Thunk_IDirect3DDeviceImpl_2_BeginScene(LPDIRECT3DDEVICE2 iface);
992 Thunk_IDirect3DDeviceImpl_1_BeginScene(LPDIRECT3DDEVICE iface);
995 Thunk_IDirect3DDeviceImpl_3_EndScene(LPDIRECT3DDEVICE3 iface);
998 Thunk_IDirect3DDeviceImpl_2_EndScene(LPDIRECT3DDEVICE2 iface);
1001 Thunk_IDirect3DDeviceImpl_1_EndScene(LPDIRECT3DDEVICE iface);
1004 Thunk_IDirect3DDeviceImpl_3_SetTransform(LPDIRECT3DDEVICE3 iface,
1005 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1006 LPD3DMATRIX lpD3DMatrix);
1009 Thunk_IDirect3DDeviceImpl_2_SetTransform(LPDIRECT3DDEVICE2 iface,
1010 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1011 LPD3DMATRIX lpD3DMatrix);
1014 Thunk_IDirect3DDeviceImpl_3_GetTransform(LPDIRECT3DDEVICE3 iface,
1015 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1016 LPD3DMATRIX lpD3DMatrix);
1019 Thunk_IDirect3DDeviceImpl_2_GetTransform(LPDIRECT3DDEVICE2 iface,
1020 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1021 LPD3DMATRIX lpD3DMatrix);
1024 Thunk_IDirect3DDeviceImpl_3_MultiplyTransform(LPDIRECT3DDEVICE3 iface,
1025 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1026 LPD3DMATRIX lpD3DMatrix);
1029 Thunk_IDirect3DDeviceImpl_2_MultiplyTransform(LPDIRECT3DDEVICE2 iface,
1030 D3DTRANSFORMSTATETYPE dtstTransformStateType,
1031 LPD3DMATRIX lpD3DMatrix);
1034 Thunk_IDirect3DDeviceImpl_3_SetRenderState(LPDIRECT3DDEVICE3 iface,
1035 D3DRENDERSTATETYPE dwRenderStateType,
1036 DWORD dwRenderState);
1039 Thunk_IDirect3DDeviceImpl_2_SetRenderState(LPDIRECT3DDEVICE2 iface,
1040 D3DRENDERSTATETYPE dwRenderStateType,
1041 DWORD dwRenderState);
1044 Thunk_IDirect3DDeviceImpl_3_GetRenderState(LPDIRECT3DDEVICE3 iface,
1045 D3DRENDERSTATETYPE dwRenderStateType,
1046 LPDWORD lpdwRenderState);
1049 Thunk_IDirect3DDeviceImpl_2_GetRenderState(LPDIRECT3DDEVICE2 iface,
1050 D3DRENDERSTATETYPE dwRenderStateType,
1051 LPDWORD lpdwRenderState);
1054 Thunk_IDirect3DDeviceImpl_3_DrawPrimitive(LPDIRECT3DDEVICE3 iface,
1055 D3DPRIMITIVETYPE d3dptPrimitiveType,
1056 DWORD d3dvtVertexType,
1058 DWORD dwVertexCount,
1062 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitive(LPDIRECT3DDEVICE3 iface,
1063 D3DPRIMITIVETYPE d3dptPrimitiveType,
1064 DWORD d3dvtVertexType,
1066 DWORD dwVertexCount,
1072 Thunk_IDirect3DDeviceImpl_3_SetClipStatus(LPDIRECT3DDEVICE3 iface,
1073 LPD3DCLIPSTATUS lpD3DClipStatus);
1076 Thunk_IDirect3DDeviceImpl_2_SetClipStatus(LPDIRECT3DDEVICE2 iface,
1077 LPD3DCLIPSTATUS lpD3DClipStatus);
1080 Thunk_IDirect3DDeviceImpl_3_GetClipStatus(LPDIRECT3DDEVICE3 iface,
1081 LPD3DCLIPSTATUS lpD3DClipStatus);
1084 Thunk_IDirect3DDeviceImpl_2_GetClipStatus(LPDIRECT3DDEVICE2 iface,
1085 LPD3DCLIPSTATUS lpD3DClipStatus);
1088 Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveStrided(LPDIRECT3DDEVICE3 iface,
1089 D3DPRIMITIVETYPE d3dptPrimitiveType,
1091 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,
1092 DWORD dwVertexCount,
1096 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE3 iface,
1097 D3DPRIMITIVETYPE d3dptPrimitiveType,
1099 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData,
1100 DWORD dwVertexCount,
1106 Thunk_IDirect3DDeviceImpl_3_ComputeSphereVisibility(LPDIRECT3DDEVICE3 iface,
1107 LPD3DVECTOR lpCenters,
1111 LPDWORD lpdwReturnValues);
1114 Thunk_IDirect3DDeviceImpl_3_GetTextureStageState(LPDIRECT3DDEVICE3 iface,
1116 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,
1120 Thunk_IDirect3DDeviceImpl_3_SetTextureStageState(LPDIRECT3DDEVICE3 iface,
1122 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType,
1126 Thunk_IDirect3DDeviceImpl_3_ValidateDevice(LPDIRECT3DDEVICE3 iface,
1127 LPDWORD lpdwPasses);
1130 Thunk_IDirect3DDeviceImpl_2_GetCaps(LPDIRECT3DDEVICE2 iface,
1131 LPD3DDEVICEDESC lpD3DHWDevDesc,
1132 LPD3DDEVICEDESC lpD3DHELDevDesc);
1135 Thunk_IDirect3DDeviceImpl_1_GetCaps(LPDIRECT3DDEVICE iface,
1136 LPD3DDEVICEDESC lpD3DHWDevDesc,
1137 LPD3DDEVICEDESC lpD3DHELDevDesc);
1140 Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface,
1141 LPDIRECT3DTEXTURE lpD3Dtex1,
1142 LPDIRECT3DTEXTURE lpD3DTex2);
1145 Thunk_IDirect3DDeviceImpl_2_GetStats(LPDIRECT3DDEVICE2 iface,
1146 LPD3DSTATS lpD3DStats);
1149 Thunk_IDirect3DDeviceImpl_1_GetStats(LPDIRECT3DDEVICE iface,
1150 LPD3DSTATS lpD3DStats);
1153 Thunk_IDirect3DDeviceImpl_3_SetRenderTarget(LPDIRECT3DDEVICE3 iface,
1154 LPDIRECTDRAWSURFACE4 lpNewRenderTarget,
1158 Thunk_IDirect3DDeviceImpl_3_GetRenderTarget(LPDIRECT3DDEVICE3 iface,
1159 LPDIRECTDRAWSURFACE4* lplpRenderTarget);
1162 Thunk_IDirect3DDeviceImpl_2_SetRenderTarget(LPDIRECT3DDEVICE2 iface,
1163 LPDIRECTDRAWSURFACE lpNewRenderTarget,
1167 Thunk_IDirect3DDeviceImpl_2_GetRenderTarget(LPDIRECT3DDEVICE2 iface,
1168 LPDIRECTDRAWSURFACE* lplpRenderTarget);
1171 Thunk_IDirect3DDeviceImpl_2_Vertex(LPDIRECT3DDEVICE2 iface,
1172 LPVOID lpVertexType);
1175 Thunk_IDirect3DDeviceImpl_2_Index(LPDIRECT3DDEVICE2 iface,
1179 Thunk_IDirect3DDeviceImpl_2_End(LPDIRECT3DDEVICE2 iface,
1183 Thunk_IDirect3DDeviceImpl_2_GetLightState(LPDIRECT3DDEVICE2 iface,
1184 D3DLIGHTSTATETYPE dwLightStateType,
1185 LPDWORD lpdwLightState);
1188 Thunk_IDirect3DDeviceImpl_2_SetLightState(LPDIRECT3DDEVICE2 iface,
1189 D3DLIGHTSTATETYPE dwLightStateType,
1190 DWORD dwLightState);
1193 Thunk_IDirect3DDeviceImpl_1_EnumTextureFormats(LPDIRECT3DDEVICE iface,
1194 LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc,
1198 Thunk_IDirect3DDeviceImpl_3_SetTexture(LPDIRECT3DDEVICE3 iface,
1200 LPDIRECT3DTEXTURE2 lpTexture2);
1203 Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveVB(LPDIRECT3DDEVICE3 iface,
1204 D3DPRIMITIVETYPE d3dptPrimitiveType,
1205 LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,
1206 DWORD dwStartVertex,
1207 DWORD dwNumVertices,
1211 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE3 iface,
1212 D3DPRIMITIVETYPE d3dptPrimitiveType,
1213 LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf,
1219 Thunk_IDirect3DDeviceImpl_3_GetTexture(LPDIRECT3DDEVICE3 iface,
1221 LPDIRECT3DTEXTURE2* lplpTexture2);
1223 #endif /* __GRAPHICS_WINE_D3D_PRIVATE_H */