2 * Direct3D 8 private include file
4 * Copyright 2002-2004 Jason Edmeades
5 * Copyright 2003-2004 Raphael Junqueira
6 * Copyright 2004 Christian Costa
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 __WINE_D3D8_PRIVATE_H
24 #define __WINE_D3D8_PRIVATE_H
26 #ifndef __WINE_CONFIG_H
27 # error You must include config.h to use this header
30 /* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES */
31 #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
33 #define GLX_GLXEXT_PROTOTYPES
35 #ifdef HAVE_GL_GLEXT_H
36 # include <GL/glext.h>
44 /* Redefines the constants */
45 #define CALLBACK __stdcall
46 #define WINAPI __stdcall
47 #define APIENTRY WINAPI
51 extern void (*wine_tsx11_lock_ptr
)(void);
52 extern void (*wine_tsx11_unlock_ptr
)(void);
54 /* As GLX relies on X, this is needed */
57 #define ENTER_GL() ++num_lock; TRACE("inc lock to: %d\n", num_lock); wine_tsx11_lock_ptr()
58 #define LEAVE_GL() if (num_lock > 2) TRACE("fucking locks: %d\n", num_lock); --num_lock; wine_tsx11_unlock_ptr()
60 #define ENTER_GL() wine_tsx11_lock_ptr()
61 #define LEAVE_GL() wine_tsx11_unlock_ptr()
69 #include "wine/wined3d_interface.h"
81 #define MAX_PALETTES 256
82 #define MAX_STREAMS 16
83 #define MAX_CLIPPLANES D3DMAXUSERCLIPPLANES
84 #define MAX_LEVELS 256
86 /* Other useful values */
87 #define HIGHEST_RENDER_STATE 174
88 #define HIGHEST_TEXTURE_STATE 29
89 #define HIGHEST_TRANSFORMSTATE 512
90 #define D3DSBT_RECORDED 0xfffffffe
92 /* Performance changes - Only reapply what is necessary */
93 #define REAPPLY_ALPHAOP 0x0001
94 #define REAPPLY_ALL 0xFFFF
96 /* CreateVertexShader can return > 0xFFFF */
97 #define VS_HIGHESTFIXEDFXF 0xF0000000
98 #define VERTEX_SHADER(Handle) \
99 ((Handle <= VS_HIGHESTFIXEDFXF) ? ((Handle >= sizeof(VertexShaders) / sizeof(IDirect3DVertexShaderImpl*)) ? NULL : VertexShaders[Handle]) : VertexShaders[Handle - VS_HIGHESTFIXEDFXF])
100 #define VERTEX_SHADER_DECL(Handle) \
101 ((Handle <= VS_HIGHESTFIXEDFXF) ? ((Handle >= sizeof(VertexShaderDeclarations) / sizeof(IDirect3DVertexShaderDeclarationImpl*)) ? NULL : VertexShaderDeclarations[Handle]) : VertexShaderDeclarations[Handle - VS_HIGHESTFIXEDFXF])
102 #define PIXEL_SHADER(Handle) \
103 ((Handle <= VS_HIGHESTFIXEDFXF) ? ((Handle >= sizeof(PixelShaders) / sizeof(IDirect3DPixelShaderImpl*)) ? NULL : PixelShaders[Handle]) : PixelShaders[Handle - VS_HIGHESTFIXEDFXF])
105 /* Direct3D8 Interfaces: */
106 typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl
;
107 typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl
;
108 typedef struct IDirect3D8Impl IDirect3D8Impl
;
109 typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl
;
110 typedef struct IDirect3DTexture8Impl IDirect3DTexture8Impl
;
111 typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl
;
112 typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl
;
113 typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl
;
114 typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl
;
115 typedef struct IDirect3DResource8Impl IDirect3DResource8Impl
;
116 typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl
;
117 typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl
;
119 /** Private Interfaces: */
120 typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl
;
121 typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl
;
122 typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl
;
123 typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl
;
125 typedef struct D3DSHADERVECTOR
{
132 typedef struct D3DSHADERSCALAR
{
136 #define D3D8_VSHADER_MAX_CONSTANTS 96
137 typedef D3DSHADERVECTOR VSHADERCONSTANTS8
[D3D8_VSHADER_MAX_CONSTANTS
];
139 typedef struct VSHADERDATA8
{
140 /** Run Time Shader Function Constants */
141 /*D3DXBUFFER* constants;*/
143 /** Shader Code as char ... */
148 /** temporary here waiting for buffer code */
149 typedef struct VSHADERINPUTDATA8
{
150 D3DSHADERVECTOR V
[17];
153 /** temporary here waiting for buffer code */
154 typedef struct VSHADEROUTPUTDATA8
{
155 D3DSHADERVECTOR oPos
;
156 D3DSHADERVECTOR oD
[2];
157 D3DSHADERVECTOR oT
[8];
158 D3DSHADERVECTOR oFog
;
159 D3DSHADERVECTOR oPts
;
160 } VSHADEROUTPUTDATA8
;
163 #define D3D8_PSHADER_MAX_CONSTANTS 32
164 typedef D3DSHADERVECTOR PSHADERCONSTANTS8
[D3D8_PSHADER_MAX_CONSTANTS
];
166 typedef struct PSHADERDATA8
{
167 /** Run Time Shader Function Constants */
168 /*D3DXBUFFER* constants;*/
170 /** Shader Code as char ... */
175 /** temporary here waiting for buffer code */
176 typedef struct PSHADERINPUTDATA8
{
177 D3DSHADERVECTOR V
[2];
178 D3DSHADERVECTOR T
[8];
179 D3DSHADERVECTOR S
[16];
180 /*D3DSHADERVECTOR R[12];*/
183 /** temporary here waiting for buffer code */
184 typedef struct PSHADEROUTPUTDATA8
{
185 D3DSHADERVECTOR oC
[4];
186 D3DSHADERVECTOR oDepth
;
187 } PSHADEROUTPUTDATA8
;
190 * Private definitions for internal use only
192 typedef struct PLIGHTINFOEL PLIGHTINFOEL
;
193 struct PLIGHTINFOEL
{
194 D3DLIGHT8 OriginalParms
;
201 /* Converted parms to speed up swapping lights */
214 #define checkGLcall(A) \
216 GLint err = glGetError(); \
217 if (err != GL_NO_ERROR) { \
218 FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \
220 TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
223 #define vcheckGLcall(A) \
225 GLint err = glGetError(); \
226 if (err != GL_NO_ERROR) { \
227 FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \
229 VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \
233 #include "d3dcore_gl.h"
236 #define GL_LIMITS(ExtName) (This->direct3d8->gl_info.max_##ExtName)
237 #define GL_SUPPORT(ExtName) (TRUE == This->direct3d8->gl_info.supported[ExtName])
238 #define GL_SUPPORT_DEV(ExtName, dev) (TRUE == (dev)->direct3d8->gl_info.supported[ExtName])
239 #define GL_EXTCALL(FuncName) (This->direct3d8->gl_info.FuncName)
240 #define GL_EXTCALL_DEV(FuncName, dev) ((dev)->direct3d8->gl_info.FuncName)
243 #define D3DCOLOR_R(dw) (((float) (((dw) >> 16) & 0xFF)) / 255.0f)
244 #define D3DCOLOR_G(dw) (((float) (((dw) >> 8) & 0xFF)) / 255.0f)
245 #define D3DCOLOR_B(dw) (((float) (((dw) >> 0) & 0xFF)) / 255.0f)
246 #define D3DCOLOR_A(dw) (((float) (((dw) >> 24) & 0xFF)) / 255.0f)
248 #define D3DCOLORTOCOLORVALUE(dw, col) \
249 (col).r = D3DCOLOR_R(dw); \
250 (col).g = D3DCOLOR_G(dw); \
251 (col).b = D3DCOLOR_B(dw); \
252 (col).a = D3DCOLOR_A(dw);
254 #define D3DCOLORTOVECTOR4(dw, vec) \
255 (vec).x = D3DCOLOR_R(dw); \
256 (vec).y = D3DCOLOR_G(dw); \
257 (vec).z = D3DCOLOR_B(dw); \
258 (vec).w = D3DCOLOR_A(dw);
260 #define D3DCOLORTOGLFLOAT4(dw, vec) \
261 (vec)[0] = D3DCOLOR_R(dw); \
262 (vec)[1] = D3DCOLOR_G(dw); \
263 (vec)[2] = D3DCOLOR_B(dw); \
264 (vec)[3] = D3DCOLOR_A(dw);
266 /* ===========================================================================
267 The interfactes themselves
268 =========================================================================== */
274 /*****************************************************************************
275 * Predeclare the interface implementation structures
277 extern IDirect3D8Vtbl Direct3D8_Vtbl
;
279 /*****************************************************************************
280 * IDirect3D implementation structure
282 struct IDirect3D8Impl
284 /* IUnknown fields */
285 IDirect3D8Vtbl
*lpVtbl
;
288 /* The WineD3D device */
291 /* IDirect3D8 fields */
294 IDirect3D8Impl
*direct3d8
;
298 extern HRESULT WINAPI
IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface
,REFIID refiid
,LPVOID
*obj
);
299 extern ULONG WINAPI
IDirect3D8Impl_AddRef(LPDIRECT3D8 iface
);
300 extern ULONG WINAPI
IDirect3D8Impl_Release(LPDIRECT3D8 iface
);
303 extern HRESULT WINAPI
IDirect3D8Impl_RegisterSoftwareDevice(LPDIRECT3D8 iface
, void* pInitializeFunction
);
304 extern UINT WINAPI
IDirect3D8Impl_GetAdapterCount(LPDIRECT3D8 iface
);
305 extern HRESULT WINAPI
IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface
, UINT Adapter
, DWORD Flags
, D3DADAPTER_IDENTIFIER8
* pIdentifier
);
306 extern UINT WINAPI
IDirect3D8Impl_GetAdapterModeCount(LPDIRECT3D8 iface
, UINT Adapter
);
307 extern HRESULT WINAPI
IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface
, UINT Adapter
, UINT Mode
, D3DDISPLAYMODE
* pMode
);
308 extern HRESULT WINAPI
IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface
, UINT Adapter
, D3DDISPLAYMODE
* pMode
);
309 extern HRESULT WINAPI
IDirect3D8Impl_CheckDeviceType(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE CheckType
, D3DFORMAT DisplayFormat
,
310 D3DFORMAT BackBufferFormat
, BOOL Windowed
);
311 extern HRESULT WINAPI
IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE DeviceType
, D3DFORMAT AdapterFormat
,
312 DWORD Usage
, D3DRESOURCETYPE RType
, D3DFORMAT CheckFormat
);
313 extern HRESULT WINAPI
IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE DeviceType
, D3DFORMAT SurfaceFormat
,
314 BOOL Windowed
, D3DMULTISAMPLE_TYPE MultiSampleType
);
315 extern HRESULT WINAPI
IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE DeviceType
, D3DFORMAT AdapterFormat
,
316 D3DFORMAT RenderTargetFormat
, D3DFORMAT DepthStencilFormat
);
317 extern HRESULT WINAPI
IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE DeviceType
, D3DCAPS8
* pCaps
);
318 extern HMONITOR WINAPI
IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface
, UINT Adapter
);
319 extern HRESULT WINAPI
IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface
, UINT Adapter
, D3DDEVTYPE DeviceType
, HWND hFocusWindow
,
320 DWORD BehaviorFlags
, D3DPRESENT_PARAMETERS
* pPresentationParameters
,
321 IDirect3DDevice8
** ppReturnedDeviceInterface
);
323 /* ---------------- */
324 /* IDirect3DDevice8 */
325 /* ---------------- */
327 /*****************************************************************************
328 * Predeclare the interface implementation structures
330 extern IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl
;
332 /*****************************************************************************
333 * IDirect3DDevice8 implementation structure
335 struct IDirect3DDevice8Impl
337 /* IUnknown fields */
338 IDirect3DDevice8Vtbl
*lpVtbl
;
341 /* IDirect3DDevice8 fields */
342 IDirect3D8Impl
*direct3d8
;
343 IWineD3DDevice
*WineD3DDevice
;
345 IDirect3DSurface8Impl
*frontBuffer
;
346 IDirect3DSurface8Impl
*backBuffer
;
347 IDirect3DSurface8Impl
*depthStencilBuffer
;
349 IDirect3DSurface8Impl
*renderTarget
;
350 IDirect3DSurface8Impl
*stencilBufferTarget
;
352 D3DPRESENT_PARAMETERS PresentParms
;
353 D3DDEVICE_CREATION_PARAMETERS CreateParms
;
363 /* State block related */
364 BOOL isRecordingState
;
365 IDirect3DStateBlockImpl
*StateBlock
;
366 IDirect3DStateBlockImpl
*UpdateStateBlock
;
368 /* palettes texture management */
369 PALETTEENTRY palettes
[MAX_PALETTES
][256];
372 BOOL texture_shader_active
;
375 BOOL modelview_valid
;
377 BOOL view_ident
; /* true iff view matrix is identity */
378 BOOL last_was_rhw
; /* true iff last draw_primitive was in xyzrhw mode */
379 GLenum tracking_parm
; /* Which source is tracking current colour */
380 LONG tracking_color
; /* used iff GL_COLOR_MATERIAL was enabled */
381 #define DISABLED_TRACKING 0 /* Disabled */
382 #define IS_TRACKING 1 /* tracking_parm is tracking diffuse color */
383 #define NEEDS_TRACKING 2 /* Tracking needs to be enabled when needed */
384 #define NEEDS_DISABLE 3 /* Tracking needs to be disabled when needed*/
388 XVisualInfo
*visInfo
;
392 GLXContext render_ctx
;
394 GLint maxConcurrentLights
;
396 /* OpenGL Extension related */
398 /* Cursor management */
406 UINT dummyTextureName
[8];
408 /* For rendering to a texture using glCopyTexImage */
409 BOOL renderUpsideDown
;
413 extern HRESULT WINAPI
IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 iface
, REFIID refiid
, LPVOID
*obj
);
414 extern ULONG WINAPI
IDirect3DDevice8Impl_AddRef(LPDIRECT3DDEVICE8 iface
);
415 extern ULONG WINAPI
IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface
);
417 /* IDirect3DDevice8: */
418 extern HRESULT WINAPI
IDirect3DDevice8Impl_TestCooperativeLevel(LPDIRECT3DDEVICE8 iface
);
419 extern UINT WINAPI
IDirect3DDevice8Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE8 iface
);
420 extern HRESULT WINAPI
IDirect3DDevice8Impl_ResourceManagerDiscardBytes(LPDIRECT3DDEVICE8 iface
, DWORD Bytes
);
421 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetDirect3D(LPDIRECT3DDEVICE8 iface
, IDirect3D8
** ppD3D8
);
422 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface
, D3DCAPS8
* pCaps
);
423 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetDisplayMode(LPDIRECT3DDEVICE8 iface
, D3DDISPLAYMODE
* pMode
);
424 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetCreationParameters(LPDIRECT3DDEVICE8 iface
, D3DDEVICE_CREATION_PARAMETERS
* pParameters
);
425 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetCursorProperties(LPDIRECT3DDEVICE8 iface
, UINT XHotSpot
, UINT YHotSpot
, IDirect3DSurface8
* pCursorBitmap
);
426 extern void WINAPI
IDirect3DDevice8Impl_SetCursorPosition(LPDIRECT3DDEVICE8 iface
, UINT XScreenSpace
, UINT YScreenSpace
, DWORD Flags
);
427 extern BOOL WINAPI
IDirect3DDevice8Impl_ShowCursor(LPDIRECT3DDEVICE8 iface
, BOOL bShow
);
428 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE8 iface
, D3DPRESENT_PARAMETERS
* pPresentationParameters
, IDirect3DSwapChain8
** pSwapChain
);
429 extern HRESULT WINAPI
IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface
, D3DPRESENT_PARAMETERS
* pPresentationParameters
);
430 extern HRESULT WINAPI
IDirect3DDevice8Impl_Present(LPDIRECT3DDEVICE8 iface
, CONST RECT
* pSourceRect
, CONST RECT
* pDestRect
, HWND hDestWindowOverride
, CONST RGNDATA
* pDirtyRegion
);
431 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetBackBuffer(LPDIRECT3DDEVICE8 iface
, UINT BackBuffer
, D3DBACKBUFFER_TYPE Type
, IDirect3DSurface8
** ppBackBuffer
);
432 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetRasterStatus(LPDIRECT3DDEVICE8 iface
, D3DRASTER_STATUS
* pRasterStatus
);
433 extern void WINAPI
IDirect3DDevice8Impl_SetGammaRamp(LPDIRECT3DDEVICE8 iface
, DWORD Flags
, CONST D3DGAMMARAMP
* pRamp
);
434 extern void WINAPI
IDirect3DDevice8Impl_GetGammaRamp(LPDIRECT3DDEVICE8 iface
, D3DGAMMARAMP
* pRamp
);
435 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface
, UINT Width
, UINT Height
, UINT Levels
, DWORD Usage
, D3DFORMAT Format
, D3DPOOL Pool
, IDirect3DTexture8
** ppTexture
);
436 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface
, UINT Width
, UINT Height
, UINT Depth
, UINT Levels
, DWORD Usage
, D3DFORMAT Format
, D3DPOOL Pool
, IDirect3DVolumeTexture8
** ppVolumeTexture
);
437 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface
, UINT EdgeLength
, UINT Levels
, DWORD Usage
, D3DFORMAT Format
, D3DPOOL Pool
, IDirect3DCubeTexture8
** ppCubeTexture
);
438 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface
, UINT Length
, DWORD Usage
, DWORD FVF
, D3DPOOL Pool
, IDirect3DVertexBuffer8
** ppVertexBuffer
);
439 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface
, UINT Length
, DWORD Usage
, D3DFORMAT Format
, D3DPOOL Pool
, IDirect3DIndexBuffer8
** ppIndexBuffer
);
440 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateRenderTarget(LPDIRECT3DDEVICE8 iface
, UINT Width
, UINT Height
, D3DFORMAT Format
, D3DMULTISAMPLE_TYPE MultiSample
, BOOL Lockable
, IDirect3DSurface8
** ppSurface
);
441 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE8 iface
, UINT Width
, UINT Height
, D3DFORMAT Format
, D3DMULTISAMPLE_TYPE MultiSample
, IDirect3DSurface8
** ppSurface
);
442 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface
, UINT Width
, UINT Height
, D3DFORMAT Format
, IDirect3DSurface8
** ppSurface
);
443 extern HRESULT WINAPI
IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
* pSourceSurface
, CONST RECT
* pSourceRectsArray
, UINT cRects
, IDirect3DSurface8
* pDestinationSurface
, CONST POINT
* pDestPointsArray
);
444 extern HRESULT WINAPI
IDirect3DDevice8Impl_UpdateTexture(LPDIRECT3DDEVICE8 iface
, IDirect3DBaseTexture8
* pSourceTexture
, IDirect3DBaseTexture8
* pDestinationTexture
);
445 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetFrontBuffer(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
* pDestSurface
);
446 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
* pRenderTarget
, IDirect3DSurface8
* pNewZStencil
);
447 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
** ppRenderTarget
);
448 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
** ppZStencilSurface
);
449 extern HRESULT WINAPI
IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface
);
450 extern HRESULT WINAPI
IDirect3DDevice8Impl_EndScene(LPDIRECT3DDEVICE8 iface
);
451 extern HRESULT WINAPI
IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface
, DWORD Count
, CONST D3DRECT
* pRects
, DWORD Flags
, D3DCOLOR Color
, float Z
, DWORD Stencil
);
452 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface
, D3DTRANSFORMSTATETYPE State
, CONST D3DMATRIX
* pMatrix
);
453 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface
, D3DTRANSFORMSTATETYPE State
, D3DMATRIX
* pMatrix
);
454 extern HRESULT WINAPI
IDirect3DDevice8Impl_MultiplyTransform(LPDIRECT3DDEVICE8 iface
, D3DTRANSFORMSTATETYPE State
, CONST D3DMATRIX
* pMatrix
);
455 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetViewport(LPDIRECT3DDEVICE8 iface
, CONST D3DVIEWPORT8
* pViewport
);
456 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetViewport(LPDIRECT3DDEVICE8 iface
, D3DVIEWPORT8
* pViewport
);
457 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetMaterial(LPDIRECT3DDEVICE8 iface
, CONST D3DMATERIAL8
* pMaterial
);
458 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetMaterial(LPDIRECT3DDEVICE8 iface
, D3DMATERIAL8
* pMaterial
);
459 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetLight(LPDIRECT3DDEVICE8 iface
, DWORD Index
, CONST D3DLIGHT8
* pLight
);
460 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetLight(LPDIRECT3DDEVICE8 iface
, DWORD Index
, D3DLIGHT8
* pLight
);
461 extern HRESULT WINAPI
IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface
, DWORD Index
, BOOL Enable
);
462 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetLightEnable(LPDIRECT3DDEVICE8 iface
, DWORD Index
, BOOL
* pEnable
);
463 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetClipPlane(LPDIRECT3DDEVICE8 iface
, DWORD Index
, CONST
float* pPlane
);
464 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface
, DWORD Index
, float* pPlane
);
465 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface
, D3DRENDERSTATETYPE State
, DWORD Value
);
466 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetRenderState(LPDIRECT3DDEVICE8 iface
, D3DRENDERSTATETYPE State
, DWORD
* pValue
);
467 extern HRESULT WINAPI
IDirect3DDevice8Impl_BeginStateBlock(LPDIRECT3DDEVICE8 iface
);
468 extern HRESULT WINAPI
IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface
, DWORD
* pToken
);
469 extern HRESULT WINAPI
IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 iface
, DWORD Token
);
470 extern HRESULT WINAPI
IDirect3DDevice8Impl_CaptureStateBlock(LPDIRECT3DDEVICE8 iface
, DWORD Token
);
471 extern HRESULT WINAPI
IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 iface
, DWORD Token
);
472 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateStateBlock(LPDIRECT3DDEVICE8 iface
, D3DSTATEBLOCKTYPE Type
,DWORD
* pToken
);
473 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetClipStatus(LPDIRECT3DDEVICE8 iface
, CONST D3DCLIPSTATUS8
* pClipStatus
);
474 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface
, D3DCLIPSTATUS8
* pClipStatus
);
475 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface
, DWORD Stage
, IDirect3DBaseTexture8
** ppTexture
);
476 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface
, DWORD Stage
, IDirect3DBaseTexture8
* pTexture
);
477 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 iface
, DWORD Stage
, D3DTEXTURESTAGESTATETYPE Type
, DWORD
* pValue
);
478 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 iface
, DWORD Stage
, D3DTEXTURESTAGESTATETYPE Type
, DWORD Value
);
479 extern HRESULT WINAPI
IDirect3DDevice8Impl_ValidateDevice(LPDIRECT3DDEVICE8 iface
, DWORD
* pNumPasses
);
480 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetInfo(LPDIRECT3DDEVICE8 iface
, DWORD DevInfoID
, void* pDevInfoStruct
, DWORD DevInfoStructSize
);
481 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetPaletteEntries(LPDIRECT3DDEVICE8 iface
, UINT PaletteNumber
, CONST PALETTEENTRY
* pEntries
);
482 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetPaletteEntries(LPDIRECT3DDEVICE8 iface
, UINT PaletteNumber
, PALETTEENTRY
* pEntries
);
483 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface
, UINT PaletteNumber
);
484 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface
, UINT
*PaletteNumber
);
485 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawPrimitive(LPDIRECT3DDEVICE8 iface
, D3DPRIMITIVETYPE PrimitiveType
, UINT StartVertex
, UINT PrimitiveCount
);
486 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE8 iface
, D3DPRIMITIVETYPE PrimitiveType
, UINT minIndex
, UINT NumVertices
, UINT startIndex
, UINT primCount
);
487 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE8 iface
, D3DPRIMITIVETYPE PrimitiveType
, UINT PrimitiveCount
, CONST
void* pVertexStreamZeroData
, UINT VertexStreamZeroStride
);
488 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawIndexedPrimitiveUP(LPDIRECT3DDEVICE8 iface
, D3DPRIMITIVETYPE PrimitiveType
, UINT MinVertexIndex
, UINT NumVertexIndices
, UINT PrimitiveCount
, CONST
void* pIndexData
, D3DFORMAT IndexDataFormat
, CONST
void* pVertexStreamZeroData
, UINT VertexStreamZeroStride
);
489 extern HRESULT WINAPI
IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 iface
, UINT SrcStartIndex
,UINT DestIndex
,UINT VertexCount
,IDirect3DVertexBuffer8
* pDestBuffer
,DWORD Flags
);
490 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 iface
, CONST DWORD
* pDeclaration
,CONST DWORD
* pFunction
,DWORD
* pHandle
,DWORD Usage
);
491 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface
, DWORD Handle
);
492 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface
, DWORD
* pHandle
);
493 extern HRESULT WINAPI
IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface
, DWORD Handle
);
494 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface
, DWORD Register
,CONST
void* pConstantData
,DWORD ConstantCount
);
495 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface
, DWORD Register
,void* pConstantData
,DWORD ConstantCount
);
496 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface
, DWORD Handle
,void* pData
,DWORD
* pSizeOfData
);
497 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface
, DWORD Handle
,void* pData
,DWORD
* pSizeOfData
);
498 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetStreamSource(LPDIRECT3DDEVICE8 iface
, UINT StreamNumber
,IDirect3DVertexBuffer8
* pStreamData
,UINT Stride
);
499 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface
, UINT StreamNumber
,IDirect3DVertexBuffer8
** ppStreamData
,UINT
* pStride
);
500 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface
, IDirect3DIndexBuffer8
* pIndexData
,UINT BaseVertexIndex
);
501 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface
, IDirect3DIndexBuffer8
** ppIndexData
,UINT
* pBaseVertexIndex
);
502 extern HRESULT WINAPI
IDirect3DDevice8Impl_CreatePixelShader(LPDIRECT3DDEVICE8 iface
, CONST DWORD
* pFunction
,DWORD
* pHandle
);
503 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface
, DWORD Handle
);
504 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 iface
, DWORD
* pHandle
);
505 extern HRESULT WINAPI
IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface
, DWORD Handle
);
506 extern HRESULT WINAPI
IDirect3DDevice8Impl_SetPixelShaderConstant(LPDIRECT3DDEVICE8 iface
, DWORD Register
,CONST
void* pConstantData
,DWORD ConstantCount
);
507 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetPixelShaderConstant(LPDIRECT3DDEVICE8 iface
, DWORD Register
,void* pConstantData
,DWORD ConstantCount
);
508 extern HRESULT WINAPI
IDirect3DDevice8Impl_GetPixelShaderFunction(LPDIRECT3DDEVICE8 iface
, DWORD Handle
,void* pData
,DWORD
* pSizeOfData
);
509 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawRectPatch(LPDIRECT3DDEVICE8 iface
, UINT Handle
,CONST
float* pNumSegs
,CONST D3DRECTPATCH_INFO
* pRectPatchInfo
);
510 extern HRESULT WINAPI
IDirect3DDevice8Impl_DrawTriPatch(LPDIRECT3DDEVICE8 iface
, UINT Handle
,CONST
float* pNumSegs
,CONST D3DTRIPATCH_INFO
* pTriPatchInfo
);
511 extern HRESULT WINAPI
IDirect3DDevice8Impl_DeletePatch(LPDIRECT3DDEVICE8 iface
, UINT Handle
);
513 /* internal Interfaces */
514 extern HRESULT WINAPI
IDirect3DDevice8Impl_CleanRender(LPDIRECT3DDEVICE8 iface
);
515 extern HRESULT WINAPI
IDirect3DDevice8Impl_ActiveRender(LPDIRECT3DDEVICE8 iface
, IDirect3DSurface8
* RenderSurface
, IDirect3DSurface8
* StencilSurface
);
518 /* ---------------- */
519 /* IDirect3DVolume8 */
520 /* ---------------- */
522 /*****************************************************************************
523 * Predeclare the interface implementation structures
525 extern IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl
;
527 /*****************************************************************************
528 * IDirect3DVolume8 implementation structure
530 struct IDirect3DVolume8Impl
532 /* IUnknown fields */
533 IDirect3DVolume8Vtbl
*lpVtbl
;
536 /* IDirect3DVolume8 fields */
537 IDirect3DDevice8Impl
*Device
;
538 D3DRESOURCETYPE ResourceType
;
541 D3DVOLUME_DESC myDesc
;
542 BYTE
*allocatedMemory
;
554 extern HRESULT WINAPI
IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface
,REFIID refiid
,LPVOID
*obj
);
555 extern ULONG WINAPI
IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface
);
556 extern ULONG WINAPI
IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface
);
558 /* IDirect3DVolume8: */
559 extern HRESULT WINAPI
IDirect3DVolume8Impl_GetDevice(LPDIRECT3DVOLUME8 iface
, IDirect3DDevice8
** ppDevice
);
560 extern HRESULT WINAPI
IDirect3DVolume8Impl_SetPrivateData(LPDIRECT3DVOLUME8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
561 extern HRESULT WINAPI
IDirect3DVolume8Impl_GetPrivateData(LPDIRECT3DVOLUME8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
562 extern HRESULT WINAPI
IDirect3DVolume8Impl_FreePrivateData(LPDIRECT3DVOLUME8 iface
, REFGUID refguid
);
563 extern HRESULT WINAPI
IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface
, REFIID riid
, void** ppContainer
);
564 extern HRESULT WINAPI
IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface
, D3DVOLUME_DESC
* pDesc
);
565 extern HRESULT WINAPI
IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface
, D3DLOCKED_BOX
* pLockedVolume
, CONST D3DBOX
* pBox
, DWORD Flags
);
566 extern HRESULT WINAPI
IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface
);
568 /* internal Interfaces */
569 extern HRESULT WINAPI
IDirect3DVolume8Impl_CleanDirtyBox(LPDIRECT3DVOLUME8 iface
);
570 extern HRESULT WINAPI
IDirect3DVolume8Impl_AddDirtyBox(LPDIRECT3DVOLUME8 iface
, CONST D3DBOX
* pDirtyBox
);
572 /* ------------------- */
573 /* IDirect3DSwapChain8 */
574 /* ------------------- */
576 /*****************************************************************************
577 * Predeclare the interface implementation structures
579 extern IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl
;
581 /*****************************************************************************
582 * IDirect3DSwapChain8 implementation structure
584 struct IDirect3DSwapChain8Impl
586 /* IUnknown fields */
587 IDirect3DSwapChain8Vtbl
*lpVtbl
;
590 /* IDirect3DSwapChain8 fields */
591 IDirect3DSurface8Impl
*frontBuffer
;
592 IDirect3DSurface8Impl
*backBuffer
;
593 IDirect3DSurface8Impl
*depthStencilBuffer
;
594 D3DPRESENT_PARAMETERS PresentParms
;
596 /* OpenGL/GLX related */
598 Drawable swap_drawable
;
602 extern HRESULT WINAPI
IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface
, REFIID refiid
, LPVOID
*obj
);
603 extern ULONG WINAPI
IDirect3DSwapChain8Impl_AddRef(LPDIRECT3DSWAPCHAIN8 iface
);
604 extern ULONG WINAPI
IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface
);
606 /* IDirect3DSwapChain8: */
607 extern HRESULT WINAPI
IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface
, CONST RECT
* pSourceRect
, CONST RECT
* pDestRect
, HWND hDestWindowOverride
,CONST RGNDATA
* pDirtyRegion
);
608 extern HRESULT WINAPI
IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 iface
, UINT BackBuffer
, D3DBACKBUFFER_TYPE Type
,IDirect3DSurface8
** ppBackBuffer
);
611 /* ----------------- */
612 /* IDirect3DSurface8 */
613 /* ----------------- */
615 /*****************************************************************************
616 * Predeclare the interface implementation structures
618 extern IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl
;
620 /*****************************************************************************
621 * IDirect3DSurface8 implementation structure
623 struct IDirect3DSurface8Impl
625 /* IUnknown fields */
626 IDirect3DSurface8Vtbl
*lpVtbl
;
629 /* IDirect3DSurface8 fields */
630 IDirect3DDevice8Impl
*Device
;
631 D3DRESOURCETYPE ResourceType
;
634 D3DSURFACE_DESC myDesc
;
635 BYTE
*allocatedMemory
;
647 IWineD3DSurface
*wineD3DSurface
;
651 extern HRESULT WINAPI
IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 iface
,REFIID refiid
,LPVOID
*obj
);
652 extern ULONG WINAPI
IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface
);
653 extern ULONG WINAPI
IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface
);
655 /* IDirect3DSurface8: */
656 extern HRESULT WINAPI
IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface
, IDirect3DDevice8
** ppDevice
);
657 extern HRESULT WINAPI
IDirect3DSurface8Impl_SetPrivateData(LPDIRECT3DSURFACE8 iface
, REFGUID refguid
,CONST
void* pData
,DWORD SizeOfData
,DWORD Flags
);
658 extern HRESULT WINAPI
IDirect3DSurface8Impl_GetPrivateData(LPDIRECT3DSURFACE8 iface
, REFGUID refguid
,void* pData
,DWORD
* pSizeOfData
);
659 extern HRESULT WINAPI
IDirect3DSurface8Impl_FreePrivateData(LPDIRECT3DSURFACE8 iface
, REFGUID refguid
);
660 extern HRESULT WINAPI
IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 iface
, REFIID riid
,void** ppContainer
);
661 extern HRESULT WINAPI
IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface
, D3DSURFACE_DESC
*pDesc
);
662 extern HRESULT WINAPI
IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface
, D3DLOCKED_RECT
* pLockedRect
, CONST RECT
* pRect
,DWORD Flags
);
663 extern HRESULT WINAPI
IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface
);
665 /* internal Interfaces */
666 extern HRESULT WINAPI
IDirect3DSurface8Impl_LoadTexture(LPDIRECT3DSURFACE8 iface
, GLenum gl_target
, GLenum gl_level
);
667 extern HRESULT WINAPI
IDirect3DSurface8Impl_SaveSnapshot(LPDIRECT3DSURFACE8 iface
, const char* filename
);
668 extern HRESULT WINAPI
IDirect3DSurface8Impl_CleanDirtyRect(LPDIRECT3DSURFACE8 iface
);
669 extern HRESULT WINAPI
IDirect3DSurface8Impl_AddDirtyRect(LPDIRECT3DSURFACE8 iface
, CONST RECT
* pDirtyRect
);
671 /* ------------------ */
672 /* IDirect3DResource8 */
673 /* ------------------ */
675 /*****************************************************************************
676 * Predeclare the interface implementation structures
678 extern IDirect3DResource8Vtbl Direct3DResource8_Vtbl
;
680 /*****************************************************************************
681 * IDirect3DResource8 implementation structure
683 struct IDirect3DResource8Impl
685 /* IUnknown fields */
686 IDirect3DResource8Vtbl
*lpVtbl
;
689 /* IDirect3DResource8 fields */
690 IDirect3DDevice8Impl
*Device
;
691 D3DRESOURCETYPE ResourceType
;
695 extern HRESULT WINAPI
IDirect3DResource8Impl_QueryInterface(LPDIRECT3DRESOURCE8 iface
,REFIID refiid
,LPVOID
*obj
);
696 extern ULONG WINAPI
IDirect3DResource8Impl_AddRef(LPDIRECT3DRESOURCE8 iface
);
697 extern ULONG WINAPI
IDirect3DResource8Impl_Release(LPDIRECT3DRESOURCE8 iface
);
699 /* IDirect3DResource8: */
700 extern HRESULT WINAPI
IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface
, IDirect3DDevice8
** ppDevice
);
701 extern HRESULT WINAPI
IDirect3DResource8Impl_SetPrivateData(LPDIRECT3DRESOURCE8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
702 extern HRESULT WINAPI
IDirect3DResource8Impl_GetPrivateData(LPDIRECT3DRESOURCE8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
703 extern HRESULT WINAPI
IDirect3DResource8Impl_FreePrivateData(LPDIRECT3DRESOURCE8 iface
, REFGUID refguid
);
704 extern DWORD WINAPI
IDirect3DResource8Impl_SetPriority(LPDIRECT3DRESOURCE8 iface
, DWORD PriorityNew
);
705 extern DWORD WINAPI
IDirect3DResource8Impl_GetPriority(LPDIRECT3DRESOURCE8 iface
);
706 extern void WINAPI
IDirect3DResource8Impl_PreLoad(LPDIRECT3DRESOURCE8 iface
);
707 extern D3DRESOURCETYPE WINAPI
IDirect3DResource8Impl_GetType(LPDIRECT3DRESOURCE8 iface
);
709 /* internal Interfaces */
710 extern D3DPOOL WINAPI
IDirect3DResource8Impl_GetPool(LPDIRECT3DRESOURCE8 iface
);
713 /* ---------------------- */
714 /* IDirect3DVertexBuffer8 */
715 /* ---------------------- */
717 /*****************************************************************************
718 * Predeclare the interface implementation structures
720 extern IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl
;
722 /*****************************************************************************
723 * IDirect3DVertexBuffer8 implementation structure
725 struct IDirect3DVertexBuffer8Impl
727 /* IUnknown fields */
728 IDirect3DVertexBuffer8Vtbl
*lpVtbl
;
731 /* IDirect3DResource8 fields */
732 IDirect3DDevice8Impl
*Device
;
733 D3DRESOURCETYPE ResourceType
;
735 /* IDirect3DVertexBuffer8 fields */
736 BYTE
*allocatedMemory
;
737 D3DVERTEXBUFFER_DESC currentDesc
;
741 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8 iface
,REFIID refiid
,LPVOID
*obj
);
742 extern ULONG WINAPI
IDirect3DVertexBuffer8Impl_AddRef(LPDIRECT3DVERTEXBUFFER8 iface
);
743 extern ULONG WINAPI
IDirect3DVertexBuffer8Impl_Release(LPDIRECT3DVERTEXBUFFER8 iface
);
745 /* IDirect3DVertexBuffer8: (Inherited from IDirect3DResource8) */
746 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_GetDevice(LPDIRECT3DVERTEXBUFFER8 iface
, IDirect3DDevice8
** ppDevice
);
747 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_SetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
748 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_GetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
749 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_FreePrivateData(LPDIRECT3DVERTEXBUFFER8 iface
, REFGUID refguid
);
750 extern DWORD WINAPI
IDirect3DVertexBuffer8Impl_SetPriority(LPDIRECT3DVERTEXBUFFER8 iface
, DWORD PriorityNew
);
751 extern DWORD WINAPI
IDirect3DVertexBuffer8Impl_GetPriority(LPDIRECT3DVERTEXBUFFER8 iface
);
752 extern void WINAPI
IDirect3DVertexBuffer8Impl_PreLoad(LPDIRECT3DVERTEXBUFFER8 iface
);
753 extern D3DRESOURCETYPE WINAPI
IDirect3DVertexBuffer8Impl_GetType(LPDIRECT3DVERTEXBUFFER8 iface
);
755 /* IDirect3DVertexBuffer8: */
756 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_Lock(LPDIRECT3DVERTEXBUFFER8 iface
, UINT OffsetToLock
, UINT SizeToLock
, BYTE
** ppbData
, DWORD Flags
);
757 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_Unlock(LPDIRECT3DVERTEXBUFFER8 iface
);
758 extern HRESULT WINAPI
IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER8 iface
, D3DVERTEXBUFFER_DESC
*pDesc
);
761 /* --------------------- */
762 /* IDirect3DIndexBuffer8 */
763 /* --------------------- */
765 /*****************************************************************************
766 * Predeclare the interface implementation structures
768 extern IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl
;
770 /*****************************************************************************
771 * IDirect3DIndexBuffer8 implementation structure
773 struct IDirect3DIndexBuffer8Impl
775 /* IUnknown fields */
776 IDirect3DIndexBuffer8Vtbl
*lpVtbl
;
779 /* IDirect3DResource8 fields */
780 IDirect3DDevice8Impl
*Device
;
781 D3DRESOURCETYPE ResourceType
;
783 /* IDirect3DIndexBuffer8 fields */
784 void *allocatedMemory
;
785 D3DINDEXBUFFER_DESC currentDesc
;
789 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_QueryInterface(LPDIRECT3DINDEXBUFFER8 iface
,REFIID refiid
,LPVOID
*obj
);
790 extern ULONG WINAPI
IDirect3DIndexBuffer8Impl_AddRef(LPDIRECT3DINDEXBUFFER8 iface
);
791 extern ULONG WINAPI
IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 iface
);
793 /* IDirect3DIndexBuffer8: (Inherited from IDirect3DResource8) */
794 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_GetDevice(LPDIRECT3DINDEXBUFFER8 iface
, IDirect3DDevice8
** ppDevice
);
795 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_SetPrivateData(LPDIRECT3DINDEXBUFFER8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
796 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_GetPrivateData(LPDIRECT3DINDEXBUFFER8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
797 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_FreePrivateData(LPDIRECT3DINDEXBUFFER8 iface
, REFGUID refguid
);
798 extern DWORD WINAPI
IDirect3DIndexBuffer8Impl_SetPriority(LPDIRECT3DINDEXBUFFER8 iface
, DWORD PriorityNew
);
799 extern DWORD WINAPI
IDirect3DIndexBuffer8Impl_GetPriority(LPDIRECT3DINDEXBUFFER8 iface
);
800 extern void WINAPI
IDirect3DIndexBuffer8Impl_PreLoad(LPDIRECT3DINDEXBUFFER8 iface
);
801 extern D3DRESOURCETYPE WINAPI
IDirect3DIndexBuffer8Impl_GetType(LPDIRECT3DINDEXBUFFER8 iface
);
803 /* IDirect3DIndexBuffer8: */
804 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_Lock(LPDIRECT3DINDEXBUFFER8 iface
, UINT OffsetToLock
, UINT SizeToLock
, BYTE
** ppbData
, DWORD Flags
);
805 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_Unlock(LPDIRECT3DINDEXBUFFER8 iface
);
806 extern HRESULT WINAPI
IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXBUFFER8 iface
, D3DINDEXBUFFER_DESC
*pDesc
);
809 /* --------------------- */
810 /* IDirect3DBaseTexture8 */
811 /* --------------------- */
813 /*****************************************************************************
814 * Predeclare the interface implementation structures
816 extern IDirect3DBaseTexture8Vtbl Direct3DBaseTexture8_Vtbl
;
818 /*****************************************************************************
819 * IDirect3DBaseTexture8 implementation structure
821 struct IDirect3DBaseTexture8Impl
823 /* IUnknown fields */
824 IDirect3DBaseTexture8Vtbl
*lpVtbl
;
827 /* IDirect3DResource8 fields */
828 IDirect3DDevice8Impl
*Device
;
829 D3DRESOURCETYPE ResourceType
;
831 /* IDirect3DBaseTexture8 fields */
842 extern HRESULT WINAPI
IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface
,REFIID refiid
,LPVOID
*obj
);
843 extern ULONG WINAPI
IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface
);
844 extern ULONG WINAPI
IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface
);
846 /* IDirect3DBaseTexture8: (Inherited from IDirect3DResource8) */
847 extern HRESULT WINAPI
IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface
, IDirect3DDevice8
** ppDevice
);
848 extern HRESULT WINAPI
IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
849 extern HRESULT WINAPI
IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
850 extern HRESULT WINAPI
IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface
, REFGUID refguid
);
851 extern DWORD WINAPI
IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface
, DWORD PriorityNew
);
852 extern DWORD WINAPI
IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface
);
853 extern void WINAPI
IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface
);
854 extern D3DRESOURCETYPE WINAPI
IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface
);
856 /* IDirect3DBaseTexture8: */
857 extern DWORD WINAPI
IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface
, DWORD LODNew
);
858 extern DWORD WINAPI
IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface
);
859 extern DWORD WINAPI
IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface
);
861 /* internal Interfaces */
862 extern BOOL WINAPI
IDirect3DBaseTexture8Impl_IsDirty(LPDIRECT3DBASETEXTURE8 iface
);
863 extern BOOL WINAPI
IDirect3DBaseTexture8Impl_SetDirty(LPDIRECT3DBASETEXTURE8 iface
, BOOL dirty
);
866 /* --------------------- */
867 /* IDirect3DCubeTexture8 */
868 /* --------------------- */
870 /*****************************************************************************
871 * Predeclare the interface implementation structures
873 extern IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl
;
875 /*****************************************************************************
876 * IDirect3DCubeTexture8 implementation structure
878 struct IDirect3DCubeTexture8Impl
880 /* IUnknown fields */
881 IDirect3DCubeTexture8Vtbl
*lpVtbl
;
884 /* IDirect3DResource8 fields */
885 IDirect3DDevice8Impl
*Device
;
886 D3DRESOURCETYPE ResourceType
;
888 /* IDirect3DBaseTexture8 fields */
893 /* IDirect3DCubeTexture8 fields */
897 IDirect3DSurface8Impl
*surfaces
[6][MAX_LEVELS
];
901 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 iface
,REFIID refiid
,LPVOID
*obj
);
902 extern ULONG WINAPI
IDirect3DCubeTexture8Impl_AddRef(LPDIRECT3DCUBETEXTURE8 iface
);
903 extern ULONG WINAPI
IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface
);
905 /* IDirect3DCubeTexture8: (Inherited from IDirect3DResource8) */
906 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_GetDevice(LPDIRECT3DCUBETEXTURE8 iface
, IDirect3DDevice8
** ppDevice
);
907 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
908 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
909 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE8 iface
, REFGUID refguid
);
910 extern DWORD WINAPI
IDirect3DCubeTexture8Impl_SetPriority(LPDIRECT3DCUBETEXTURE8 iface
, DWORD PriorityNew
);
911 extern DWORD WINAPI
IDirect3DCubeTexture8Impl_GetPriority(LPDIRECT3DCUBETEXTURE8 iface
);
912 extern void WINAPI
IDirect3DCubeTexture8Impl_PreLoad(LPDIRECT3DCUBETEXTURE8 iface
);
913 extern D3DRESOURCETYPE WINAPI
IDirect3DCubeTexture8Impl_GetType(LPDIRECT3DCUBETEXTURE8 iface
);
915 /* IDirect3DCubeTexture8: (Inherited from IDirect3DBaseTexture8) */
916 extern DWORD WINAPI
IDirect3DCubeTexture8Impl_SetLOD(LPDIRECT3DCUBETEXTURE8 iface
, DWORD LODNew
);
917 extern DWORD WINAPI
IDirect3DCubeTexture8Impl_GetLOD(LPDIRECT3DCUBETEXTURE8 iface
);
918 extern DWORD WINAPI
IDirect3DCubeTexture8Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE8 iface
);
920 /* IDirect3DCubeTexture8 */
921 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 iface
, UINT Level
, D3DSURFACE_DESC
* pDesc
);
922 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE8 iface
, D3DCUBEMAP_FACES FaceType
, UINT Level
, IDirect3DSurface8
** ppCubeMapSurface
);
923 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_LockRect(LPDIRECT3DCUBETEXTURE8 iface
, D3DCUBEMAP_FACES FaceType
, UINT Level
, D3DLOCKED_RECT
* pLockedRect
, CONST RECT
* pRect
, DWORD Flags
);
924 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_UnlockRect(LPDIRECT3DCUBETEXTURE8 iface
, D3DCUBEMAP_FACES FaceType
, UINT Level
);
925 extern HRESULT WINAPI
IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE8 iface
, D3DCUBEMAP_FACES FaceType
, CONST RECT
* pDirtyRect
);
928 /* ----------------- */
929 /* IDirect3DTexture8 */
930 /* ----------------- */
932 /*****************************************************************************
933 * Predeclare the interface implementation structures
935 extern IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl
;
937 /*****************************************************************************
938 * IDirect3DTexture8 implementation structure
940 struct IDirect3DTexture8Impl
942 /* IUnknown fields */
943 IDirect3DTexture8Vtbl
*lpVtbl
;
946 /* IDirect3DResourc8 fields */
947 IDirect3DDevice8Impl
*Device
;
948 D3DRESOURCETYPE ResourceType
;
950 /* IDirect3DBaseTexture8 fields */
955 /* IDirect3DTexture8 fields */
960 IDirect3DSurface8Impl
*surfaces
[MAX_LEVELS
];
964 extern HRESULT WINAPI
IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface
,REFIID refiid
,LPVOID
*obj
);
965 extern ULONG WINAPI
IDirect3DTexture8Impl_AddRef(LPDIRECT3DTEXTURE8 iface
);
966 extern ULONG WINAPI
IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface
);
968 /* IDirect3DTexture8: (Inherited from IDirect3DResource8) */
969 extern HRESULT WINAPI
IDirect3DTexture8Impl_GetDevice(LPDIRECT3DTEXTURE8 iface
, IDirect3DDevice8
** ppDevice
);
970 extern HRESULT WINAPI
IDirect3DTexture8Impl_SetPrivateData(LPDIRECT3DTEXTURE8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
971 extern HRESULT WINAPI
IDirect3DTexture8Impl_GetPrivateData(LPDIRECT3DTEXTURE8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
972 extern HRESULT WINAPI
IDirect3DTexture8Impl_FreePrivateData(LPDIRECT3DTEXTURE8 iface
, REFGUID refguid
);
973 extern DWORD WINAPI
IDirect3DTexture8Impl_SetPriority(LPDIRECT3DTEXTURE8 iface
, DWORD PriorityNew
);
974 extern DWORD WINAPI
IDirect3DTexture8Impl_GetPriority(LPDIRECT3DTEXTURE8 iface
);
975 extern void WINAPI
IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface
);
976 extern D3DRESOURCETYPE WINAPI
IDirect3DTexture8Impl_GetType(LPDIRECT3DTEXTURE8 iface
);
978 /* IDirect3DTexture8: (Inherited from IDirect3DBaseTexture8) */
979 extern DWORD WINAPI
IDirect3DTexture8Impl_SetLOD(LPDIRECT3DTEXTURE8 iface
, DWORD LODNew
);
980 extern DWORD WINAPI
IDirect3DTexture8Impl_GetLOD(LPDIRECT3DTEXTURE8 iface
);
981 extern DWORD WINAPI
IDirect3DTexture8Impl_GetLevelCount(LPDIRECT3DTEXTURE8 iface
);
983 /* IDirect3DTexture8: */
984 extern HRESULT WINAPI
IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface
, UINT Level
, D3DSURFACE_DESC
* pDesc
);
985 extern HRESULT WINAPI
IDirect3DTexture8Impl_GetSurfaceLevel(LPDIRECT3DTEXTURE8 iface
, UINT Level
, IDirect3DSurface8
** ppSurfaceLevel
);
986 extern HRESULT WINAPI
IDirect3DTexture8Impl_LockRect(LPDIRECT3DTEXTURE8 iface
, UINT Level
, D3DLOCKED_RECT
* pLockedRect
, CONST RECT
* pRect
, DWORD Flags
);
987 extern HRESULT WINAPI
IDirect3DTexture8Impl_UnlockRect(LPDIRECT3DTEXTURE8 iface
, UINT Level
);
988 extern HRESULT WINAPI
IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTURE8 iface
, CONST RECT
* pDirtyRect
);
991 /* ----------------------- */
992 /* IDirect3DVolumeTexture8 */
993 /* ----------------------- */
995 /*****************************************************************************
996 * Predeclare the interface implementation structures
998 extern IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl
;
1000 /*****************************************************************************
1001 * IDirect3DVolumeTexture8 implementation structure
1003 struct IDirect3DVolumeTexture8Impl
1005 /* IUnknown fields */
1006 IDirect3DVolumeTexture8Vtbl
*lpVtbl
;
1009 /* IDirect3DResource8 fields */
1010 IDirect3DDevice8Impl
*Device
;
1011 D3DRESOURCETYPE ResourceType
;
1013 /* IDirect3DBaseTexture8 fields */
1018 /* IDirect3DVolumeTexture8 fields */
1024 IDirect3DVolume8Impl
*volumes
[MAX_LEVELS
];
1028 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE8 iface
,REFIID refiid
,LPVOID
*obj
);
1029 extern ULONG WINAPI
IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 iface
);
1030 extern ULONG WINAPI
IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 iface
);
1032 /* IDirect3DVolumeTexture8: (Inherited from IDirect3DResource8) */
1033 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE8 iface
, IDirect3DDevice8
** ppDevice
);
1034 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface
, REFGUID refguid
, CONST
void* pData
, DWORD SizeOfData
, DWORD Flags
);
1035 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface
, REFGUID refguid
, void* pData
, DWORD
* pSizeOfData
);
1036 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE8 iface
, REFGUID refguid
);
1037 extern DWORD WINAPI
IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE8 iface
, DWORD PriorityNew
);
1038 extern DWORD WINAPI
IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE8 iface
);
1039 extern void WINAPI
IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8 iface
);
1040 extern D3DRESOURCETYPE WINAPI
IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLUMETEXTURE8 iface
);
1042 /* IDirect3DVolumeTexture8: (Inherited from IDirect3DBaseTexture8) */
1043 extern DWORD WINAPI
IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8 iface
, DWORD LODNew
);
1044 extern DWORD WINAPI
IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8 iface
);
1045 extern DWORD WINAPI
IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE8 iface
);
1047 /* IDirect3DVolumeTexture8: */
1048 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 iface
, UINT Level
, D3DVOLUME_DESC
*pDesc
);
1049 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTURE8 iface
, UINT Level
, IDirect3DVolume8
** ppVolumeLevel
);
1050 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_LockBox(LPDIRECT3DVOLUMETEXTURE8 iface
, UINT Level
, D3DLOCKED_BOX
* pLockedVolume
, CONST D3DBOX
* pBox
, DWORD Flags
);
1051 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE8 iface
, UINT Level
);
1052 extern HRESULT WINAPI
IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE8 iface
, CONST D3DBOX
* pDirtyBox
);
1055 /* ==============================================================================
1056 Private interfactes: beginning of cleaning/splitting for HAL and d3d9 support
1057 ============================================================================== */
1059 /* State Block for Begin/End/Capture/Create/Apply State Block */
1060 /* Note: Very long winded but I do not believe gl Lists will */
1061 /* resolve everything we need, so doing it manually for now */
1062 typedef struct SAVEDSTATES
{
1065 BOOL stream_source
[MAX_STREAMS
];
1067 BOOL transform
[HIGHEST_TRANSFORMSTATE
];
1070 BOOL vertexShaderConstant
;
1071 BOOL vertexShaderDecl
;
1073 BOOL pixelShaderConstant
;
1074 BOOL renderstate
[HIGHEST_RENDER_STATE
];
1075 BOOL texture_state
[8][HIGHEST_TEXTURE_STATE
];
1076 BOOL clipplane
[MAX_CLIPPLANES
];
1080 /* ----------------------- */
1081 /* IDirect3DStateBlockImpl */
1082 /* ----------------------- */
1084 /*****************************************************************************
1085 * Predeclare the interface implementation structures
1087 /*extern IDirect3DStateBlock9Vtbl Direct3DStateBlock9_Vtbl;*/
1089 /*****************************************************************************
1090 * IDirect3DStateBlock implementation structure
1092 struct IDirect3DStateBlockImpl
{
1093 /* IUnknown fields */
1094 /*IDirect3DStateBlock9Vtbl *lpVtbl;*/
1097 /* The device, to be replaced by an IDirect3DDeviceImpl */
1098 IDirect3DDevice8Impl
* device
;
1100 D3DSTATEBLOCKTYPE blockType
;
1102 SAVEDSTATES Changed
;
1106 double clipplane
[MAX_CLIPPLANES
][4];
1107 D3DCLIPSTATUS8 clip_status
;
1110 UINT stream_stride
[MAX_STREAMS
];
1111 IDirect3DVertexBuffer8
*stream_source
[MAX_STREAMS
];
1115 IDirect3DIndexBuffer8
* pIndexData
;
1116 UINT baseVertexIndex
;
1119 IDirect3DBaseTexture8
*textures
[8];
1120 int textureDimensions
[8];
1121 /* Texture State Stage */
1122 DWORD texture_state
[8][HIGHEST_TEXTURE_STATE
];
1125 PLIGHTINFOEL
*lights
; /* NOTE: active GL lights must be front of the chain */
1128 D3DMATERIAL8 material
;
1131 DWORD renderstate
[HIGHEST_RENDER_STATE
];
1134 D3DMATRIX transforms
[HIGHEST_TRANSFORMSTATE
];
1137 D3DVIEWPORT8 viewport
;
1142 /* Vertex Shader Declaration */
1143 IDirect3DVertexShaderDeclarationImpl
* vertexShaderDecl
;
1148 /* Indexed Vertex Blending */
1149 D3DVERTEXBLENDFLAGS vertex_blend
;
1152 /* Vertex Shader Constant */
1153 D3DSHADERVECTOR vertexShaderConstant
[D3D8_VSHADER_MAX_CONSTANTS
];
1154 /* Pixel Shader Constant */
1155 D3DSHADERVECTOR pixelShaderConstant
[D3D8_PSHADER_MAX_CONSTANTS
];
1158 /* exported Interfaces */
1159 /* internal Interfaces */
1160 /* temporary internal Interfaces */
1161 extern HRESULT WINAPI
IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl
* This
);
1162 extern HRESULT WINAPI
IDirect3DDeviceImpl_CreateStateBlock(IDirect3DDevice8Impl
* This
, D3DSTATEBLOCKTYPE Type
, IDirect3DStateBlockImpl
** ppStateBlock
);
1163 extern HRESULT WINAPI
IDirect3DDeviceImpl_DeleteStateBlock(IDirect3DDevice8Impl
* This
, IDirect3DStateBlockImpl
* pSB
);
1164 extern HRESULT WINAPI
IDirect3DDeviceImpl_BeginStateBlock(IDirect3DDevice8Impl
* This
);
1165 extern HRESULT WINAPI
IDirect3DDeviceImpl_EndStateBlock(IDirect3DDevice8Impl
* This
, IDirect3DStateBlockImpl
** ppStateBlock
);
1166 extern HRESULT WINAPI
IDirect3DDeviceImpl_ApplyStateBlock(IDirect3DDevice8Impl
* iface
, IDirect3DStateBlockImpl
* pSB
);
1167 extern HRESULT WINAPI
IDirect3DDeviceImpl_CaptureStateBlock(IDirect3DDevice8Impl
* This
, IDirect3DStateBlockImpl
* pSB
);
1169 /* ------------------------------------ */
1170 /* IDirect3DVertexShaderDeclarationImpl */
1171 /* ------------------------------------ */
1173 /*****************************************************************************
1174 * Predeclare the interface implementation structures
1176 /*extern IDirect3DVertexShaderDeclaration9Vtbl Direct3DVertexShaderDeclaration9_Vtbl;*/
1178 /*****************************************************************************
1179 * IDirect3DVertexShaderDeclaration implementation structure
1181 struct IDirect3DVertexShaderDeclarationImpl
{
1182 /* IUnknown fields */
1183 /*IDirect3DVertexShaderDeclaration9Vtbl *lpVtbl;*/
1186 /* The device, to be replaced by an IDirect3DDeviceImpl */
1187 IDirect3DDevice8Impl
* device
;
1189 /** precomputed fvf if simple declaration */
1190 DWORD fvf
[MAX_STREAMS
];
1193 /** dx8 compatible Declaration fields */
1194 DWORD
* pDeclaration8
;
1195 DWORD declaration8Length
;
1198 /* exported Interfaces */
1199 extern HRESULT WINAPI
IDirect3DVertexShaderDeclarationImpl_GetDeclaration8(IDirect3DVertexShaderDeclarationImpl
* This
, DWORD
* pData
, UINT
* pSizeOfData
);
1200 /*extern HRESULT IDirect3DVertexShaderDeclarationImpl_GetDeclaration9(IDirect3DVertexShaderDeclarationImpl* This, D3DVERTEXELEMENT9* pData, UINT* pNumElements);*/
1201 /* internal Interfaces */
1202 /* temporary internal Interfaces */
1203 extern HRESULT WINAPI
IDirect3DDeviceImpl_CreateVertexShaderDeclaration8(IDirect3DDevice8Impl
* This
, CONST DWORD
* pDeclaration8
, IDirect3DVertexShaderDeclarationImpl
** ppVertexShaderDecl
);
1206 /* ------------------------- */
1207 /* IDirect3DVertexShaderImpl */
1208 /* ------------------------- */
1210 /*****************************************************************************
1211 * Predeclare the interface implementation structures
1213 /*extern IDirect3DVertexShader9Vtbl Direct3DVertexShader9_Vtbl;*/
1215 /*****************************************************************************
1216 * IDirect3DVertexShader implementation structure
1218 struct IDirect3DVertexShaderImpl
{
1219 /*IDirect3DVertexShader9Vtbl *lpVtbl;*/
1222 /* The device, to be replaced by an IDirect3DDeviceImpl */
1223 IDirect3DDevice8Impl
* device
;
1226 UINT functionLength
;
1227 DWORD usage
; /* 0 || D3DUSAGE_SOFTWAREPROCESSING */
1230 /** fields for hw vertex shader use */
1233 /* run time datas */
1235 VSHADERINPUTDATA8 input
;
1236 VSHADEROUTPUTDATA8 output
;
1239 /* exported Interfaces */
1240 extern HRESULT WINAPI
IDirect3DVertexShaderImpl_GetFunction(IDirect3DVertexShaderImpl
* This
, VOID
* pData
, UINT
* pSizeOfData
);
1241 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);*/
1242 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST INT* pConstantData, UINT Vector4iCount);*/
1243 extern HRESULT WINAPI
IDirect3DVertexShaderImpl_SetConstantF(IDirect3DVertexShaderImpl
* This
, UINT StartRegister
, CONST FLOAT
* pConstantData
, UINT Vector4fCount
);
1244 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);*/
1245 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, INT* pConstantData, UINT Vector4iCount);*/
1246 extern HRESULT WINAPI
IDirect3DVertexShaderImpl_GetConstantF(IDirect3DVertexShaderImpl
* This
, UINT StartRegister
, FLOAT
* pConstantData
, UINT Vector4fCount
);
1247 /* internal Interfaces */
1248 extern DWORD WINAPI
IDirect3DVertexShaderImpl_GetVersion(IDirect3DVertexShaderImpl
* This
);
1249 extern HRESULT WINAPI
IDirect3DVertexShaderImpl_ExecuteSW(IDirect3DVertexShaderImpl
* This
, VSHADERINPUTDATA8
* input
, VSHADEROUTPUTDATA8
* output
);
1250 /* temporary internal Interfaces */
1251 extern HRESULT WINAPI
IDirect3DDeviceImpl_CreateVertexShader(IDirect3DDevice8Impl
* This
, CONST DWORD
* pFunction
, DWORD Usage
, IDirect3DVertexShaderImpl
** ppVertexShader
);
1252 extern HRESULT WINAPI
IDirect3DDeviceImpl_FillVertexShaderInputSW(IDirect3DDevice8Impl
* This
, IDirect3DVertexShaderImpl
* vshader
, DWORD SkipnStrides
);
1253 extern HRESULT WINAPI
IDirect3DDeviceImpl_FillVertexShaderInputArbHW(IDirect3DDevice8Impl
* This
, IDirect3DVertexShaderImpl
* vshader
, DWORD SkipnStrides
);
1255 /* ------------------------ */
1256 /* IDirect3DPixelShaderImpl */
1257 /* ------------------------ */
1259 /*****************************************************************************
1260 * Predeclare the interface implementation structures
1262 /*extern IDirect3DPixelShader9Vtbl Direct3DPixelShader9_Vtbl;*/
1264 /*****************************************************************************
1265 * IDirect3DPixelShader implementation structure
1267 struct IDirect3DPixelShaderImpl
{
1268 /*IDirect3DPixelShader9Vtbl *lpVtbl;*/
1271 /* The device, to be replaced by an IDirect3DDeviceImpl */
1272 IDirect3DDevice8Impl
* device
;
1275 UINT functionLength
;
1278 /** fields for hw pixel shader use */
1281 /* run time datas */
1283 PSHADERINPUTDATA8 input
;
1284 PSHADEROUTPUTDATA8 output
;
1287 /* exported Interfaces */
1288 extern HRESULT WINAPI
IDirect3DPixelShaderImpl_GetFunction(IDirect3DPixelShaderImpl
* This
, VOID
* pData
, UINT
* pSizeOfData
);
1289 extern HRESULT WINAPI
IDirect3DPixelShaderImpl_SetConstantF(IDirect3DPixelShaderImpl
* This
, UINT StartRegister
, CONST FLOAT
* pConstantData
, UINT Vector4fCount
);
1290 /* internal Interfaces */
1291 extern DWORD WINAPI
IDirect3DPixelShaderImpl_GetVersion(IDirect3DPixelShaderImpl
* This
);
1292 /* temporary internal Interfaces */
1293 extern HRESULT WINAPI
IDirect3DDeviceImpl_CreatePixelShader(IDirect3DDevice8Impl
* This
, CONST DWORD
* pFunction
, IDirect3DPixelShaderImpl
** ppPixelShader
);
1297 * Internals functions
1299 * to see how not defined it here
1301 void GetSrcAndOpFromValue(DWORD iValue
, BOOL isAlphaArg
, GLenum
* source
, GLenum
* operand
);
1302 void setupTextureStates(LPDIRECT3DDEVICE8 iface
, DWORD Stage
, DWORD Flags
);
1303 void set_tex_op(LPDIRECT3DDEVICE8 iface
, BOOL isAlpha
, int Stage
, D3DTEXTUREOP op
, DWORD arg1
, DWORD arg2
, DWORD arg3
);
1305 SHORT
D3DFmtGetBpp(IDirect3DDevice8Impl
* This
, D3DFORMAT fmt
);
1306 GLint
D3DFmt2GLIntFmt(IDirect3DDevice8Impl
* This
, D3DFORMAT fmt
);
1307 GLenum
D3DFmt2GLFmt(IDirect3DDevice8Impl
* This
, D3DFORMAT fmt
);
1308 GLenum
D3DFmt2GLType(IDirect3DDevice8Impl
* This
, D3DFORMAT fmt
);
1310 GLenum
D3DFmt2GLDepthFmt(D3DFORMAT fmt
);
1311 GLenum
D3DFmt2GLDepthType(D3DFORMAT fmt
);
1313 int D3DPrimitiveListGetVertexSize(D3DPRIMITIVETYPE PrimitiveType
, int iNumPrim
);
1314 int D3DPrimitive2GLenum(D3DPRIMITIVETYPE PrimitiveType
);
1315 int D3DFVFGetSize(D3DFORMAT fvf
);
1317 int SOURCEx_RGB_EXT(DWORD arg
);
1318 int OPERANDx_RGB_EXT(DWORD arg
);
1319 int SOURCEx_ALPHA_EXT(DWORD arg
);
1320 int OPERANDx_ALPHA_EXT(DWORD arg
);
1321 GLenum
StencilOp(DWORD op
);
1324 * Internals debug functions
1326 const char* debug_d3ddevicetype(D3DDEVTYPE devtype
);
1327 const char* debug_d3dusage(DWORD usage
);
1328 const char* debug_d3dformat(D3DFORMAT fmt
);
1329 const char* debug_d3dressourcetype(D3DRESOURCETYPE res
);
1330 const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType
);
1331 const char* debug_d3dpool(D3DPOOL Pool
);
1332 const char *debug_d3drenderstate(DWORD State
);
1333 const char *debug_d3dtexturestate(DWORD State
);
1335 /* Some #defines for additional diagnostics */
1336 #if 0 /* NOTE: Must be 0 in cvs */
1337 /* To avoid having to get gigabytes of trace, the following can be compiled in, and at the start
1338 of each frame, a check is made for the existence of C:\D3DTRACE, and if if exists d3d trace
1339 is enabled, and if it doesn't exists it is disabled. */
1340 # define FRAME_DEBUGGING
1341 /* Adding in the SINGLE_FRAME_DEBUGGING gives a trace of just what makes up a single frame, before
1342 the file is deleted */
1343 # if 1 /* NOTE: Must be 1 in cvs, as this is mostly more useful than a trace from program start */
1344 # define SINGLE_FRAME_DEBUGGING
1346 /* The following, when enabled, lets you see the makeup of the frame, by drawprimitive calls.
1347 It can only be enabled when FRAME_DEBUGGING is also enabled
1348 The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
1350 # if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
1351 # define SHOW_FRAME_MAKEUP 1
1353 /* The following, when enabled, lets you see the makeup of the all the textures used during each
1354 of the drawprimitive calls. It can only be enabled when SHOW_FRAME_MAKEUP is also enabled.
1355 The contents of the textures assigned to each stage are written into
1356 /tmp/texture_*_<Stage>.ppm after each primitive array is drawn. */
1357 # if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
1358 # define SHOW_TEXTURE_MAKEUP 0
1361 extern BOOL isDumpingFrames
;
1362 extern LONG primCounter
;
1365 /* Per-vertex trace: */
1366 #if 0 /* NOTE: Must be 0 in cvs */
1367 # define VTRACE(A) TRACE A
1372 #define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w);
1373 #define TRACE_STRIDED(sd,name) TRACE( #name "=(data:%p, stride:%ld, type:%ld)\n", sd->u.s.name.lpData, sd->u.s.name.dwStride, sd->u.s.name.dwType);
1375 #define DUMP_LIGHT_CHAIN() \
1377 PLIGHTINFOEL *el = This->StateBlock->lights;\
1379 TRACE("Light %p (glIndex %ld, d3dIndex %ld, enabled %d)\n", el, el->glIndex, el->OriginalIndex, el->lightEnabled);\
1384 #endif /* __WINE_D3DX8_PRIVATE_H */