2 * Direct3D private include file
4 * Copyright (c) 1998-2004 Lionel Ulmer
5 * Copyright (c) 2002-2005 Christian Costa
7 * This file contains all the structure that are not exported
8 * through d3d.h and all common macros.
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #ifndef __GRAPHICS_WINE_D3D_PRIVATE_H
26 #define __GRAPHICS_WINE_D3D_PRIVATE_H
28 /* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES */
37 #define MAX_TEXTURES 8
40 #define HIGHEST_RENDER_STATE 152
41 #define HIGHEST_TEXTURE_STAGE_STATE 24
43 /*****************************************************************************
44 * Predeclare the interface implementation structures
46 typedef struct IDirect3DLightImpl IDirect3DLightImpl
;
47 typedef struct IDirect3DMaterialImpl IDirect3DMaterialImpl
;
48 typedef struct IDirect3DViewportImpl IDirect3DViewportImpl
;
49 typedef struct IDirect3DExecuteBufferImpl IDirect3DExecuteBufferImpl
;
50 typedef struct IDirect3DVertexBufferImpl IDirect3DVertexBufferImpl
;
52 #include "ddraw_private.h"
54 typedef struct STATEBLOCKFLAGS
{
55 BOOL render_state
[HIGHEST_RENDER_STATE
];
56 BOOL texture_stage_state
[MAX_TEXTURES
][HIGHEST_TEXTURE_STAGE_STATE
];
59 typedef struct STATEBLOCK
{
60 STATEBLOCKFLAGS set_flags
;
61 DWORD render_state
[HIGHEST_RENDER_STATE
];
62 DWORD texture_stage_state
[MAX_TEXTURES
][HIGHEST_TEXTURE_STAGE_STATE
];
66 /*****************************************************************************
67 * IDirect3DLight implementation structure
69 struct IDirect3DLightImpl
71 ICOM_VFIELD_MULTI(IDirect3DLight
);
73 /* IDirect3DLight fields */
75 /* If this light is active for one viewport, put the viewport here */
76 IDirect3DViewportImpl
*active_viewport
;
83 /* Chained list used for adding / removing from viewports */
84 IDirect3DLightImpl
*next
;
86 /* Activation function */
87 void (*activate
)(IDirect3DLightImpl
*);
88 void (*desactivate
)(IDirect3DLightImpl
*);
89 void (*update
)(IDirect3DLightImpl
*);
92 /*****************************************************************************
93 * IDirect3DMaterial implementation structure
95 struct IDirect3DMaterialImpl
97 ICOM_VFIELD_MULTI(IDirect3DMaterial3
);
98 ICOM_VFIELD_MULTI(IDirect3DMaterial2
);
99 ICOM_VFIELD_MULTI(IDirect3DMaterial
);
101 /* IDirect3DMaterial2 fields */
102 IDirectDrawImpl
*d3d
;
103 IDirect3DDeviceImpl
*active_device
;
107 void (*activate
)(IDirect3DMaterialImpl
* this);
110 /*****************************************************************************
111 * IDirect3DViewport implementation structure
113 struct IDirect3DViewportImpl
115 ICOM_VFIELD_MULTI(IDirect3DViewport3
);
117 /* IDirect3DViewport fields */
118 IDirectDrawImpl
*d3d
;
119 /* If this viewport is active for one device, put the device here */
120 IDirect3DDeviceImpl
*active_device
;
131 /* Activation function */
132 void (*activate
)(IDirect3DViewportImpl
*);
134 /* Field used to chain viewports together */
135 IDirect3DViewportImpl
*next
;
138 IDirect3DLightImpl
*lights
;
140 /* Background material */
141 IDirect3DMaterialImpl
*background
;
144 /*****************************************************************************
145 * IDirect3DExecuteBuffer implementation structure
147 struct IDirect3DExecuteBufferImpl
149 ICOM_VFIELD_MULTI(IDirect3DExecuteBuffer
);
151 /* IDirect3DExecuteBuffer fields */
152 IDirectDrawImpl
*d3d
;
153 IDirect3DDeviceImpl
* d3ddev
;
155 D3DEXECUTEBUFFERDESC desc
;
158 /* This buffer will store the transformed vertices */
163 /* This flags is set to TRUE if we allocated ourselves the
167 void (*execute
)(IDirect3DExecuteBufferImpl
* this,
168 IDirect3DDeviceImpl
* dev
,
169 IDirect3DViewportImpl
* vp
);
172 /* Internal structure to store the state of the clipping planes */
173 typedef struct d3d7clippingplane
178 /*****************************************************************************
179 * IDirect3DDevice implementation structure
182 #define WORLDMAT_CHANGED (0x00000001 << 0)
183 #define VIEWMAT_CHANGED (0x00000001 << 1)
184 #define PROJMAT_CHANGED (0x00000001 << 2)
185 #define TEXMAT0_CHANGED (0x00000001 << 3)
186 #define TEXMAT1_CHANGED (0x00000001 << 4)
187 #define TEXMAT2_CHANGED (0x00000001 << 5)
188 #define TEXMAT3_CHANGED (0x00000001 << 6)
189 #define TEXMAT4_CHANGED (0x00000001 << 7)
190 #define TEXMAT5_CHANGED (0x00000001 << 8)
191 #define TEXMAT6_CHANGED (0x00000001 << 9)
192 #define TEXMAT7_CHANGED (0x00000001 << 10)
194 struct IDirect3DDeviceImpl
196 ICOM_VFIELD_MULTI(IDirect3DDevice7
);
197 ICOM_VFIELD_MULTI(IDirect3DDevice3
);
198 ICOM_VFIELD_MULTI(IDirect3DDevice2
);
199 ICOM_VFIELD_MULTI(IDirect3DDevice
);
202 /* Version of the Direct3D object from which the device has been created */
205 /* IDirect3DDevice fields */
206 IDirectDrawImpl
*d3d
;
207 IDirectDrawSurfaceImpl
*surface
;
209 IDirect3DViewportImpl
*viewport_list
;
210 IDirect3DViewportImpl
*current_viewport
;
211 D3DVIEWPORT7 active_viewport
;
213 IDirectDrawSurfaceImpl
*current_texture
[MAX_TEXTURES
];
214 IDirectDrawSurfaceImpl
*current_zbuffer
;
216 /* Current transformation matrices */
217 D3DMATRIX
*world_mat
;
220 D3DMATRIX
*tex_mat
[MAX_TEXTURES
];
221 BOOLEAN tex_mat_is_identity
[MAX_TEXTURES
];
223 /* Current material used in D3D7 mode */
224 D3DMATERIAL7 current_material
;
229 /* Light parameters */
230 DWORD num_set_lights
;
231 DWORD max_active_lights
;
232 LPD3DLIGHT7 light_parameters
;
233 DWORD
*active_lights
;
235 /* Clipping planes */
236 DWORD max_clipping_planes
;
237 d3d7clippingplane
*clipping_planes
;
239 void (*set_context
)(IDirect3DDeviceImpl
*);
240 HRESULT (*clear
)(IDirect3DDeviceImpl
*This
,
247 void (*matrices_updated
)(IDirect3DDeviceImpl
*This
, DWORD matrices
);
248 void (*set_matrices
)(IDirect3DDeviceImpl
*This
, DWORD matrices
,
249 D3DMATRIX
*world_mat
, D3DMATRIX
*view_mat
, D3DMATRIX
*proj_mat
);
250 void (*flush_to_framebuffer
)(IDirect3DDeviceImpl
*This
, LPCRECT pRect
, IDirectDrawSurfaceImpl
*surf
);
252 STATEBLOCK state_block
;
254 /* Used to prevent locks and rendering to overlap */
255 CRITICAL_SECTION crit
;
257 /* Rendering functions */
258 D3DPRIMITIVETYPE primitive_type
;
262 LPBYTE vertex_buffer
;
267 /*****************************************************************************
268 * IDirect3DVertexBuffer implementation structure
270 struct IDirect3DVertexBufferImpl
272 ICOM_VFIELD_MULTI(IDirect3DVertexBuffer7
);
273 ICOM_VFIELD_MULTI(IDirect3DVertexBuffer
);
275 IDirectDrawImpl
*d3d
;
276 D3DVERTEXBUFFERDESC desc
;
278 DWORD vertex_buffer_size
;
283 /* Various dump and helper functions */
284 #define GET_TEXCOUNT_FROM_FVF(d3dvtVertexType) \
285 (((d3dvtVertexType) & D3DFVF_TEXCOUNT_MASK) >> D3DFVF_TEXCOUNT_SHIFT)
287 #define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
288 (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
290 extern const char *_get_renderstate(D3DRENDERSTATETYPE type
);
291 extern void dump_D3DMATERIAL7(LPD3DMATERIAL7 lpMat
);
292 extern void dump_D3DCOLORVALUE(D3DCOLORVALUE
*lpCol
);
293 extern void dump_D3DLIGHT7(LPD3DLIGHT7 lpLight
);
294 extern void dump_DPFLAGS(DWORD dwFlags
);
295 extern void dump_D3DMATRIX(D3DMATRIX
*mat
);
296 extern void dump_D3DVECTOR(D3DVECTOR
*lpVec
);
297 extern void dump_flexible_vertex(DWORD d3dvtVertexType
);
298 extern DWORD
get_flexible_vertex_size(DWORD d3dvtVertexType
);
299 extern void convert_FVF_to_strided_data(DWORD d3dvtVertexType
, LPVOID lpvVertices
, D3DDRAWPRIMITIVESTRIDEDDATA
*strided
, DWORD dwStartVertex
);
300 extern void dump_D3DVOP(DWORD dwVertexOp
);
301 extern void dump_D3DPV(DWORD dwFlags
);
302 extern void multiply_matrix(LPD3DMATRIX
,LPD3DMATRIX
,LPD3DMATRIX
);
303 extern void InitDefaultStateBlock(STATEBLOCK
* lpStateBlock
, int version
);
305 extern const float id_mat
[16];
307 /*****************************************************************************
308 * IDirect3D object methods
311 Main_IDirect3DImpl_7_EnumDevices(LPDIRECT3D7 iface
,
312 LPD3DENUMDEVICESCALLBACK7 lpEnumDevicesCallback
,
316 Main_IDirect3DImpl_7_CreateDevice(LPDIRECT3D7 iface
,
318 LPDIRECTDRAWSURFACE7 lpDDS
,
319 LPDIRECT3DDEVICE7
* lplpD3DDevice
);
322 Main_IDirect3DImpl_7_3T_CreateVertexBuffer(LPDIRECT3D7 iface
,
323 LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc
,
324 LPDIRECT3DVERTEXBUFFER7
* lplpD3DVertBuf
,
328 Main_IDirect3DImpl_7_3T_EnumZBufferFormats(LPDIRECT3D7 iface
,
330 LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback
,
334 Main_IDirect3DImpl_7_3T_EvictManagedTextures(LPDIRECT3D7 iface
);
337 Main_IDirect3DImpl_3_2T_1T_EnumDevices(LPDIRECT3D3 iface
,
338 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback
,
342 Main_IDirect3DImpl_3_2T_1T_CreateLight(LPDIRECT3D3 iface
,
343 LPDIRECT3DLIGHT
* lplpDirect3DLight
,
344 IUnknown
* pUnkOuter
);
347 Main_IDirect3DImpl_3_2T_1T_CreateMaterial(LPDIRECT3D3 iface
,
348 LPDIRECT3DMATERIAL3
* lplpDirect3DMaterial3
,
349 IUnknown
* pUnkOuter
);
352 Main_IDirect3DImpl_3_2T_1T_CreateViewport(LPDIRECT3D3 iface
,
353 LPDIRECT3DVIEWPORT3
* lplpD3DViewport3
,
354 IUnknown
* pUnkOuter
);
357 Main_IDirect3DImpl_3_2T_1T_FindDevice(LPDIRECT3D3 iface
,
358 LPD3DFINDDEVICESEARCH lpD3DDFS
,
359 LPD3DFINDDEVICERESULT lpD3DFDR
);
362 Main_IDirect3DImpl_3_CreateDevice(LPDIRECT3D3 iface
,
364 LPDIRECTDRAWSURFACE4 lpDDS
,
365 LPDIRECT3DDEVICE3
* lplpD3DDevice3
,
369 Thunk_IDirect3DImpl_3_CreateVertexBuffer(LPDIRECT3D3 iface
,
370 LPD3DVERTEXBUFFERDESC lpD3DVertBufDesc
,
371 LPDIRECT3DVERTEXBUFFER
* lplpD3DVertBuf
,
376 Thunk_IDirect3DImpl_2_CreateMaterial(LPDIRECT3D2 iface
,
377 LPDIRECT3DMATERIAL2
* lplpDirect3DMaterial2
,
378 IUnknown
* pUnkOuter
);
381 Thunk_IDirect3DImpl_2_CreateViewport(LPDIRECT3D2 iface
,
382 LPDIRECT3DVIEWPORT2
* lplpD3DViewport2
,
383 IUnknown
* pUnkOuter
);
386 Main_IDirect3DImpl_2_CreateDevice(LPDIRECT3D2 iface
,
388 LPDIRECTDRAWSURFACE lpDDS
,
389 LPDIRECT3DDEVICE2
* lplpD3DDevice2
);
392 Main_IDirect3DImpl_1_Initialize(LPDIRECT3D iface
,
396 Thunk_IDirect3DImpl_1_CreateMaterial(LPDIRECT3D iface
,
397 LPDIRECT3DMATERIAL
* lplpDirect3DMaterial
,
398 IUnknown
* pUnkOuter
);
401 Thunk_IDirect3DImpl_1_CreateViewport(LPDIRECT3D iface
,
402 LPDIRECT3DVIEWPORT
* lplpD3DViewport
,
403 IUnknown
* pUnkOuter
);
406 Main_IDirect3DImpl_1_FindDevice(LPDIRECT3D iface
,
407 LPD3DFINDDEVICESEARCH lpD3DDFS
,
408 LPD3DFINDDEVICERESULT lplpD3DDevice
);
411 Thunk_IDirect3DImpl_7_QueryInterface(LPDIRECT3D7 iface
,
416 Thunk_IDirect3DImpl_3_QueryInterface(LPDIRECT3D3 iface
,
421 Thunk_IDirect3DImpl_2_QueryInterface(LPDIRECT3D2 iface
,
426 Thunk_IDirect3DImpl_1_QueryInterface(LPDIRECT3D iface
,
431 Thunk_IDirect3DImpl_7_AddRef(LPDIRECT3D7 iface
);
434 Thunk_IDirect3DImpl_3_AddRef(LPDIRECT3D3 iface
);
437 Thunk_IDirect3DImpl_2_AddRef(LPDIRECT3D2 iface
);
440 Thunk_IDirect3DImpl_1_AddRef(LPDIRECT3D iface
);
443 Thunk_IDirect3DImpl_7_Release(LPDIRECT3D7 iface
);
446 Thunk_IDirect3DImpl_3_Release(LPDIRECT3D3 iface
);
449 Thunk_IDirect3DImpl_2_Release(LPDIRECT3D2 iface
);
452 Thunk_IDirect3DImpl_1_Release(LPDIRECT3D iface
);
455 Thunk_IDirect3DImpl_3_EnumZBufferFormats(LPDIRECT3D3 iface
,
457 LPD3DENUMPIXELFORMATSCALLBACK lpEnumCallback
,
461 Thunk_IDirect3DImpl_3_EvictManagedTextures(LPDIRECT3D3 iface
);
464 Thunk_IDirect3DImpl_2_EnumDevices(LPDIRECT3D2 iface
,
465 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback
,
469 Thunk_IDirect3DImpl_1_EnumDevices(LPDIRECT3D iface
,
470 LPD3DENUMDEVICESCALLBACK lpEnumDevicesCallback
,
474 Thunk_IDirect3DImpl_2_CreateLight(LPDIRECT3D2 iface
,
475 LPDIRECT3DLIGHT
* lplpDirect3DLight
,
476 IUnknown
* pUnkOuter
);
479 Thunk_IDirect3DImpl_1_CreateLight(LPDIRECT3D iface
,
480 LPDIRECT3DLIGHT
* lplpDirect3DLight
,
481 IUnknown
* pUnkOuter
);
484 Thunk_IDirect3DImpl_1_FindDevice(LPDIRECT3D iface
,
485 LPD3DFINDDEVICESEARCH lpD3DDFS
,
486 LPD3DFINDDEVICERESULT lplpD3DDevice
);
489 Thunk_IDirect3DImpl_2_FindDevice(LPDIRECT3D2 iface
,
490 LPD3DFINDDEVICESEARCH lpD3DDFS
,
491 LPD3DFINDDEVICERESULT lpD3DFDR
);
493 /*****************************************************************************
494 * IDirect3DDevice object methods
497 Main_IDirect3DDeviceImpl_7_3T_2T_1T_QueryInterface(LPDIRECT3DDEVICE7 iface
,
502 Main_IDirect3DDeviceImpl_7_3T_2T_1T_AddRef(LPDIRECT3DDEVICE7 iface
);
505 Main_IDirect3DDeviceImpl_7_3T_2T_1T_Release(LPDIRECT3DDEVICE7 iface
);
508 Main_IDirect3DDeviceImpl_7_GetCaps(LPDIRECT3DDEVICE7 iface
,
509 LPD3DDEVICEDESC7 lpD3DHELDevDesc
);
512 Main_IDirect3DDeviceImpl_7_3T_EnumTextureFormats(LPDIRECT3DDEVICE7 iface
,
513 LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc
,
517 Main_IDirect3DDeviceImpl_7_3T_2T_1T_BeginScene(LPDIRECT3DDEVICE7 iface
);
520 Main_IDirect3DDeviceImpl_7_3T_2T_1T_EndScene(LPDIRECT3DDEVICE7 iface
);
523 Main_IDirect3DDeviceImpl_7_3T_2T_1T_GetDirect3D(LPDIRECT3DDEVICE7 iface
,
524 LPDIRECT3D7
* lplpDirect3D3
);
527 Main_IDirect3DDeviceImpl_7_3T_2T_SetRenderTarget(LPDIRECT3DDEVICE7 iface
,
528 LPDIRECTDRAWSURFACE7 lpNewRenderTarget
,
532 Main_IDirect3DDeviceImpl_7_3T_2T_GetRenderTarget(LPDIRECT3DDEVICE7 iface
,
533 LPDIRECTDRAWSURFACE7
* lplpRenderTarget
);
536 Main_IDirect3DDeviceImpl_7_Clear(LPDIRECT3DDEVICE7 iface
,
545 Main_IDirect3DDeviceImpl_7_3T_2T_SetTransform(LPDIRECT3DDEVICE7 iface
,
546 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
547 LPD3DMATRIX lpD3DMatrix
);
550 Main_IDirect3DDeviceImpl_7_3T_2T_GetTransform(LPDIRECT3DDEVICE7 iface
,
551 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
552 LPD3DMATRIX lpD3DMatrix
);
555 Main_IDirect3DDeviceImpl_7_SetViewport(LPDIRECT3DDEVICE7 iface
,
556 LPD3DVIEWPORT7 lpData
);
559 Main_IDirect3DDeviceImpl_7_3T_2T_MultiplyTransform(LPDIRECT3DDEVICE7 iface
,
560 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
561 LPD3DMATRIX lpD3DMatrix
);
564 Main_IDirect3DDeviceImpl_7_GetViewport(LPDIRECT3DDEVICE7 iface
,
565 LPD3DVIEWPORT7 lpData
);
568 Main_IDirect3DDeviceImpl_7_SetMaterial(LPDIRECT3DDEVICE7 iface
,
569 LPD3DMATERIAL7 lpMat
);
572 Main_IDirect3DDeviceImpl_7_GetMaterial(LPDIRECT3DDEVICE7 iface
,
573 LPD3DMATERIAL7 lpMat
);
576 Main_IDirect3DDeviceImpl_7_SetLight(LPDIRECT3DDEVICE7 iface
,
578 LPD3DLIGHT7 lpLight
);
581 Main_IDirect3DDeviceImpl_7_GetLight(LPDIRECT3DDEVICE7 iface
,
583 LPD3DLIGHT7 lpLight
);
586 Main_IDirect3DDeviceImpl_7_3T_2T_SetRenderState(LPDIRECT3DDEVICE7 iface
,
587 D3DRENDERSTATETYPE dwRenderStateType
,
588 DWORD dwRenderState
);
591 Main_IDirect3DDeviceImpl_7_3T_2T_GetRenderState(LPDIRECT3DDEVICE7 iface
,
592 D3DRENDERSTATETYPE dwRenderStateType
,
593 LPDWORD lpdwRenderState
);
596 Main_IDirect3DDeviceImpl_7_BeginStateBlock(LPDIRECT3DDEVICE7 iface
);
599 Main_IDirect3DDeviceImpl_7_EndStateBlock(LPDIRECT3DDEVICE7 iface
,
600 LPDWORD lpdwBlockHandle
);
603 Main_IDirect3DDeviceImpl_7_PreLoad(LPDIRECT3DDEVICE7 iface
,
604 LPDIRECTDRAWSURFACE7 lpddsTexture
);
607 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitive(LPDIRECT3DDEVICE7 iface
,
608 D3DPRIMITIVETYPE d3dptPrimitiveType
,
609 DWORD d3dvtVertexType
,
615 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitive(LPDIRECT3DDEVICE7 iface
,
616 D3DPRIMITIVETYPE d3dptPrimitiveType
,
617 DWORD d3dvtVertexType
,
625 Main_IDirect3DDeviceImpl_7_3T_2T_SetClipStatus(LPDIRECT3DDEVICE7 iface
,
626 LPD3DCLIPSTATUS lpD3DClipStatus
);
629 Main_IDirect3DDeviceImpl_7_3T_2T_GetClipStatus(LPDIRECT3DDEVICE7 iface
,
630 LPD3DCLIPSTATUS lpD3DClipStatus
);
633 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitiveStrided(LPDIRECT3DDEVICE7 iface
,
634 D3DPRIMITIVETYPE d3dptPrimitiveType
,
636 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData
,
641 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE7 iface
,
642 D3DPRIMITIVETYPE d3dptPrimitiveType
,
644 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData
,
651 Main_IDirect3DDeviceImpl_7_3T_DrawPrimitiveVB(LPDIRECT3DDEVICE7 iface
,
652 D3DPRIMITIVETYPE d3dptPrimitiveType
,
653 LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf
,
659 Main_IDirect3DDeviceImpl_7_3T_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE7 iface
,
660 D3DPRIMITIVETYPE d3dptPrimitiveType
,
661 LPDIRECT3DVERTEXBUFFER7 lpD3DVertexBuf
,
669 Main_IDirect3DDeviceImpl_7_3T_ComputeSphereVisibility(LPDIRECT3DDEVICE7 iface
,
670 LPD3DVECTOR lpCenters
,
674 LPDWORD lpdwReturnValues
);
677 Main_IDirect3DDeviceImpl_7_3T_GetTexture(LPDIRECT3DDEVICE7 iface
,
679 LPDIRECTDRAWSURFACE7
* lpTexture
);
682 Main_IDirect3DDeviceImpl_7_3T_SetTexture(LPDIRECT3DDEVICE7 iface
,
684 LPDIRECTDRAWSURFACE7 lpTexture
);
687 Main_IDirect3DDeviceImpl_7_3T_GetTextureStageState(LPDIRECT3DDEVICE7 iface
,
689 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType
,
693 Main_IDirect3DDeviceImpl_7_3T_SetTextureStageState(LPDIRECT3DDEVICE7 iface
,
695 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType
,
699 Main_IDirect3DDeviceImpl_7_3T_ValidateDevice(LPDIRECT3DDEVICE7 iface
,
703 Main_IDirect3DDeviceImpl_7_ApplyStateBlock(LPDIRECT3DDEVICE7 iface
,
704 DWORD dwBlockHandle
);
707 Main_IDirect3DDeviceImpl_7_CaptureStateBlock(LPDIRECT3DDEVICE7 iface
,
708 DWORD dwBlockHandle
);
711 Main_IDirect3DDeviceImpl_7_DeleteStateBlock(LPDIRECT3DDEVICE7 iface
,
712 DWORD dwBlockHandle
);
715 Main_IDirect3DDeviceImpl_7_CreateStateBlock(LPDIRECT3DDEVICE7 iface
,
716 D3DSTATEBLOCKTYPE d3dsbType
,
717 LPDWORD lpdwBlockHandle
);
720 Main_IDirect3DDeviceImpl_7_Load(LPDIRECT3DDEVICE7 iface
,
721 LPDIRECTDRAWSURFACE7 lpDestTex
,
723 LPDIRECTDRAWSURFACE7 lpSrcTex
,
728 Main_IDirect3DDeviceImpl_7_LightEnable(LPDIRECT3DDEVICE7 iface
,
733 Main_IDirect3DDeviceImpl_7_GetLightEnable(LPDIRECT3DDEVICE7 iface
,
738 Main_IDirect3DDeviceImpl_7_SetClipPlane(LPDIRECT3DDEVICE7 iface
,
740 D3DVALUE
* pPlaneEquation
);
743 Main_IDirect3DDeviceImpl_7_GetClipPlane(LPDIRECT3DDEVICE7 iface
,
745 D3DVALUE
* pPlaneEquation
);
748 Main_IDirect3DDeviceImpl_7_GetInfo(LPDIRECT3DDEVICE7 iface
,
750 LPVOID pDevInfoStruct
,
754 Main_IDirect3DDeviceImpl_3_2T_1T_GetCaps(LPDIRECT3DDEVICE3 iface
,
755 LPD3DDEVICEDESC lpD3DHWDevDesc
,
756 LPD3DDEVICEDESC lpD3DHELDevDesc
);
759 Main_IDirect3DDeviceImpl_3_2T_1T_GetStats(LPDIRECT3DDEVICE3 iface
,
760 LPD3DSTATS lpD3DStats
);
763 Main_IDirect3DDeviceImpl_3_2T_1T_AddViewport(LPDIRECT3DDEVICE3 iface
,
764 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3
);
767 Main_IDirect3DDeviceImpl_3_2T_1T_DeleteViewport(LPDIRECT3DDEVICE3 iface
,
768 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3
);
771 Main_IDirect3DDeviceImpl_3_2T_1T_NextViewport(LPDIRECT3DDEVICE3 iface
,
772 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3
,
773 LPDIRECT3DVIEWPORT3
* lplpDirect3DViewport3
,
777 Main_IDirect3DDeviceImpl_3_2T_SetCurrentViewport(LPDIRECT3DDEVICE3 iface
,
778 LPDIRECT3DVIEWPORT3 lpDirect3DViewport3
);
781 Main_IDirect3DDeviceImpl_3_2T_GetCurrentViewport(LPDIRECT3DDEVICE3 iface
,
782 LPDIRECT3DVIEWPORT3
* lplpDirect3DViewport3
);
785 Main_IDirect3DDeviceImpl_3_Begin(LPDIRECT3DDEVICE3 iface
,
786 D3DPRIMITIVETYPE d3dptPrimitiveType
,
787 DWORD dwVertexTypeDesc
,
791 Main_IDirect3DDeviceImpl_3_BeginIndexed(LPDIRECT3DDEVICE3 iface
,
792 D3DPRIMITIVETYPE d3dptPrimitiveType
,
793 DWORD d3dvtVertexType
,
799 Main_IDirect3DDeviceImpl_3_2T_Vertex(LPDIRECT3DDEVICE3 iface
,
800 LPVOID lpVertexType
);
803 Main_IDirect3DDeviceImpl_3_2T_Index(LPDIRECT3DDEVICE3 iface
,
807 Main_IDirect3DDeviceImpl_3_2T_End(LPDIRECT3DDEVICE3 iface
,
811 Main_IDirect3DDeviceImpl_3_2T_GetLightState(LPDIRECT3DDEVICE3 iface
,
812 D3DLIGHTSTATETYPE dwLightStateType
,
813 LPDWORD lpdwLightState
);
816 Main_IDirect3DDeviceImpl_3_2T_SetLightState(LPDIRECT3DDEVICE3 iface
,
817 D3DLIGHTSTATETYPE dwLightStateType
,
821 Main_IDirect3DDeviceImpl_2_1T_SwapTextureHandles(LPDIRECT3DDEVICE2 iface
,
822 LPDIRECT3DTEXTURE2 lpD3DTex1
,
823 LPDIRECT3DTEXTURE2 lpD3DTex2
);
826 Main_IDirect3DDeviceImpl_2_1T_EnumTextureFormats(LPDIRECT3DDEVICE2 iface
,
827 LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc
,
831 Main_IDirect3DDeviceImpl_2_Begin(LPDIRECT3DDEVICE2 iface
,
832 D3DPRIMITIVETYPE d3dpt
,
833 D3DVERTEXTYPE dwVertexTypeDesc
,
837 Main_IDirect3DDeviceImpl_2_BeginIndexed(LPDIRECT3DDEVICE2 iface
,
838 D3DPRIMITIVETYPE d3dptPrimitiveType
,
839 D3DVERTEXTYPE d3dvtVertexType
,
845 Main_IDirect3DDeviceImpl_2_DrawPrimitive(LPDIRECT3DDEVICE2 iface
,
846 D3DPRIMITIVETYPE d3dptPrimitiveType
,
847 D3DVERTEXTYPE d3dvtVertexType
,
853 Main_IDirect3DDeviceImpl_2_DrawIndexedPrimitive(LPDIRECT3DDEVICE2 iface
,
854 D3DPRIMITIVETYPE d3dptPrimitiveType
,
855 D3DVERTEXTYPE d3dvtVertexType
,
863 Main_IDirect3DDeviceImpl_1_Initialize(LPDIRECT3DDEVICE iface
,
864 LPDIRECT3D lpDirect3D
,
866 LPD3DDEVICEDESC lpD3DDVDesc
);
869 Main_IDirect3DDeviceImpl_1_CreateExecuteBuffer(LPDIRECT3DDEVICE iface
,
870 LPD3DEXECUTEBUFFERDESC lpDesc
,
871 LPDIRECT3DEXECUTEBUFFER
* lplpDirect3DExecuteBuffer
,
872 IUnknown
* pUnkOuter
);
875 Main_IDirect3DDeviceImpl_1_Execute(LPDIRECT3DDEVICE iface
,
876 LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer
,
877 LPDIRECT3DVIEWPORT lpDirect3DViewport
,
881 Main_IDirect3DDeviceImpl_1_Pick(LPDIRECT3DDEVICE iface
,
882 LPDIRECT3DEXECUTEBUFFER lpDirect3DExecuteBuffer
,
883 LPDIRECT3DVIEWPORT lpDirect3DViewport
,
888 Main_IDirect3DDeviceImpl_1_GetPickRecords(LPDIRECT3DDEVICE iface
,
890 LPD3DPICKRECORD lpD3DPickRec
);
893 Main_IDirect3DDeviceImpl_1_CreateMatrix(LPDIRECT3DDEVICE iface
,
894 LPD3DMATRIXHANDLE lpD3DMatHandle
);
897 Main_IDirect3DDeviceImpl_1_SetMatrix(LPDIRECT3DDEVICE iface
,
898 D3DMATRIXHANDLE D3DMatHandle
,
899 LPD3DMATRIX lpD3DMatrix
);
902 Main_IDirect3DDeviceImpl_1_GetMatrix(LPDIRECT3DDEVICE iface
,
903 D3DMATRIXHANDLE D3DMatHandle
,
904 LPD3DMATRIX lpD3DMatrix
);
907 Main_IDirect3DDeviceImpl_1_DeleteMatrix(LPDIRECT3DDEVICE iface
,
908 D3DMATRIXHANDLE D3DMatHandle
);
911 Thunk_IDirect3DDeviceImpl_3_QueryInterface(LPDIRECT3DDEVICE3 iface
,
916 Thunk_IDirect3DDeviceImpl_2_QueryInterface(LPDIRECT3DDEVICE2 iface
,
921 Thunk_IDirect3DDeviceImpl_1_QueryInterface(LPDIRECT3DDEVICE iface
,
926 Thunk_IDirect3DDeviceImpl_3_AddRef(LPDIRECT3DDEVICE3 iface
);
929 Thunk_IDirect3DDeviceImpl_2_AddRef(LPDIRECT3DDEVICE2 iface
);
932 Thunk_IDirect3DDeviceImpl_1_AddRef(LPDIRECT3DDEVICE iface
);
935 Thunk_IDirect3DDeviceImpl_3_Release(LPDIRECT3DDEVICE3 iface
);
938 Thunk_IDirect3DDeviceImpl_2_Release(LPDIRECT3DDEVICE2 iface
);
941 Thunk_IDirect3DDeviceImpl_1_Release(LPDIRECT3DDEVICE iface
);
944 Thunk_IDirect3DDeviceImpl_2_AddViewport(LPDIRECT3DDEVICE2 iface
,
945 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2
);
948 Thunk_IDirect3DDeviceImpl_1_AddViewport(LPDIRECT3DDEVICE iface
,
949 LPDIRECT3DVIEWPORT lpDirect3DViewport
);
952 Thunk_IDirect3DDeviceImpl_2_DeleteViewport(LPDIRECT3DDEVICE2 iface
,
953 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2
);
956 Thunk_IDirect3DDeviceImpl_1_DeleteViewport(LPDIRECT3DDEVICE iface
,
957 LPDIRECT3DVIEWPORT lpDirect3DViewport
);
960 Thunk_IDirect3DDeviceImpl_2_NextViewport(LPDIRECT3DDEVICE3 iface
,
961 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2
,
962 LPDIRECT3DVIEWPORT2
* lplpDirect3DViewport2
,
966 Thunk_IDirect3DDeviceImpl_1_NextViewport(LPDIRECT3DDEVICE3 iface
,
967 LPDIRECT3DVIEWPORT lpDirect3DViewport
,
968 LPDIRECT3DVIEWPORT
* lplpDirect3DViewport
,
972 Thunk_IDirect3DDeviceImpl_3_GetDirect3D(LPDIRECT3DDEVICE3 iface
,
973 LPDIRECT3D3
* lplpDirect3D3
);
976 Thunk_IDirect3DDeviceImpl_2_GetDirect3D(LPDIRECT3DDEVICE2 iface
,
977 LPDIRECT3D2
* lplpDirect3D2
);
980 Thunk_IDirect3DDeviceImpl_1_GetDirect3D(LPDIRECT3DDEVICE iface
,
981 LPDIRECT3D
* lplpDirect3D
);
984 Thunk_IDirect3DDeviceImpl_2_SetCurrentViewport(LPDIRECT3DDEVICE2 iface
,
985 LPDIRECT3DVIEWPORT2 lpDirect3DViewport2
);
988 Thunk_IDirect3DDeviceImpl_2_GetCurrentViewport(LPDIRECT3DDEVICE2 iface
,
989 LPDIRECT3DVIEWPORT2
* lpDirect3DViewport2
);
992 Thunk_IDirect3DDeviceImpl_3_EnumTextureFormats(LPDIRECT3DDEVICE3 iface
,
993 LPD3DENUMPIXELFORMATSCALLBACK lpD3DEnumPixelProc
,
997 Thunk_IDirect3DDeviceImpl_3_BeginScene(LPDIRECT3DDEVICE3 iface
);
1000 Thunk_IDirect3DDeviceImpl_2_BeginScene(LPDIRECT3DDEVICE2 iface
);
1003 Thunk_IDirect3DDeviceImpl_1_BeginScene(LPDIRECT3DDEVICE iface
);
1006 Thunk_IDirect3DDeviceImpl_3_EndScene(LPDIRECT3DDEVICE3 iface
);
1009 Thunk_IDirect3DDeviceImpl_2_EndScene(LPDIRECT3DDEVICE2 iface
);
1012 Thunk_IDirect3DDeviceImpl_1_EndScene(LPDIRECT3DDEVICE iface
);
1015 Thunk_IDirect3DDeviceImpl_3_SetTransform(LPDIRECT3DDEVICE3 iface
,
1016 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1017 LPD3DMATRIX lpD3DMatrix
);
1020 Thunk_IDirect3DDeviceImpl_2_SetTransform(LPDIRECT3DDEVICE2 iface
,
1021 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1022 LPD3DMATRIX lpD3DMatrix
);
1025 Thunk_IDirect3DDeviceImpl_3_GetTransform(LPDIRECT3DDEVICE3 iface
,
1026 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1027 LPD3DMATRIX lpD3DMatrix
);
1030 Thunk_IDirect3DDeviceImpl_2_GetTransform(LPDIRECT3DDEVICE2 iface
,
1031 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1032 LPD3DMATRIX lpD3DMatrix
);
1035 Thunk_IDirect3DDeviceImpl_3_MultiplyTransform(LPDIRECT3DDEVICE3 iface
,
1036 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1037 LPD3DMATRIX lpD3DMatrix
);
1040 Thunk_IDirect3DDeviceImpl_2_MultiplyTransform(LPDIRECT3DDEVICE2 iface
,
1041 D3DTRANSFORMSTATETYPE dtstTransformStateType
,
1042 LPD3DMATRIX lpD3DMatrix
);
1045 Thunk_IDirect3DDeviceImpl_3_SetRenderState(LPDIRECT3DDEVICE3 iface
,
1046 D3DRENDERSTATETYPE dwRenderStateType
,
1047 DWORD dwRenderState
);
1050 Thunk_IDirect3DDeviceImpl_2_SetRenderState(LPDIRECT3DDEVICE2 iface
,
1051 D3DRENDERSTATETYPE dwRenderStateType
,
1052 DWORD dwRenderState
);
1055 Thunk_IDirect3DDeviceImpl_3_GetRenderState(LPDIRECT3DDEVICE3 iface
,
1056 D3DRENDERSTATETYPE dwRenderStateType
,
1057 LPDWORD lpdwRenderState
);
1060 Thunk_IDirect3DDeviceImpl_2_GetRenderState(LPDIRECT3DDEVICE2 iface
,
1061 D3DRENDERSTATETYPE dwRenderStateType
,
1062 LPDWORD lpdwRenderState
);
1065 Thunk_IDirect3DDeviceImpl_3_DrawPrimitive(LPDIRECT3DDEVICE3 iface
,
1066 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1067 DWORD d3dvtVertexType
,
1069 DWORD dwVertexCount
,
1073 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitive(LPDIRECT3DDEVICE3 iface
,
1074 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1075 DWORD d3dvtVertexType
,
1077 DWORD dwVertexCount
,
1083 Thunk_IDirect3DDeviceImpl_3_SetClipStatus(LPDIRECT3DDEVICE3 iface
,
1084 LPD3DCLIPSTATUS lpD3DClipStatus
);
1087 Thunk_IDirect3DDeviceImpl_2_SetClipStatus(LPDIRECT3DDEVICE2 iface
,
1088 LPD3DCLIPSTATUS lpD3DClipStatus
);
1091 Thunk_IDirect3DDeviceImpl_3_GetClipStatus(LPDIRECT3DDEVICE3 iface
,
1092 LPD3DCLIPSTATUS lpD3DClipStatus
);
1095 Thunk_IDirect3DDeviceImpl_2_GetClipStatus(LPDIRECT3DDEVICE2 iface
,
1096 LPD3DCLIPSTATUS lpD3DClipStatus
);
1099 Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveStrided(LPDIRECT3DDEVICE3 iface
,
1100 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1102 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData
,
1103 DWORD dwVertexCount
,
1107 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveStrided(LPDIRECT3DDEVICE3 iface
,
1108 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1110 LPD3DDRAWPRIMITIVESTRIDEDDATA lpD3DDrawPrimStrideData
,
1111 DWORD dwVertexCount
,
1117 Thunk_IDirect3DDeviceImpl_3_ComputeSphereVisibility(LPDIRECT3DDEVICE3 iface
,
1118 LPD3DVECTOR lpCenters
,
1122 LPDWORD lpdwReturnValues
);
1125 Thunk_IDirect3DDeviceImpl_3_GetTextureStageState(LPDIRECT3DDEVICE3 iface
,
1127 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType
,
1131 Thunk_IDirect3DDeviceImpl_3_SetTextureStageState(LPDIRECT3DDEVICE3 iface
,
1133 D3DTEXTURESTAGESTATETYPE d3dTexStageStateType
,
1137 Thunk_IDirect3DDeviceImpl_3_ValidateDevice(LPDIRECT3DDEVICE3 iface
,
1138 LPDWORD lpdwPasses
);
1141 Thunk_IDirect3DDeviceImpl_2_GetCaps(LPDIRECT3DDEVICE2 iface
,
1142 LPD3DDEVICEDESC lpD3DHWDevDesc
,
1143 LPD3DDEVICEDESC lpD3DHELDevDesc
);
1146 Thunk_IDirect3DDeviceImpl_1_GetCaps(LPDIRECT3DDEVICE iface
,
1147 LPD3DDEVICEDESC lpD3DHWDevDesc
,
1148 LPD3DDEVICEDESC lpD3DHELDevDesc
);
1151 Thunk_IDirect3DDeviceImpl_1_SwapTextureHandles(LPDIRECT3DDEVICE iface
,
1152 LPDIRECT3DTEXTURE lpD3Dtex1
,
1153 LPDIRECT3DTEXTURE lpD3DTex2
);
1156 Thunk_IDirect3DDeviceImpl_2_GetStats(LPDIRECT3DDEVICE2 iface
,
1157 LPD3DSTATS lpD3DStats
);
1160 Thunk_IDirect3DDeviceImpl_1_GetStats(LPDIRECT3DDEVICE iface
,
1161 LPD3DSTATS lpD3DStats
);
1164 Thunk_IDirect3DDeviceImpl_3_SetRenderTarget(LPDIRECT3DDEVICE3 iface
,
1165 LPDIRECTDRAWSURFACE4 lpNewRenderTarget
,
1169 Thunk_IDirect3DDeviceImpl_3_GetRenderTarget(LPDIRECT3DDEVICE3 iface
,
1170 LPDIRECTDRAWSURFACE4
* lplpRenderTarget
);
1173 Thunk_IDirect3DDeviceImpl_2_SetRenderTarget(LPDIRECT3DDEVICE2 iface
,
1174 LPDIRECTDRAWSURFACE lpNewRenderTarget
,
1178 Thunk_IDirect3DDeviceImpl_2_GetRenderTarget(LPDIRECT3DDEVICE2 iface
,
1179 LPDIRECTDRAWSURFACE
* lplpRenderTarget
);
1182 Thunk_IDirect3DDeviceImpl_2_Vertex(LPDIRECT3DDEVICE2 iface
,
1183 LPVOID lpVertexType
);
1186 Thunk_IDirect3DDeviceImpl_2_Index(LPDIRECT3DDEVICE2 iface
,
1190 Thunk_IDirect3DDeviceImpl_2_End(LPDIRECT3DDEVICE2 iface
,
1194 Thunk_IDirect3DDeviceImpl_2_GetLightState(LPDIRECT3DDEVICE2 iface
,
1195 D3DLIGHTSTATETYPE dwLightStateType
,
1196 LPDWORD lpdwLightState
);
1199 Thunk_IDirect3DDeviceImpl_2_SetLightState(LPDIRECT3DDEVICE2 iface
,
1200 D3DLIGHTSTATETYPE dwLightStateType
,
1201 DWORD dwLightState
);
1204 Thunk_IDirect3DDeviceImpl_1_EnumTextureFormats(LPDIRECT3DDEVICE iface
,
1205 LPD3DENUMTEXTUREFORMATSCALLBACK lpD3DEnumTextureProc
,
1209 Thunk_IDirect3DDeviceImpl_3_SetTexture(LPDIRECT3DDEVICE3 iface
,
1211 LPDIRECT3DTEXTURE2 lpTexture2
);
1214 Thunk_IDirect3DDeviceImpl_3_DrawPrimitiveVB(LPDIRECT3DDEVICE3 iface
,
1215 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1216 LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf
,
1217 DWORD dwStartVertex
,
1218 DWORD dwNumVertices
,
1222 Thunk_IDirect3DDeviceImpl_3_DrawIndexedPrimitiveVB(LPDIRECT3DDEVICE3 iface
,
1223 D3DPRIMITIVETYPE d3dptPrimitiveType
,
1224 LPDIRECT3DVERTEXBUFFER lpD3DVertexBuf
,
1230 Thunk_IDirect3DDeviceImpl_3_GetTexture(LPDIRECT3DDEVICE3 iface
,
1232 LPDIRECT3DTEXTURE2
* lplpTexture2
);
1234 #endif /* __GRAPHICS_WINE_D3D_PRIVATE_H */