Fixed some signed/unsigned comparison warnings.
[wine] / dlls / d3d8 / d3d8_private.h
1 /*
2  * Direct3D 8 private include file
3  *
4  * Copyright 2002 Jason Edmeades
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_D3DX8_PRIVATE_H
22 #define __WINE_D3DX8_PRIVATE_H
23
24 /* THIS FILE MUST NOT CONTAIN X11 or MESA DEFINES */
25 #include "config.h"
26 #define XMD_H /* This is to prevent the Xmd.h inclusion bug :-/ */
27 #include <GL/gl.h>
28 #include <GL/glx.h>
29 #ifdef HAVE_GL_GLEXT_H
30 # include <GL/glext.h>
31 #endif
32 #undef  XMD_H
33
34 #undef APIENTRY
35 #undef CALLBACK
36 #undef WINAPI
37
38 /* Redefines the constants */
39 #define CALLBACK    __stdcall
40 #define WINAPI      __stdcall
41 #define APIENTRY    WINAPI
42
43 /* X11 locking */
44
45 extern void (*wine_tsx11_lock_ptr)(void);
46 extern void (*wine_tsx11_unlock_ptr)(void);
47
48 /* As GLX relies on X, this is needed */
49 #define ENTER_GL() wine_tsx11_lock_ptr()
50 #define LEAVE_GL() wine_tsx11_unlock_ptr()
51
52 #include "d3d8.h"
53
54 /* Device caps */
55 #define MAX_STREAMS       1
56 #define MAX_ACTIVE_LIGHTS 8
57 #define MAX_CLIPPLANES    D3DMAXUSERCLIPPLANES
58 #define MAX_LEVELS 256
59
60 /* Other useful values */
61 #define HIGHEST_RENDER_STATE 174
62 #define HIGHEST_TEXTURE_STATE 29
63 #define HIGHEST_TRANSFORMSTATE 512
64 #define D3DSBT_RECORDED 0xfffffffe
65
66 /* Direct38 Interfaces: */
67 typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
68 typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl;
69 typedef struct IDirect3D8Impl IDirect3D8Impl;
70 typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl;
71 typedef struct IDirect3DTexture8Impl IDirect3DTexture8Impl;
72 typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl;
73 typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
74 typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
75 typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
76 typedef struct IDirect3DResource8Impl IDirect3DResource8Impl;
77 typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
78 typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl;
79
80 /* State Block for Begin/End/Capture/Create/Apply State Block   */
81 /*   Note: Very long winded but I do not believe gl Lists will  */
82 /*   resolve everything we need, so doing it manually for now   */
83 typedef struct SAVEDSTATES {
84         BOOL                      lightEnable[MAX_ACTIVE_LIGHTS];
85         BOOL                      Indices;
86         BOOL                      lights[MAX_ACTIVE_LIGHTS];
87         BOOL                      material;
88         BOOL                      stream_source[MAX_STREAMS];
89         BOOL                      textures[8];
90         BOOL                      transform[HIGHEST_TRANSFORMSTATE];
91         BOOL                      viewport;
92         BOOL                      vertexShader;
93         BOOL                      pixelShader;
94         BOOL                      renderstate[HIGHEST_RENDER_STATE];
95         BOOL                      texture_state[8][HIGHEST_TEXTURE_STATE];
96         BOOL                      clipplane[MAX_CLIPPLANES];
97 } SAVEDSTATES;
98
99 typedef struct STATEBLOCK {
100
101     D3DSTATEBLOCKTYPE             blockType;
102
103     SAVEDSTATES                   Changed;
104     SAVEDSTATES                   Set;
105
106     /* Light Enable */
107     BOOL                      lightEnable[MAX_ACTIVE_LIGHTS];
108
109     /* ClipPlane */
110     double                    clipplane[MAX_CLIPPLANES][4];
111
112     /* Indices */
113     IDirect3DIndexBuffer8*    pIndexData;
114     UINT                      baseVertexIndex;
115
116     /* Lights */
117     D3DLIGHT8                 lights[MAX_ACTIVE_LIGHTS];
118
119     /* Material */
120     D3DMATERIAL8              material;
121
122     /* Pixel Shader */
123     DWORD                     PixelShader;
124
125     /* TODO: Pixel Shader Constant */
126
127     /* RenderState */
128     DWORD                     renderstate[HIGHEST_RENDER_STATE];
129
130     /* Stream Source */
131     UINT                      stream_stride[MAX_STREAMS];
132     IDirect3DVertexBuffer8   *stream_source[MAX_STREAMS];
133
134     /* Texture */
135     IDirect3DBaseTexture8    *textures[8];
136     int                       textureDimensions[8];
137
138     /* Texture State Stage */
139     DWORD                     texture_state[8][HIGHEST_TEXTURE_STATE];
140
141     /* Transform */
142     D3DMATRIX                 transforms[HIGHEST_TRANSFORMSTATE];
143
144     /* ViewPort */
145     D3DVIEWPORT8              viewport;
146
147     /* Vertex Shader */
148     DWORD                     VertexShader;
149
150
151     /* TODO: Vertex Shader Constant */
152
153 } STATEBLOCK;
154
155 /*
156  * External prototypes
157  */
158 /*BOOL D3DRAW_HAL_Init(HINSTANCE, DWORD, LPVOID); */
159 void CreateStateBlock(LPDIRECT3DDEVICE8 iface);
160
161 /*
162  * Macros
163  */
164 #define checkGLcall(A) \
165 { \
166     GLint err = glGetError();   \
167     if (err != GL_NO_ERROR) { \
168        FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \
169     } else { \
170        TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
171     } \
172 }
173
174 /* ===========================================================================
175     The interfactes themselves
176    =========================================================================== */
177
178 /* ---------- */
179 /* IDirect3D8 */
180 /* ---------- */
181
182 /*****************************************************************************
183  * Predeclare the interface implementation structures
184  */
185 extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl;
186 extern ICOM_VTABLE(IDirect3D8) mesa_d3d8vt;
187
188 /*****************************************************************************
189  * IDirect3D implementation structure
190  */
191 struct IDirect3D8Impl
192 {
193     /* IUnknown fields */
194     ICOM_VFIELD(IDirect3D8);
195     DWORD                   ref;
196
197     /* IDirect3D8 fields */
198 };
199
200 /* IUnknown: */
201 extern HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface,REFIID refiid,LPVOID *obj);
202 extern ULONG WINAPI IDirect3D8Impl_AddRef(LPDIRECT3D8 iface);
203 extern ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface);
204
205 /* IDirect3d8:*/
206 extern HRESULT  WINAPI  IDirect3D8Impl_RegisterSoftwareDevice(LPDIRECT3D8 iface, void* pInitializeFunction);
207 extern UINT     WINAPI  IDirect3D8Impl_GetAdapterCount(LPDIRECT3D8 iface);
208 extern HRESULT  WINAPI  IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER8* pIdentifier);
209 extern UINT     WINAPI  IDirect3D8Impl_GetAdapterModeCount(LPDIRECT3D8 iface, UINT Adapter);
210 extern HRESULT  WINAPI  IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface, UINT Adapter, UINT Mode, D3DDISPLAYMODE* pMode);
211 extern HRESULT  WINAPI  IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface, UINT Adapter, D3DDISPLAYMODE* pMode);
212 extern HRESULT  WINAPI  IDirect3D8Impl_CheckDeviceType(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
213                                                        D3DFORMAT BackBufferFormat, BOOL Windowed);
214 extern HRESULT  WINAPI  IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
215                                                        DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat);
216 extern HRESULT  WINAPI  IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
217                                                        BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType);
218 extern HRESULT  WINAPI  IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
219                                                        D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat);
220 extern HRESULT  WINAPI  IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps);
221 extern HMONITOR WINAPI  IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT Adapter);
222 extern HRESULT  WINAPI  IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow,
223                                                        DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,
224                                                        IDirect3DDevice8** ppReturnedDeviceInterface);
225 /* --------------------- */
226 /* IDirect3DBaseTexture8 */
227 /* --------------------- */
228
229 /*****************************************************************************
230  * Predeclare the interface implementation structures
231  */
232 extern ICOM_VTABLE(IDirect3DBaseTexture8) Direct3DBaseTexture8_Vtbl;
233
234 /*****************************************************************************
235  * IDirect3DBaseTexture8 implementation structure
236  */
237 struct IDirect3DBaseTexture8Impl
238 {
239     /* IUnknown fields */
240     ICOM_VFIELD(IDirect3DBaseTexture8);
241     DWORD                   ref;
242
243     /* IDirect3DBaseTexture8 fields */
244     IDirect3DDevice8Impl   *Device;
245     D3DRESOURCETYPE         ResourceType;
246 };
247
248 /* IUnknown: */
249 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface,REFIID refiid,LPVOID *obj);
250 extern ULONG WINAPI   IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface);
251 extern ULONG WINAPI   IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface);
252
253 /* IDirect3DBaseTexture8 (Inherited from IDirect3DResource8) */
254 extern HRESULT  WINAPI        IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8** ppDevice);
255 extern HRESULT  WINAPI        IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
256 extern HRESULT  WINAPI        IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
257 extern HRESULT  WINAPI        IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid);
258 extern DWORD    WINAPI        IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface, DWORD PriorityNew);
259 extern DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface);
260 extern void     WINAPI        IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface);
261 extern D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface);
262
263 /* IDirect3DBaseTexture8 */
264 extern DWORD    WINAPI        IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface, DWORD LODNew);
265 extern DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface);
266 extern DWORD    WINAPI        IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface);
267
268 /* ---------------- */
269 /* IDirect3DDevice8 */
270 /* ---------------- */
271
272 /*****************************************************************************
273  * Predeclare the interface implementation structures
274  */
275 extern ICOM_VTABLE(IDirect3DDevice8) Direct3DDevice8_Vtbl;
276
277
278 /*****************************************************************************
279  * IDirect3DDevice8 implementation structure
280  */
281 struct IDirect3DDevice8Impl
282 {
283     /* IUnknown fields */
284     ICOM_VFIELD(IDirect3DDevice8);
285     DWORD                   ref;
286
287     /* IDirect3DDevice8 fields */
288     IDirect3D8Impl            *direct3d8;
289     IDirect3DSurface8Impl     *backBuffer;
290     D3DPRESENT_PARAMETERS         PresentParms;
291     D3DDEVICE_CREATION_PARAMETERS CreateParms;
292
293     UINT                       adapterNo;
294     D3DDEVTYPE                 devType;
295
296     UINT                       srcBlend;
297     UINT                       dstBlend;
298
299     /* State block related */
300     BOOL                       isRecordingState;
301     STATEBLOCK                 StateBlock;
302     STATEBLOCK                *UpdateStateBlock;
303
304     /* Other required values */
305     float lightPosn[MAX_ACTIVE_LIGHTS][4];
306     float lightDirn[MAX_ACTIVE_LIGHTS][4];
307
308     /* OpenGL related */
309     GLXContext   glCtx;
310     XVisualInfo *visInfo;
311     Display     *display;
312     Window       win;
313
314     UINT         dummyTextureName[8];
315
316 };
317
318 /* IUnknown: */
319 extern HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 iface,REFIID refiid,LPVOID *obj);
320 extern ULONG WINAPI IDirect3DDevice8Impl_AddRef(LPDIRECT3DDEVICE8 iface);
321 extern ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface);
322
323 /* IDirect3DDevice8:*/
324 extern HRESULT  WINAPI  IDirect3DDevice8Impl_TestCooperativeLevel(LPDIRECT3DDEVICE8 iface);
325 extern UINT     WINAPI  IDirect3DDevice8Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE8 iface);
326 extern HRESULT  WINAPI  IDirect3DDevice8Impl_ResourceManagerDiscardBytes(LPDIRECT3DDEVICE8 iface, DWORD Bytes);
327 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetDirect3D(LPDIRECT3DDEVICE8 iface, IDirect3D8** ppD3D8);
328 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface, D3DCAPS8* pCaps);
329 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetDisplayMode(LPDIRECT3DDEVICE8 iface, D3DDISPLAYMODE* pMode);
330 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetCreationParameters(LPDIRECT3DDEVICE8 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters);
331 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetCursorProperties(LPDIRECT3DDEVICE8 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface8* pCursorBitmap);
332 extern void     WINAPI  IDirect3DDevice8Impl_SetCursorPosition(LPDIRECT3DDEVICE8 iface, UINT XScreenSpace, UINT YScreenSpace,DWORD Flags);
333 extern BOOL     WINAPI  IDirect3DDevice8Impl_ShowCursor(LPDIRECT3DDEVICE8 iface, BOOL bShow);
334 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE8 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain8** pSwapChain);
335 extern HRESULT  WINAPI  IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRESENT_PARAMETERS* pPresentationParameters);
336 extern HRESULT  WINAPI  IDirect3DDevice8Impl_Present(LPDIRECT3DDEVICE8 iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
337 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetBackBuffer(LPDIRECT3DDEVICE8 iface, UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer);
338 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetRasterStatus(LPDIRECT3DDEVICE8 iface, D3DRASTER_STATUS* pRasterStatus);
339 extern void     WINAPI  IDirect3DDevice8Impl_SetGammaRamp(LPDIRECT3DDEVICE8 iface, DWORD Flags,CONST D3DGAMMARAMP* pRamp);
340 extern void     WINAPI  IDirect3DDevice8Impl_GetGammaRamp(LPDIRECT3DDEVICE8 iface, D3DGAMMARAMP* pRamp);
341 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture8** ppTexture);
342 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture8** ppVolumeTexture);
343 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface, UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture8** ppCubeTexture);
344 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface, UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer8** ppVertexBuffer);
345 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface, UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer8** ppIndexBuffer);
346 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateRenderTarget(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,IDirect3DSurface8** ppSurface);
347 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,IDirect3DSurface8** ppSurface);
348 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,IDirect3DSurface8** ppSurface);
349 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray);
350 extern HRESULT  WINAPI  IDirect3DDevice8Impl_UpdateTexture(LPDIRECT3DDEVICE8 iface, IDirect3DBaseTexture8* pSourceTexture,IDirect3DBaseTexture8* pDestinationTexture);
351 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetFrontBuffer(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pDestSurface);
352 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pRenderTarget,IDirect3DSurface8* pNewZStencil);
353 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8** ppRenderTarget);
354 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8** ppZStencilSurface);
355 extern HRESULT  WINAPI  IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface);
356 extern HRESULT  WINAPI  IDirect3DDevice8Impl_EndScene(LPDIRECT3DDEVICE8 iface);
357 extern HRESULT  WINAPI  IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil);
358 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix);
359 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix);
360 extern HRESULT  WINAPI  IDirect3DDevice8Impl_MultiplyTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
361 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetViewport(LPDIRECT3DDEVICE8 iface, CONST D3DVIEWPORT8* pViewport);
362 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetViewport(LPDIRECT3DDEVICE8 iface, D3DVIEWPORT8* pViewport);
363 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetMaterial(LPDIRECT3DDEVICE8 iface, CONST D3DMATERIAL8* pMaterial);
364 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetMaterial(LPDIRECT3DDEVICE8 iface, D3DMATERIAL8* pMaterial);
365 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetLight(LPDIRECT3DDEVICE8 iface, DWORD Index,CONST D3DLIGHT8* pLight);
366 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetLight(LPDIRECT3DDEVICE8 iface, DWORD Index,D3DLIGHT8* pLight);
367 extern HRESULT  WINAPI  IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL Enable);
368 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetLightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL* pEnable);
369 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,CONST float* pPlane);
370 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,float* pPlane);
371 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD Value);
372 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD* pValue);
373 extern HRESULT  WINAPI  IDirect3DDevice8Impl_BeginStateBlock(LPDIRECT3DDEVICE8 iface);
374 extern HRESULT  WINAPI  IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface, DWORD* pToken);
375 extern HRESULT  WINAPI  IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
376 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CaptureStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
377 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
378 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateStateBlock(LPDIRECT3DDEVICE8 iface, D3DSTATEBLOCKTYPE Type,DWORD* pToken);
379 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetClipStatus(LPDIRECT3DDEVICE8 iface, CONST D3DCLIPSTATUS8* pClipStatus);
380 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface, D3DCLIPSTATUS8* pClipStatus);
381 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8** ppTexture);
382 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8* pTexture);
383 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue);
384 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value);
385 extern HRESULT  WINAPI  IDirect3DDevice8Impl_ValidateDevice(LPDIRECT3DDEVICE8 iface, DWORD* pNumPasses);
386 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetInfo(LPDIRECT3DDEVICE8 iface, DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize);
387 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber,CONST PALETTEENTRY* pEntries);
388 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber,PALETTEENTRY* pEntries);
389 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber);
390 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT *PaletteNumber);
391 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DrawPrimitive(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount);
392 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount);
393 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
394 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);
395 extern HRESULT  WINAPI  IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 iface, UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags);
396 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 iface, CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage);
397 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
398 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* pHandle);
399 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
400 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
401 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,void* pConstantData,DWORD ConstantCount);
402 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
403 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
404 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride);
405 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8** ppStreamData,UINT* pStride);
406 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex);
407 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex);
408 extern HRESULT  WINAPI  IDirect3DDevice8Impl_CreatePixelShader(LPDIRECT3DDEVICE8 iface, CONST DWORD* pFunction,DWORD* pHandle);
409 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
410 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD* pHandle);
411 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
412 extern HRESULT  WINAPI  IDirect3DDevice8Impl_SetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
413 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,void* pConstantData,DWORD ConstantCount);
414 extern HRESULT  WINAPI  IDirect3DDevice8Impl_GetPixelShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
415 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DrawRectPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo);
416 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DrawTriPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo);
417 extern HRESULT  WINAPI  IDirect3DDevice8Impl_DeletePatch(LPDIRECT3DDEVICE8 iface, UINT Handle);
418
419 /* ------------------ */
420 /* IDirect3DResource8 */
421 /* ------------------ */
422
423 /*****************************************************************************
424  * Predeclare the interface implementation structures
425  */
426 extern ICOM_VTABLE(IDirect3DResource8) Direct3DResource8_Vtbl;
427
428 /*****************************************************************************
429  * IDirect3DResource8 implementation structure
430  */
431 struct IDirect3DResource8Impl
432 {
433     /* IUnknown fields */
434     ICOM_VFIELD(IDirect3DResource8);
435     DWORD                   ref;
436
437     /* IDirect3DResource8 fields */
438     IDirect3DDevice8Impl   *Device;
439     D3DRESOURCETYPE         ResourceType;
440 };
441
442 /* IUnknown: */
443 extern HRESULT WINAPI IDirect3DResource8Impl_QueryInterface(LPDIRECT3DRESOURCE8 iface,REFIID refiid,LPVOID *obj);
444 extern ULONG WINAPI IDirect3DResource8Impl_AddRef(LPDIRECT3DRESOURCE8 iface);
445 extern ULONG WINAPI IDirect3DResource8Impl_Release(LPDIRECT3DRESOURCE8 iface);
446
447 /* IDirect3DResource8 */
448 extern HRESULT  WINAPI        IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
449 extern HRESULT  WINAPI        IDirect3DResource8Impl_SetPrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
450 extern HRESULT  WINAPI        IDirect3DResource8Impl_GetPrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
451 extern HRESULT  WINAPI        IDirect3DResource8Impl_FreePrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid);
452 extern DWORD    WINAPI        IDirect3DResource8Impl_SetPriority(LPDIRECT3DRESOURCE8 iface, DWORD PriorityNew);
453 extern DWORD    WINAPI        IDirect3DResource8Impl_GetPriority(LPDIRECT3DRESOURCE8 iface);
454 extern void     WINAPI        IDirect3DResource8Impl_PreLoad(LPDIRECT3DRESOURCE8 iface);
455 extern D3DRESOURCETYPE WINAPI IDirect3DResource8Impl_GetType(LPDIRECT3DRESOURCE8 iface);
456
457 /* ---------------------- */
458 /* IDirect3DVertexBuffer8 */
459 /* ---------------------- */
460
461 /*****************************************************************************
462  * Predeclare the interface implementation structures
463  */
464 extern ICOM_VTABLE(IDirect3DVertexBuffer8) Direct3DVertexBuffer8_Vtbl;
465
466 /*****************************************************************************
467  * IDirect3DVertexBuffer8 implementation structure
468  */
469 struct IDirect3DVertexBuffer8Impl
470 {
471     /* IUnknown fields */
472     ICOM_VFIELD(IDirect3DVertexBuffer8);
473     DWORD                   ref;
474
475     /* IDirect3DVertexBuffer8 fields */
476     IDirect3DDevice8Impl   *Device;
477     D3DRESOURCETYPE         ResourceType;
478     BYTE *allocatedMemory;
479     D3DVERTEXBUFFER_DESC currentDesc;
480 };
481
482 /* IUnknown: */
483 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8 iface,REFIID refiid,LPVOID *obj);
484 extern ULONG WINAPI IDirect3DVertexBuffer8Impl_AddRef(LPDIRECT3DVERTEXBUFFER8 iface);
485 extern ULONG WINAPI IDirect3DVertexBuffer8Impl_Release(LPDIRECT3DVERTEXBUFFER8 iface);
486
487 /* IDirect3DVertexBuffer8 (Inherited from IDirect3DResource8) */
488 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_GetDevice(LPDIRECT3DVERTEXBUFFER8 iface, IDirect3DDevice8** ppDevice);
489 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_SetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
490 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_GetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
491 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_FreePrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid);
492 extern DWORD    WINAPI        IDirect3DVertexBuffer8Impl_SetPriority(LPDIRECT3DVERTEXBUFFER8 iface, DWORD PriorityNew);
493 extern DWORD    WINAPI        IDirect3DVertexBuffer8Impl_GetPriority(LPDIRECT3DVERTEXBUFFER8 iface);
494 extern void     WINAPI        IDirect3DVertexBuffer8Impl_PreLoad(LPDIRECT3DVERTEXBUFFER8 iface);
495 extern D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer8Impl_GetType(LPDIRECT3DVERTEXBUFFER8 iface);
496
497 /* IDirect3DVertexBuffer8 */
498 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_Lock(LPDIRECT3DVERTEXBUFFER8 iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags);
499 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_Unlock(LPDIRECT3DVERTEXBUFFER8 iface);
500 extern HRESULT  WINAPI        IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER8 iface, D3DVERTEXBUFFER_DESC *pDesc);
501
502 /* IDirect3DVolume8 private include file
503  */
504
505 /*****************************************************************************
506  * Predeclare the interface implementation structures
507  */
508 extern ICOM_VTABLE(IDirect3DVolume8) Direct3DVolume8_Vtbl;
509
510 /*****************************************************************************
511  * IDirect3DVolume8 implementation structure
512  */
513 struct IDirect3DVolume8Impl
514 {
515     /* IUnknown fields */
516     ICOM_VFIELD(IDirect3DVolume8);
517     DWORD                   ref;
518
519     /* IDirect3DVolume8 fields */
520     IDirect3DDevice8Impl   *Device;
521     D3DRESOURCETYPE         ResourceType;
522
523     void                   *Container;
524     D3DVOLUME_DESC          myDesc;
525     BYTE                   *allocatedMemory;
526     UINT                    textureName;
527     UINT                    bytesPerPixel;
528
529 };
530
531 /* IUnknown: */
532 extern HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface,REFIID refiid,LPVOID *obj);
533 extern ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface);
534 extern ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface);
535
536 /* IDirect3DVolume8 */
537 extern HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(LPDIRECT3DVOLUME8 iface, IDirect3DDevice8** ppDevice);
538 extern HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
539 extern HRESULT WINAPI IDirect3DVolume8Impl_GetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID  refguid, void* pData, DWORD* pSizeOfData);
540 extern HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid);
541 extern HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, REFIID riid, void** ppContainer);
542 extern HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_DESC* pDesc);
543 extern HRESULT WINAPI IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface, D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox, DWORD Flags);
544 extern HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface);
545
546 /* ------------------- */
547 /* IDirect3DSwapChain8 */
548 /* ------------------- */
549
550 /*****************************************************************************
551  * Predeclare the interface implementation structures
552  */
553 extern ICOM_VTABLE(IDirect3DSwapChain8) Direct3DSwapChain8_Vtbl;
554
555 /*****************************************************************************
556  * IDirect3DSwapChain8 implementation structure
557  */
558 struct IDirect3DSwapChain8Impl
559 {
560     /* IUnknown fields */
561     ICOM_VFIELD(IDirect3DSwapChain8);
562     DWORD                   ref;
563
564     /* IDirect3DSwapChain8 fields */
565 };
566
567 /* IUnknown: */
568 extern HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface,REFIID refiid,LPVOID *obj);
569 extern ULONG WINAPI IDirect3DSwapChain8Impl_AddRef(LPDIRECT3DSWAPCHAIN8 iface);
570 extern ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface);
571
572 /* IDirect3DSwapChain8 */
573 extern HRESULT WINAPI IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
574 extern HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 iface, UINT BackBuffer, D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer);
575
576 /* ----------------- */
577 /* IDirect3DSurface8 */
578 /* ----------------- */
579
580 /*****************************************************************************
581  * Predeclare the interface implementation structures
582  */
583 extern ICOM_VTABLE(IDirect3DSurface8) Direct3DSurface8_Vtbl;
584
585 /*****************************************************************************
586  * IDirect3DSurface8 implementation structure
587  */
588 struct IDirect3DSurface8Impl
589 {
590     /* IUnknown fields */
591     ICOM_VFIELD(IDirect3DSurface8);
592     DWORD                   ref;
593
594     /* IDirect3DSurface8 fields */
595     IDirect3DDevice8Impl   *Device;
596     D3DRESOURCETYPE         ResourceType;
597
598     void                   *Container;
599
600     D3DSURFACE_DESC         myDesc;
601     BYTE                   *allocatedMemory;
602     UINT                    textureName;
603     UINT                    bytesPerPixel;
604 };
605
606 /* IUnknown: */
607 extern HRESULT WINAPI IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 iface,REFIID refiid,LPVOID *obj);
608 extern ULONG WINAPI IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface);
609 extern ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface);
610
611 /* IDirect3DSurface8 */
612 extern HRESULT WINAPI IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface, IDirect3DDevice8** ppDevice);
613 extern HRESULT WINAPI IDirect3DSurface8Impl_SetPrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags);
614 extern HRESULT WINAPI IDirect3DSurface8Impl_GetPrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid,void* pData,DWORD* pSizeOfData);
615 extern HRESULT WINAPI IDirect3DSurface8Impl_FreePrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid);
616 extern HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 iface, REFIID riid,void** ppContainer);
617 extern HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFACE_DESC *pDesc);
618 extern HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect,DWORD Flags);
619 extern HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface);
620
621 /* --------------------- */
622 /* IDirect3DIndexBuffer8 */
623 /* --------------------- */
624
625 /*****************************************************************************
626  * Predeclare the interface implementation structures
627  */
628 extern ICOM_VTABLE(IDirect3DIndexBuffer8) Direct3DIndexBuffer8_Vtbl;
629
630 /*****************************************************************************
631  * IDirect3DIndexBuffer8 implementation structure
632  */
633 struct IDirect3DIndexBuffer8Impl
634 {
635     /* IUnknown fields */
636     ICOM_VFIELD(IDirect3DIndexBuffer8);
637     DWORD                   ref;
638
639     /* IDirect3DIndexBuffer8 fields */
640     IDirect3DDevice8Impl   *Device;
641     D3DRESOURCETYPE         ResourceType;
642
643     D3DINDEXBUFFER_DESC     currentDesc;
644     void                   *allocatedMemory;
645 };
646
647 /* IUnknown: */
648 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_QueryInterface(LPDIRECT3DINDEXBUFFER8 iface,REFIID refiid,LPVOID *obj);
649 extern ULONG WINAPI IDirect3DIndexBuffer8Impl_AddRef(LPDIRECT3DINDEXBUFFER8 iface);
650 extern ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 iface);
651
652 /* IDirect3DIndexBuffer8 (Inherited from IDirect3DResource8) */
653 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_GetDevice(LPDIRECT3DINDEXBUFFER8 iface, IDirect3DDevice8** ppDevice);
654 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_SetPrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
655 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_GetPrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
656 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_FreePrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid);
657 extern DWORD    WINAPI        IDirect3DIndexBuffer8Impl_SetPriority(LPDIRECT3DINDEXBUFFER8 iface, DWORD PriorityNew);
658 extern DWORD    WINAPI        IDirect3DIndexBuffer8Impl_GetPriority(LPDIRECT3DINDEXBUFFER8 iface);
659 extern void     WINAPI        IDirect3DIndexBuffer8Impl_PreLoad(LPDIRECT3DINDEXBUFFER8 iface);
660 extern D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer8Impl_GetType(LPDIRECT3DINDEXBUFFER8 iface);
661
662 /* IDirect3DIndexBuffer8 */
663 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_Lock(LPDIRECT3DINDEXBUFFER8 iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags);
664 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_Unlock(LPDIRECT3DINDEXBUFFER8 iface);
665 extern HRESULT  WINAPI        IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXBUFFER8 iface, D3DINDEXBUFFER_DESC *pDesc);
666
667 /* --------------------- */
668 /* IDirect3DCubeTexture8 */
669 /* --------------------- */
670
671 /*****************************************************************************
672  * Predeclare the interface implementation structures
673  */
674 extern ICOM_VTABLE(IDirect3DCubeTexture8) Direct3DCubeTexture8_Vtbl;
675
676 /*****************************************************************************
677  * IDirect3DCubeTexture8 implementation structure
678  */
679 struct IDirect3DCubeTexture8Impl
680 {
681     /* IUnknown fields */
682     ICOM_VFIELD(IDirect3DCubeTexture8);
683     DWORD                   ref;
684
685     /* IDirect3DCubeTexture8 fields */
686     IDirect3DDevice8Impl   *Device;
687     D3DRESOURCETYPE         ResourceType;
688
689     UINT edgeLength;
690     DWORD usage;
691     UINT levels;
692     D3DFORMAT format;
693
694     IDirect3DDevice8Impl  *device;
695     IDirect3DSurface8Impl *surfaces[6][MAX_LEVELS];
696     BOOL Dirty;
697 };
698
699 /* IUnknown: */
700 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 iface,REFIID refiid,LPVOID *obj);
701 extern ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(LPDIRECT3DCUBETEXTURE8 iface);
702 extern ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface);
703
704 /* IDirect3DCubeTexture8 (Inherited from IDirect3DResource8) */
705 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_GetDevice(LPDIRECT3DCUBETEXTURE8 iface, IDirect3DDevice8** ppDevice);
706 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
707 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
708 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid);
709 extern DWORD    WINAPI        IDirect3DCubeTexture8Impl_SetPriority(LPDIRECT3DCUBETEXTURE8 iface, DWORD PriorityNew);
710 extern DWORD    WINAPI        IDirect3DCubeTexture8Impl_GetPriority(LPDIRECT3DCUBETEXTURE8 iface);
711 extern void     WINAPI        IDirect3DCubeTexture8Impl_PreLoad(LPDIRECT3DCUBETEXTURE8 iface);
712 extern D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(LPDIRECT3DCUBETEXTURE8 iface);
713
714 /* IDirect3DCubeTexture8 (Inherited from IDirect3DBaseTexture8) */
715 extern DWORD    WINAPI        IDirect3DCubeTexture8Impl_SetLOD(LPDIRECT3DCUBETEXTURE8 iface, DWORD LODNew);
716 extern DWORD    WINAPI        IDirect3DCubeTexture8Impl_GetLOD(LPDIRECT3DCUBETEXTURE8 iface);
717 extern DWORD    WINAPI        IDirect3DCubeTexture8Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE8 iface);
718
719 /* IDirect3DCubeTexture8 */
720 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 iface,UINT Level,D3DSURFACE_DESC *pDesc);
721 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface8** ppCubeMapSurface);
722 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_LockRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
723 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_UnlockRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level);
724 extern HRESULT  WINAPI        IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect);
725
726 /* ----------------- */
727 /* IDirect3DTexture8 */
728 /* ----------------- */
729
730 /*****************************************************************************
731  * Predeclare the interface implementation structures
732  */
733 extern ICOM_VTABLE(IDirect3DTexture8) Direct3DTexture8_Vtbl;
734
735 /*****************************************************************************
736  * IDirect3DTexture8 implementation structure
737  */
738 struct IDirect3DTexture8Impl
739 {
740     /* IUnknown fields */
741     ICOM_VFIELD(IDirect3DTexture8);
742     DWORD                   ref;
743
744     /* IDirect3DTexture8 fields */
745     IDirect3DDevice8Impl   *Device;
746     D3DRESOURCETYPE         ResourceType;
747     UINT width;
748     UINT height;
749     UINT levels;
750     DWORD usage;
751     D3DFORMAT format;
752
753     IDirect3DDevice8Impl *device;
754     IDirect3DSurface8Impl *surfaces[MAX_LEVELS];
755     BOOL Dirty;
756
757 };
758
759 /* IUnknown: */
760 extern HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface,REFIID refiid,LPVOID *obj);
761 extern ULONG WINAPI   IDirect3DTexture8Impl_AddRef(LPDIRECT3DTEXTURE8 iface);
762 extern ULONG WINAPI   IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface);
763
764 /* IDirect3DTexture8 (Inherited from IDirect3DResource8) */
765 extern HRESULT  WINAPI        IDirect3DTexture8Impl_GetDevice(LPDIRECT3DTEXTURE8 iface, IDirect3DDevice8** ppDevice);
766 extern HRESULT  WINAPI        IDirect3DTexture8Impl_SetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
767 extern HRESULT  WINAPI        IDirect3DTexture8Impl_GetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
768 extern HRESULT  WINAPI        IDirect3DTexture8Impl_FreePrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid);
769 extern DWORD    WINAPI        IDirect3DTexture8Impl_SetPriority(LPDIRECT3DTEXTURE8 iface, DWORD PriorityNew);
770 extern DWORD    WINAPI        IDirect3DTexture8Impl_GetPriority(LPDIRECT3DTEXTURE8 iface);
771 extern void     WINAPI        IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface);
772 extern D3DRESOURCETYPE WINAPI IDirect3DTexture8Impl_GetType(LPDIRECT3DTEXTURE8 iface);
773
774 /* IDirect3DTexture8 (Inherited from IDirect3DBaseTexture8) */
775 extern DWORD    WINAPI        IDirect3DTexture8Impl_SetLOD(LPDIRECT3DTEXTURE8 iface, DWORD LODNew);
776 extern DWORD    WINAPI        IDirect3DTexture8Impl_GetLOD(LPDIRECT3DTEXTURE8 iface);
777 extern DWORD    WINAPI        IDirect3DTexture8Impl_GetLevelCount(LPDIRECT3DTEXTURE8 iface);
778
779 /* IDirect3DTexture8 */
780 extern HRESULT  WINAPI        IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT Level,D3DSURFACE_DESC* pDesc);
781 extern HRESULT  WINAPI        IDirect3DTexture8Impl_GetSurfaceLevel(LPDIRECT3DTEXTURE8 iface, UINT Level,IDirect3DSurface8** ppSurfaceLevel);
782 extern HRESULT  WINAPI        IDirect3DTexture8Impl_LockRect(LPDIRECT3DTEXTURE8 iface, UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
783 extern HRESULT  WINAPI        IDirect3DTexture8Impl_UnlockRect(LPDIRECT3DTEXTURE8 iface, UINT Level);
784 extern HRESULT  WINAPI        IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTURE8 iface, CONST RECT* pDirtyRect);
785
786 /* ----------------------- */
787 /* IDirect3DVolumeTexture8 */
788 /* ----------------------- */
789
790 /*****************************************************************************
791  * Predeclare the interface implementation structures
792  */
793 extern ICOM_VTABLE(IDirect3DVolumeTexture8) Direct3DVolumeTexture8_Vtbl;
794
795 /*****************************************************************************
796  * IDirect3DVolumeTexture8 implementation structure
797  */
798 struct IDirect3DVolumeTexture8Impl
799 {
800     /* IUnknown fields */
801     ICOM_VFIELD(IDirect3DVolumeTexture8);
802     DWORD                   ref;
803
804     /* IDirect3DVolumeTexture8 fields */
805     IDirect3DDevice8Impl   *Device;
806     D3DRESOURCETYPE         ResourceType;
807     UINT                    width;
808     UINT                    height;
809     UINT                    depth;
810     UINT                    levels;
811     DWORD                   usage;
812     D3DFORMAT               format;
813
814     IDirect3DDevice8Impl *device;
815     IDirect3DVolume8Impl *volumes[MAX_LEVELS];
816     BOOL Dirty;
817
818 };
819
820 /* IUnknown: */
821 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE8 iface,REFIID refiid,LPVOID *obj);
822 extern ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 iface);
823 extern ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 iface);
824
825 /* IDirect3DVolumeTexture8 (Inherited from IDirect3DResource8) */
826 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE8 iface, IDirect3DDevice8** ppDevice);
827 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
828 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
829 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid);
830 extern DWORD    WINAPI        IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD PriorityNew);
831 extern DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE8 iface);
832 extern void     WINAPI        IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8 iface);
833 extern D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLUMETEXTURE8 iface);
834
835 /* IDirect3DVolumeTexture8 (Inherited from IDirect3DBaseTexture8) */
836 extern DWORD    WINAPI        IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD LODNew);
837 extern DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8 iface);
838 extern DWORD    WINAPI        IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE8 iface);
839
840 /* IDirect3DVolumeTexture8 */
841 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DVOLUME_DESC *pDesc);
842 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,IDirect3DVolume8** ppVolumeLevel);
843 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_LockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox,DWORD Flags);
844 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level);
845 extern HRESULT  WINAPI        IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE8 iface, CONST D3DBOX* pDirtyBox);
846
847 #endif /* __WINE_D3DX8_PRIVATE_H */