Release 20030408.
[wine/gsoc-2012-control.git] / dlls / d3d8 / d3d8_private.h
blob286b2321162bc4dbb6f7764824da08e81f81c168
1 /*
2 * Direct3D 8 private include file
4 * Copyright 2002 Jason Edmeades
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.
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.
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
21 #ifndef __WINE_D3DX8_PRIVATE_H
22 #define __WINE_D3DX8_PRIVATE_H
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
34 #undef APIENTRY
35 #undef CALLBACK
36 #undef WINAPI
38 /* Redefines the constants */
39 #define CALLBACK __stdcall
40 #define WINAPI __stdcall
41 #define APIENTRY WINAPI
43 /* X11 locking */
45 extern void (*wine_tsx11_lock_ptr)(void);
46 extern void (*wine_tsx11_unlock_ptr)(void);
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()
52 #include "d3d8.h"
54 /* Device caps */
55 #define MAX_STREAMS 1
56 #define MAX_ACTIVE_LIGHTS 8
57 #define MAX_CLIPPLANES D3DMAXUSERCLIPPLANES
58 #define MAX_LEVELS 256
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
66 /* Direct3D8 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;
80 /** Private Interfaces: */
81 typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
82 typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
83 typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
84 typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
86 typedef struct D3DSHADERVECTOR {
87 float x;
88 float y;
89 float z;
90 float w;
91 } D3DSHADERVECTOR;
93 typedef struct D3DSHADERSCALAR {
94 float x;
95 } D3DSHADERSCALAR;
97 #define D3D8_VSHADER_MAX_CONSTANTS 96
98 #define D3D8_PSHADER_MAX_CONSTANTS 96
99 typedef D3DSHADERVECTOR VSHADERCONSTANTS8[D3D8_VSHADER_MAX_CONSTANTS];
101 typedef struct SHADERDATA8 {
102 /** Run Time Shader Function Constants */
103 /*D3DXBUFFER* constants;*/
104 VSHADERCONSTANTS8 C;
105 /** Shader Code as char ... */
106 CONST DWORD* code;
107 UINT codeLength;
108 } SHADERDATA8;
110 /** temporary here waiting for buffer code */
111 typedef struct VSHADERINPUTDATA8 {
112 D3DSHADERVECTOR V[16];
113 } VSHADERINPUTDATA8;
115 /** temporary here waiting for buffer code */
116 typedef struct VSHADEROUTPUTDATA8 {
117 D3DSHADERVECTOR oPos;
118 D3DSHADERVECTOR oD[2];
119 D3DSHADERVECTOR oT[4];
120 D3DSHADERVECTOR oFog;
121 D3DSHADERVECTOR oPts;
122 } VSHADEROUTPUTDATA8;
125 * External prototypes
127 /*BOOL D3DRAW_HAL_Init(HINSTANCE, DWORD, LPVOID); */
128 void CreateStateBlock(LPDIRECT3DDEVICE8 iface);
131 * Macros
133 #define checkGLcall(A) \
135 GLint err = glGetError(); \
136 if (err != GL_NO_ERROR) { \
137 FIXME(">>>>>>>>>>>>>>>>> %x from %s @ %s / %d\n", err, A, __FILE__, __LINE__); \
138 } else { \
139 TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
143 #define checkGLSupport(ExtName) FALSE/*(TRUE == This->direct3d8->glInfo.supported[ExtName])*/
144 #define GLExtCall(FuncName) /*(This->direct3d8->glInfo.FuncName)*/
147 #define D3DCOLOR_R(dw) (((float) (((dw) >> 16) & 0xFF)) / 255.0f)
148 #define D3DCOLOR_G(dw) (((float) (((dw) >> 8) & 0xFF)) / 255.0f)
149 #define D3DCOLOR_B(dw) (((float) (((dw) >> 0) & 0xFF)) / 255.0f)
150 #define D3DCOLOR_A(dw) (((float) (((dw) >> 24) & 0xFF)) / 255.0f)
152 #define D3DCOLORTOCOLORVALUE(dw, col) \
153 (col).r = D3DCOLOR_R(dw); \
154 (col).g = D3DCOLOR_G(dw); \
155 (col).b = D3DCOLOR_B(dw); \
156 (col).a = D3DCOLOR_A(dw);
158 #define D3DCOLORTOVECTOR4(dw, vec) \
159 (vec).x = D3DCOLOR_R(dw); \
160 (vec).y = D3DCOLOR_G(dw); \
161 (vec).z = D3DCOLOR_B(dw); \
162 (vec).w = D3DCOLOR_A(dw);
166 /* ===========================================================================
167 The interfactes themselves
168 =========================================================================== */
170 /* ---------- */
171 /* IDirect3D8 */
172 /* ---------- */
174 /*****************************************************************************
175 * Predeclare the interface implementation structures
177 extern ICOM_VTABLE(IDirect3D8) Direct3D8_Vtbl;
178 extern ICOM_VTABLE(IDirect3D8) mesa_d3d8vt;
180 /*****************************************************************************
181 * IDirect3D implementation structure
183 struct IDirect3D8Impl
185 /* IUnknown fields */
186 ICOM_VFIELD(IDirect3D8);
187 DWORD ref;
189 /* IDirect3D8 fields */
192 /* IUnknown: */
193 extern HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface,REFIID refiid,LPVOID *obj);
194 extern ULONG WINAPI IDirect3D8Impl_AddRef(LPDIRECT3D8 iface);
195 extern ULONG WINAPI IDirect3D8Impl_Release(LPDIRECT3D8 iface);
197 /* IDirect3d8: */
198 extern HRESULT WINAPI IDirect3D8Impl_RegisterSoftwareDevice(LPDIRECT3D8 iface, void* pInitializeFunction);
199 extern UINT WINAPI IDirect3D8Impl_GetAdapterCount(LPDIRECT3D8 iface);
200 extern HRESULT WINAPI IDirect3D8Impl_GetAdapterIdentifier(LPDIRECT3D8 iface, UINT Adapter, DWORD Flags, D3DADAPTER_IDENTIFIER8* pIdentifier);
201 extern UINT WINAPI IDirect3D8Impl_GetAdapterModeCount(LPDIRECT3D8 iface, UINT Adapter);
202 extern HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface, UINT Adapter, UINT Mode, D3DDISPLAYMODE* pMode);
203 extern HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface, UINT Adapter, D3DDISPLAYMODE* pMode);
204 extern HRESULT WINAPI IDirect3D8Impl_CheckDeviceType(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE CheckType, D3DFORMAT DisplayFormat,
205 D3DFORMAT BackBufferFormat, BOOL Windowed);
206 extern HRESULT WINAPI IDirect3D8Impl_CheckDeviceFormat(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
207 DWORD Usage, D3DRESOURCETYPE RType, D3DFORMAT CheckFormat);
208 extern HRESULT WINAPI IDirect3D8Impl_CheckDeviceMultiSampleType(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT SurfaceFormat,
209 BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType);
210 extern HRESULT WINAPI IDirect3D8Impl_CheckDepthStencilMatch(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DFORMAT AdapterFormat,
211 D3DFORMAT RenderTargetFormat, D3DFORMAT DepthStencilFormat);
212 extern HRESULT WINAPI IDirect3D8Impl_GetDeviceCaps(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, D3DCAPS8* pCaps);
213 extern HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT Adapter);
214 extern HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow,
215 DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,
216 IDirect3DDevice8** ppReturnedDeviceInterface);
218 /* ---------------- */
219 /* IDirect3DDevice8 */
220 /* ---------------- */
222 /*****************************************************************************
223 * Predeclare the interface implementation structures
225 extern ICOM_VTABLE(IDirect3DDevice8) Direct3DDevice8_Vtbl;
227 /*****************************************************************************
228 * IDirect3DDevice8 implementation structure
230 struct IDirect3DDevice8Impl
232 /* IUnknown fields */
233 ICOM_VFIELD(IDirect3DDevice8);
234 DWORD ref;
236 /* IDirect3DDevice8 fields */
237 IDirect3D8Impl *direct3d8;
238 IDirect3DSurface8Impl *backBuffer;
239 D3DPRESENT_PARAMETERS PresentParms;
240 D3DDEVICE_CREATION_PARAMETERS CreateParms;
242 UINT adapterNo;
243 D3DDEVTYPE devType;
245 UINT srcBlend;
246 UINT dstBlend;
248 /* State block related */
249 BOOL isRecordingState;
250 IDirect3DStateBlockImpl *StateBlock;
251 IDirect3DStateBlockImpl *UpdateStateBlock;
253 /* Other required values */
254 float lightPosn[MAX_ACTIVE_LIGHTS][4];
255 float lightDirn[MAX_ACTIVE_LIGHTS][4];
257 /* OpenGL related */
258 GLXContext glCtx;
259 XVisualInfo *visInfo;
260 Display *display;
261 Window win;
263 /* OpenGL Extension related */
264 BOOL isMultiTexture;
265 UINT TextureUnits;
266 UINT clipPlanes;
267 UINT maxLights;
269 UINT dummyTextureName[8];
272 /* IUnknown: */
273 extern HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 iface,REFIID refiid,LPVOID *obj);
274 extern ULONG WINAPI IDirect3DDevice8Impl_AddRef(LPDIRECT3DDEVICE8 iface);
275 extern ULONG WINAPI IDirect3DDevice8Impl_Release(LPDIRECT3DDEVICE8 iface);
277 /* IDirect3DDevice8: */
278 extern HRESULT WINAPI IDirect3DDevice8Impl_TestCooperativeLevel(LPDIRECT3DDEVICE8 iface);
279 extern UINT WINAPI IDirect3DDevice8Impl_GetAvailableTextureMem(LPDIRECT3DDEVICE8 iface);
280 extern HRESULT WINAPI IDirect3DDevice8Impl_ResourceManagerDiscardBytes(LPDIRECT3DDEVICE8 iface, DWORD Bytes);
281 extern HRESULT WINAPI IDirect3DDevice8Impl_GetDirect3D(LPDIRECT3DDEVICE8 iface, IDirect3D8** ppD3D8);
282 extern HRESULT WINAPI IDirect3DDevice8Impl_GetDeviceCaps(LPDIRECT3DDEVICE8 iface, D3DCAPS8* pCaps);
283 extern HRESULT WINAPI IDirect3DDevice8Impl_GetDisplayMode(LPDIRECT3DDEVICE8 iface, D3DDISPLAYMODE* pMode);
284 extern HRESULT WINAPI IDirect3DDevice8Impl_GetCreationParameters(LPDIRECT3DDEVICE8 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters);
285 extern HRESULT WINAPI IDirect3DDevice8Impl_SetCursorProperties(LPDIRECT3DDEVICE8 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface8* pCursorBitmap);
286 extern void WINAPI IDirect3DDevice8Impl_SetCursorPosition(LPDIRECT3DDEVICE8 iface, UINT XScreenSpace, UINT YScreenSpace,DWORD Flags);
287 extern BOOL WINAPI IDirect3DDevice8Impl_ShowCursor(LPDIRECT3DDEVICE8 iface, BOOL bShow);
288 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE8 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain8** pSwapChain);
289 extern HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRESENT_PARAMETERS* pPresentationParameters);
290 extern HRESULT WINAPI IDirect3DDevice8Impl_Present(LPDIRECT3DDEVICE8 iface, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
291 extern HRESULT WINAPI IDirect3DDevice8Impl_GetBackBuffer(LPDIRECT3DDEVICE8 iface, UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer);
292 extern HRESULT WINAPI IDirect3DDevice8Impl_GetRasterStatus(LPDIRECT3DDEVICE8 iface, D3DRASTER_STATUS* pRasterStatus);
293 extern void WINAPI IDirect3DDevice8Impl_SetGammaRamp(LPDIRECT3DDEVICE8 iface, DWORD Flags,CONST D3DGAMMARAMP* pRamp);
294 extern void WINAPI IDirect3DDevice8Impl_GetGammaRamp(LPDIRECT3DDEVICE8 iface, D3DGAMMARAMP* pRamp);
295 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateTexture(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture8** ppTexture);
296 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateVolumeTexture(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture8** ppVolumeTexture);
297 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateCubeTexture(LPDIRECT3DDEVICE8 iface, UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture8** ppCubeTexture);
298 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexBuffer(LPDIRECT3DDEVICE8 iface, UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer8** ppVertexBuffer);
299 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateIndexBuffer(LPDIRECT3DDEVICE8 iface, UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer8** ppIndexBuffer);
300 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateRenderTarget(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,IDirect3DSurface8** ppSurface);
301 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateDepthStencilSurface(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,IDirect3DSurface8** ppSurface);
302 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateImageSurface(LPDIRECT3DDEVICE8 iface, UINT Width,UINT Height,D3DFORMAT Format,IDirect3DSurface8** ppSurface);
303 extern HRESULT WINAPI IDirect3DDevice8Impl_CopyRects(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray);
304 extern HRESULT WINAPI IDirect3DDevice8Impl_UpdateTexture(LPDIRECT3DDEVICE8 iface, IDirect3DBaseTexture8* pSourceTexture,IDirect3DBaseTexture8* pDestinationTexture);
305 extern HRESULT WINAPI IDirect3DDevice8Impl_GetFrontBuffer(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pDestSurface);
306 extern HRESULT WINAPI IDirect3DDevice8Impl_SetRenderTarget(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8* pRenderTarget,IDirect3DSurface8* pNewZStencil);
307 extern HRESULT WINAPI IDirect3DDevice8Impl_GetRenderTarget(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8** ppRenderTarget);
308 extern HRESULT WINAPI IDirect3DDevice8Impl_GetDepthStencilSurface(LPDIRECT3DDEVICE8 iface, IDirect3DSurface8** ppZStencilSurface);
309 extern HRESULT WINAPI IDirect3DDevice8Impl_BeginScene(LPDIRECT3DDEVICE8 iface);
310 extern HRESULT WINAPI IDirect3DDevice8Impl_EndScene(LPDIRECT3DDEVICE8 iface);
311 extern HRESULT WINAPI IDirect3DDevice8Impl_Clear(LPDIRECT3DDEVICE8 iface, DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil);
312 extern HRESULT WINAPI IDirect3DDevice8Impl_SetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix);
313 extern HRESULT WINAPI IDirect3DDevice8Impl_GetTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix);
314 extern HRESULT WINAPI IDirect3DDevice8Impl_MultiplyTransform(LPDIRECT3DDEVICE8 iface, D3DTRANSFORMSTATETYPE State, CONST D3DMATRIX* pMatrix);
315 extern HRESULT WINAPI IDirect3DDevice8Impl_SetViewport(LPDIRECT3DDEVICE8 iface, CONST D3DVIEWPORT8* pViewport);
316 extern HRESULT WINAPI IDirect3DDevice8Impl_GetViewport(LPDIRECT3DDEVICE8 iface, D3DVIEWPORT8* pViewport);
317 extern HRESULT WINAPI IDirect3DDevice8Impl_SetMaterial(LPDIRECT3DDEVICE8 iface, CONST D3DMATERIAL8* pMaterial);
318 extern HRESULT WINAPI IDirect3DDevice8Impl_GetMaterial(LPDIRECT3DDEVICE8 iface, D3DMATERIAL8* pMaterial);
319 extern HRESULT WINAPI IDirect3DDevice8Impl_SetLight(LPDIRECT3DDEVICE8 iface, DWORD Index,CONST D3DLIGHT8* pLight);
320 extern HRESULT WINAPI IDirect3DDevice8Impl_GetLight(LPDIRECT3DDEVICE8 iface, DWORD Index,D3DLIGHT8* pLight);
321 extern HRESULT WINAPI IDirect3DDevice8Impl_LightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL Enable);
322 extern HRESULT WINAPI IDirect3DDevice8Impl_GetLightEnable(LPDIRECT3DDEVICE8 iface, DWORD Index,BOOL* pEnable);
323 extern HRESULT WINAPI IDirect3DDevice8Impl_SetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,CONST float* pPlane);
324 extern HRESULT WINAPI IDirect3DDevice8Impl_GetClipPlane(LPDIRECT3DDEVICE8 iface, DWORD Index,float* pPlane);
325 extern HRESULT WINAPI IDirect3DDevice8Impl_SetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD Value);
326 extern HRESULT WINAPI IDirect3DDevice8Impl_GetRenderState(LPDIRECT3DDEVICE8 iface, D3DRENDERSTATETYPE State,DWORD* pValue);
327 extern HRESULT WINAPI IDirect3DDevice8Impl_BeginStateBlock(LPDIRECT3DDEVICE8 iface);
328 extern HRESULT WINAPI IDirect3DDevice8Impl_EndStateBlock(LPDIRECT3DDEVICE8 iface, DWORD* pToken);
329 extern HRESULT WINAPI IDirect3DDevice8Impl_ApplyStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
330 extern HRESULT WINAPI IDirect3DDevice8Impl_CaptureStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
331 extern HRESULT WINAPI IDirect3DDevice8Impl_DeleteStateBlock(LPDIRECT3DDEVICE8 iface, DWORD Token);
332 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateStateBlock(LPDIRECT3DDEVICE8 iface, D3DSTATEBLOCKTYPE Type,DWORD* pToken);
333 extern HRESULT WINAPI IDirect3DDevice8Impl_SetClipStatus(LPDIRECT3DDEVICE8 iface, CONST D3DCLIPSTATUS8* pClipStatus);
334 extern HRESULT WINAPI IDirect3DDevice8Impl_GetClipStatus(LPDIRECT3DDEVICE8 iface, D3DCLIPSTATUS8* pClipStatus);
335 extern HRESULT WINAPI IDirect3DDevice8Impl_GetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8** ppTexture);
336 extern HRESULT WINAPI IDirect3DDevice8Impl_SetTexture(LPDIRECT3DDEVICE8 iface, DWORD Stage,IDirect3DBaseTexture8* pTexture);
337 extern HRESULT WINAPI IDirect3DDevice8Impl_GetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue);
338 extern HRESULT WINAPI IDirect3DDevice8Impl_SetTextureStageState(LPDIRECT3DDEVICE8 iface, DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value);
339 extern HRESULT WINAPI IDirect3DDevice8Impl_ValidateDevice(LPDIRECT3DDEVICE8 iface, DWORD* pNumPasses);
340 extern HRESULT WINAPI IDirect3DDevice8Impl_GetInfo(LPDIRECT3DDEVICE8 iface, DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize);
341 extern HRESULT WINAPI IDirect3DDevice8Impl_SetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber,CONST PALETTEENTRY* pEntries);
342 extern HRESULT WINAPI IDirect3DDevice8Impl_GetPaletteEntries(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber,PALETTEENTRY* pEntries);
343 extern HRESULT WINAPI IDirect3DDevice8Impl_SetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT PaletteNumber);
344 extern HRESULT WINAPI IDirect3DDevice8Impl_GetCurrentTexturePalette(LPDIRECT3DDEVICE8 iface, UINT *PaletteNumber);
345 extern HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitive(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount);
346 extern HRESULT WINAPI IDirect3DDevice8Impl_DrawIndexedPrimitive(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount);
347 extern HRESULT WINAPI IDirect3DDevice8Impl_DrawPrimitiveUP(LPDIRECT3DDEVICE8 iface, D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride);
348 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);
349 extern HRESULT WINAPI IDirect3DDevice8Impl_ProcessVertices(LPDIRECT3DDEVICE8 iface, UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags);
350 extern HRESULT WINAPI IDirect3DDevice8Impl_CreateVertexShader(LPDIRECT3DDEVICE8 iface, CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage);
351 extern HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
352 extern HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* pHandle);
353 extern HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
354 extern HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
355 extern HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,void* pConstantData,DWORD ConstantCount);
356 extern HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderDeclaration(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
357 extern HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
358 extern HRESULT WINAPI IDirect3DDevice8Impl_SetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride);
359 extern HRESULT WINAPI IDirect3DDevice8Impl_GetStreamSource(LPDIRECT3DDEVICE8 iface, UINT StreamNumber,IDirect3DVertexBuffer8** ppStreamData,UINT* pStride);
360 extern HRESULT WINAPI IDirect3DDevice8Impl_SetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex);
361 extern HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex);
362 extern HRESULT WINAPI IDirect3DDevice8Impl_CreatePixelShader(LPDIRECT3DDEVICE8 iface, CONST DWORD* pFunction,DWORD* pHandle);
363 extern HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
364 extern HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD* pHandle);
365 extern HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface, DWORD Handle);
366 extern HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,CONST void* pConstantData,DWORD ConstantCount);
367 extern HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderConstant(LPDIRECT3DDEVICE8 iface, DWORD Register,void* pConstantData,DWORD ConstantCount);
368 extern HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderFunction(LPDIRECT3DDEVICE8 iface, DWORD Handle,void* pData,DWORD* pSizeOfData);
369 extern HRESULT WINAPI IDirect3DDevice8Impl_DrawRectPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo);
370 extern HRESULT WINAPI IDirect3DDevice8Impl_DrawTriPatch(LPDIRECT3DDEVICE8 iface, UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo);
371 extern HRESULT WINAPI IDirect3DDevice8Impl_DeletePatch(LPDIRECT3DDEVICE8 iface, UINT Handle);
373 /* ---------------- */
374 /* IDirect3DVolume8 */
375 /* ---------------- */
377 /*****************************************************************************
378 * Predeclare the interface implementation structures
380 extern ICOM_VTABLE(IDirect3DVolume8) Direct3DVolume8_Vtbl;
382 /*****************************************************************************
383 * IDirect3DVolume8 implementation structure
385 struct IDirect3DVolume8Impl
387 /* IUnknown fields */
388 ICOM_VFIELD(IDirect3DVolume8);
389 DWORD ref;
391 /* IDirect3DVolume8 fields */
392 IDirect3DDevice8Impl *Device;
393 D3DRESOURCETYPE ResourceType;
395 void *Container;
396 D3DVOLUME_DESC myDesc;
397 BYTE *allocatedMemory;
398 UINT textureName;
399 UINT bytesPerPixel;
402 /* IUnknown: */
403 extern HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface,REFIID refiid,LPVOID *obj);
404 extern ULONG WINAPI IDirect3DVolume8Impl_AddRef(LPDIRECT3DVOLUME8 iface);
405 extern ULONG WINAPI IDirect3DVolume8Impl_Release(LPDIRECT3DVOLUME8 iface);
407 /* IDirect3DVolume8: */
408 extern HRESULT WINAPI IDirect3DVolume8Impl_GetDevice(LPDIRECT3DVOLUME8 iface, IDirect3DDevice8** ppDevice);
409 extern HRESULT WINAPI IDirect3DVolume8Impl_SetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
410 extern HRESULT WINAPI IDirect3DVolume8Impl_GetPrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
411 extern HRESULT WINAPI IDirect3DVolume8Impl_FreePrivateData(LPDIRECT3DVOLUME8 iface, REFGUID refguid);
412 extern HRESULT WINAPI IDirect3DVolume8Impl_GetContainer(LPDIRECT3DVOLUME8 iface, REFIID riid, void** ppContainer);
413 extern HRESULT WINAPI IDirect3DVolume8Impl_GetDesc(LPDIRECT3DVOLUME8 iface, D3DVOLUME_DESC* pDesc);
414 extern HRESULT WINAPI IDirect3DVolume8Impl_LockBox(LPDIRECT3DVOLUME8 iface, D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox, DWORD Flags);
415 extern HRESULT WINAPI IDirect3DVolume8Impl_UnlockBox(LPDIRECT3DVOLUME8 iface);
417 /* ------------------- */
418 /* IDirect3DSwapChain8 */
419 /* ------------------- */
421 /*****************************************************************************
422 * Predeclare the interface implementation structures
424 extern ICOM_VTABLE(IDirect3DSwapChain8) Direct3DSwapChain8_Vtbl;
426 /*****************************************************************************
427 * IDirect3DSwapChain8 implementation structure
429 struct IDirect3DSwapChain8Impl
431 /* IUnknown fields */
432 ICOM_VFIELD(IDirect3DSwapChain8);
433 DWORD ref;
435 /* IDirect3DSwapChain8 fields */
438 /* IUnknown: */
439 extern HRESULT WINAPI IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface,REFIID refiid,LPVOID *obj);
440 extern ULONG WINAPI IDirect3DSwapChain8Impl_AddRef(LPDIRECT3DSWAPCHAIN8 iface);
441 extern ULONG WINAPI IDirect3DSwapChain8Impl_Release(LPDIRECT3DSWAPCHAIN8 iface);
443 /* IDirect3DSwapChain8: */
444 extern HRESULT WINAPI IDirect3DSwapChain8Impl_Present(LPDIRECT3DSWAPCHAIN8 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion);
445 extern HRESULT WINAPI IDirect3DSwapChain8Impl_GetBackBuffer(LPDIRECT3DSWAPCHAIN8 iface, UINT BackBuffer, D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer);
447 /* ----------------- */
448 /* IDirect3DSurface8 */
449 /* ----------------- */
451 /*****************************************************************************
452 * Predeclare the interface implementation structures
454 extern ICOM_VTABLE(IDirect3DSurface8) Direct3DSurface8_Vtbl;
456 /*****************************************************************************
457 * IDirect3DSurface8 implementation structure
459 struct IDirect3DSurface8Impl
461 /* IUnknown fields */
462 ICOM_VFIELD(IDirect3DSurface8);
463 DWORD ref;
465 /* IDirect3DSurface8 fields */
466 IDirect3DDevice8Impl *Device;
467 D3DRESOURCETYPE ResourceType;
469 IUnknown *Container;
471 D3DSURFACE_DESC myDesc;
472 BYTE *allocatedMemory;
473 UINT textureName;
474 UINT bytesPerPixel;
477 /* IUnknown: */
478 extern HRESULT WINAPI IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 iface,REFIID refiid,LPVOID *obj);
479 extern ULONG WINAPI IDirect3DSurface8Impl_AddRef(LPDIRECT3DSURFACE8 iface);
480 extern ULONG WINAPI IDirect3DSurface8Impl_Release(LPDIRECT3DSURFACE8 iface);
482 /* IDirect3DSurface8: */
483 extern HRESULT WINAPI IDirect3DSurface8Impl_GetDevice(LPDIRECT3DSURFACE8 iface, IDirect3DDevice8** ppDevice);
484 extern HRESULT WINAPI IDirect3DSurface8Impl_SetPrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags);
485 extern HRESULT WINAPI IDirect3DSurface8Impl_GetPrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid,void* pData,DWORD* pSizeOfData);
486 extern HRESULT WINAPI IDirect3DSurface8Impl_FreePrivateData(LPDIRECT3DSURFACE8 iface, REFGUID refguid);
487 extern HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 iface, REFIID riid,void** ppContainer);
488 extern HRESULT WINAPI IDirect3DSurface8Impl_GetDesc(LPDIRECT3DSURFACE8 iface, D3DSURFACE_DESC *pDesc);
489 extern HRESULT WINAPI IDirect3DSurface8Impl_LockRect(LPDIRECT3DSURFACE8 iface, D3DLOCKED_RECT* pLockedRect, CONST RECT* pRect,DWORD Flags);
490 extern HRESULT WINAPI IDirect3DSurface8Impl_UnlockRect(LPDIRECT3DSURFACE8 iface);
492 /* ------------------ */
493 /* IDirect3DResource8 */
494 /* ------------------ */
496 /*****************************************************************************
497 * Predeclare the interface implementation structures
499 extern ICOM_VTABLE(IDirect3DResource8) Direct3DResource8_Vtbl;
501 /*****************************************************************************
502 * IDirect3DResource8 implementation structure
504 struct IDirect3DResource8Impl
506 /* IUnknown fields */
507 ICOM_VFIELD(IDirect3DResource8);
508 DWORD ref;
510 /* IDirect3DResource8 fields */
511 IDirect3DDevice8Impl *Device;
512 D3DRESOURCETYPE ResourceType;
515 /* IUnknown: */
516 extern HRESULT WINAPI IDirect3DResource8Impl_QueryInterface(LPDIRECT3DRESOURCE8 iface,REFIID refiid,LPVOID *obj);
517 extern ULONG WINAPI IDirect3DResource8Impl_AddRef(LPDIRECT3DRESOURCE8 iface);
518 extern ULONG WINAPI IDirect3DResource8Impl_Release(LPDIRECT3DRESOURCE8 iface);
520 /* IDirect3DResource8: */
521 extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
522 extern HRESULT WINAPI IDirect3DResource8Impl_SetPrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
523 extern HRESULT WINAPI IDirect3DResource8Impl_GetPrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
524 extern HRESULT WINAPI IDirect3DResource8Impl_FreePrivateData(LPDIRECT3DRESOURCE8 iface, REFGUID refguid);
525 extern DWORD WINAPI IDirect3DResource8Impl_SetPriority(LPDIRECT3DRESOURCE8 iface, DWORD PriorityNew);
526 extern DWORD WINAPI IDirect3DResource8Impl_GetPriority(LPDIRECT3DRESOURCE8 iface);
527 extern void WINAPI IDirect3DResource8Impl_PreLoad(LPDIRECT3DRESOURCE8 iface);
528 extern D3DRESOURCETYPE WINAPI IDirect3DResource8Impl_GetType(LPDIRECT3DRESOURCE8 iface);
530 /* ---------------------- */
531 /* IDirect3DVertexBuffer8 */
532 /* ---------------------- */
534 /*****************************************************************************
535 * Predeclare the interface implementation structures
537 extern ICOM_VTABLE(IDirect3DVertexBuffer8) Direct3DVertexBuffer8_Vtbl;
539 /*****************************************************************************
540 * IDirect3DVertexBuffer8 implementation structure
542 struct IDirect3DVertexBuffer8Impl
544 /* IUnknown fields */
545 ICOM_VFIELD(IDirect3DVertexBuffer8);
546 DWORD ref;
548 /* IDirect3DResource8 fields */
549 IDirect3DDevice8Impl *Device;
550 D3DRESOURCETYPE ResourceType;
552 /* IDirect3DVertexBuffer8 fields */
553 BYTE *allocatedMemory;
554 D3DVERTEXBUFFER_DESC currentDesc;
557 /* IUnknown: */
558 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8 iface,REFIID refiid,LPVOID *obj);
559 extern ULONG WINAPI IDirect3DVertexBuffer8Impl_AddRef(LPDIRECT3DVERTEXBUFFER8 iface);
560 extern ULONG WINAPI IDirect3DVertexBuffer8Impl_Release(LPDIRECT3DVERTEXBUFFER8 iface);
562 /* IDirect3DVertexBuffer8: (Inherited from IDirect3DResource8) */
563 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDevice(LPDIRECT3DVERTEXBUFFER8 iface, IDirect3DDevice8** ppDevice);
564 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_SetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
565 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetPrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
566 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_FreePrivateData(LPDIRECT3DVERTEXBUFFER8 iface, REFGUID refguid);
567 extern DWORD WINAPI IDirect3DVertexBuffer8Impl_SetPriority(LPDIRECT3DVERTEXBUFFER8 iface, DWORD PriorityNew);
568 extern DWORD WINAPI IDirect3DVertexBuffer8Impl_GetPriority(LPDIRECT3DVERTEXBUFFER8 iface);
569 extern void WINAPI IDirect3DVertexBuffer8Impl_PreLoad(LPDIRECT3DVERTEXBUFFER8 iface);
570 extern D3DRESOURCETYPE WINAPI IDirect3DVertexBuffer8Impl_GetType(LPDIRECT3DVERTEXBUFFER8 iface);
572 /* IDirect3DVertexBuffer8: */
573 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_Lock(LPDIRECT3DVERTEXBUFFER8 iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags);
574 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_Unlock(LPDIRECT3DVERTEXBUFFER8 iface);
575 extern HRESULT WINAPI IDirect3DVertexBuffer8Impl_GetDesc(LPDIRECT3DVERTEXBUFFER8 iface, D3DVERTEXBUFFER_DESC *pDesc);
577 /* --------------------- */
578 /* IDirect3DIndexBuffer8 */
579 /* --------------------- */
581 /*****************************************************************************
582 * Predeclare the interface implementation structures
584 extern ICOM_VTABLE(IDirect3DIndexBuffer8) Direct3DIndexBuffer8_Vtbl;
586 /*****************************************************************************
587 * IDirect3DIndexBuffer8 implementation structure
589 struct IDirect3DIndexBuffer8Impl
591 /* IUnknown fields */
592 ICOM_VFIELD(IDirect3DIndexBuffer8);
593 DWORD ref;
595 /* IDirect3DResource8 fields */
596 IDirect3DDevice8Impl *Device;
597 D3DRESOURCETYPE ResourceType;
599 /* IDirect3DIndexBuffer8 fields */
600 void *allocatedMemory;
601 D3DINDEXBUFFER_DESC currentDesc;
604 /* IUnknown: */
605 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_QueryInterface(LPDIRECT3DINDEXBUFFER8 iface,REFIID refiid,LPVOID *obj);
606 extern ULONG WINAPI IDirect3DIndexBuffer8Impl_AddRef(LPDIRECT3DINDEXBUFFER8 iface);
607 extern ULONG WINAPI IDirect3DIndexBuffer8Impl_Release(LPDIRECT3DINDEXBUFFER8 iface);
609 /* IDirect3DIndexBuffer8: (Inherited from IDirect3DResource8) */
610 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDevice(LPDIRECT3DINDEXBUFFER8 iface, IDirect3DDevice8** ppDevice);
611 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_SetPrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
612 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetPrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
613 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_FreePrivateData(LPDIRECT3DINDEXBUFFER8 iface, REFGUID refguid);
614 extern DWORD WINAPI IDirect3DIndexBuffer8Impl_SetPriority(LPDIRECT3DINDEXBUFFER8 iface, DWORD PriorityNew);
615 extern DWORD WINAPI IDirect3DIndexBuffer8Impl_GetPriority(LPDIRECT3DINDEXBUFFER8 iface);
616 extern void WINAPI IDirect3DIndexBuffer8Impl_PreLoad(LPDIRECT3DINDEXBUFFER8 iface);
617 extern D3DRESOURCETYPE WINAPI IDirect3DIndexBuffer8Impl_GetType(LPDIRECT3DINDEXBUFFER8 iface);
619 /* IDirect3DIndexBuffer8: */
620 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_Lock(LPDIRECT3DINDEXBUFFER8 iface, UINT OffsetToLock, UINT SizeToLock, BYTE** ppbData, DWORD Flags);
621 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_Unlock(LPDIRECT3DINDEXBUFFER8 iface);
622 extern HRESULT WINAPI IDirect3DIndexBuffer8Impl_GetDesc(LPDIRECT3DINDEXBUFFER8 iface, D3DINDEXBUFFER_DESC *pDesc);
624 /* --------------------- */
625 /* IDirect3DBaseTexture8 */
626 /* --------------------- */
628 /*****************************************************************************
629 * Predeclare the interface implementation structures
631 extern ICOM_VTABLE(IDirect3DBaseTexture8) Direct3DBaseTexture8_Vtbl;
633 /*****************************************************************************
634 * IDirect3DBaseTexture8 implementation structure
636 struct IDirect3DBaseTexture8Impl
638 /* IUnknown fields */
639 ICOM_VFIELD(IDirect3DBaseTexture8);
640 DWORD ref;
642 /* IDirect3DResource8 fields */
643 IDirect3DDevice8Impl *Device;
644 D3DRESOURCETYPE ResourceType;
646 /* IDirect3DBaseTexture8 fields */
648 *BOOL isManaged;
649 *DWORD lod;
653 /* IUnknown: */
654 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 iface,REFIID refiid,LPVOID *obj);
655 extern ULONG WINAPI IDirect3DBaseTexture8Impl_AddRef(LPDIRECT3DBASETEXTURE8 iface);
656 extern ULONG WINAPI IDirect3DBaseTexture8Impl_Release(LPDIRECT3DBASETEXTURE8 iface);
658 /* IDirect3DBaseTexture8: (Inherited from IDirect3DResource8) */
659 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_GetDevice(LPDIRECT3DBASETEXTURE8 iface, IDirect3DDevice8** ppDevice);
660 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_SetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
661 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_GetPrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
662 extern HRESULT WINAPI IDirect3DBaseTexture8Impl_FreePrivateData(LPDIRECT3DBASETEXTURE8 iface, REFGUID refguid);
663 extern DWORD WINAPI IDirect3DBaseTexture8Impl_SetPriority(LPDIRECT3DBASETEXTURE8 iface, DWORD PriorityNew);
664 extern DWORD WINAPI IDirect3DBaseTexture8Impl_GetPriority(LPDIRECT3DBASETEXTURE8 iface);
665 extern void WINAPI IDirect3DBaseTexture8Impl_PreLoad(LPDIRECT3DBASETEXTURE8 iface);
666 extern D3DRESOURCETYPE WINAPI IDirect3DBaseTexture8Impl_GetType(LPDIRECT3DBASETEXTURE8 iface);
668 /* IDirect3DBaseTexture8: */
669 extern DWORD WINAPI IDirect3DBaseTexture8Impl_SetLOD(LPDIRECT3DBASETEXTURE8 iface, DWORD LODNew);
670 extern DWORD WINAPI IDirect3DBaseTexture8Impl_GetLOD(LPDIRECT3DBASETEXTURE8 iface);
671 extern DWORD WINAPI IDirect3DBaseTexture8Impl_GetLevelCount(LPDIRECT3DBASETEXTURE8 iface);
673 /* --------------------- */
674 /* IDirect3DCubeTexture8 */
675 /* --------------------- */
677 /*****************************************************************************
678 * Predeclare the interface implementation structures
680 extern ICOM_VTABLE(IDirect3DCubeTexture8) Direct3DCubeTexture8_Vtbl;
682 /*****************************************************************************
683 * IDirect3DCubeTexture8 implementation structure
685 struct IDirect3DCubeTexture8Impl
687 /* IUnknown fields */
688 ICOM_VFIELD(IDirect3DCubeTexture8);
689 DWORD ref;
691 /* IDirect3DResource8 fields */
692 IDirect3DDevice8Impl *Device;
693 D3DRESOURCETYPE ResourceType;
695 /* IDirect3DBaseTexture8 fields */
697 /* IDirect3DCubeTexture8 fields */
698 UINT edgeLength;
699 DWORD usage;
700 UINT levels;
701 D3DFORMAT format;
703 IDirect3DDevice8Impl *device;
704 IDirect3DSurface8Impl *surfaces[6][MAX_LEVELS];
705 BOOL Dirty;
708 /* IUnknown: */
709 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 iface,REFIID refiid,LPVOID *obj);
710 extern ULONG WINAPI IDirect3DCubeTexture8Impl_AddRef(LPDIRECT3DCUBETEXTURE8 iface);
711 extern ULONG WINAPI IDirect3DCubeTexture8Impl_Release(LPDIRECT3DCUBETEXTURE8 iface);
713 /* IDirect3DCubeTexture8: (Inherited from IDirect3DResource8) */
714 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_GetDevice(LPDIRECT3DCUBETEXTURE8 iface, IDirect3DDevice8** ppDevice);
715 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_SetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
716 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_GetPrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
717 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_FreePrivateData(LPDIRECT3DCUBETEXTURE8 iface, REFGUID refguid);
718 extern DWORD WINAPI IDirect3DCubeTexture8Impl_SetPriority(LPDIRECT3DCUBETEXTURE8 iface, DWORD PriorityNew);
719 extern DWORD WINAPI IDirect3DCubeTexture8Impl_GetPriority(LPDIRECT3DCUBETEXTURE8 iface);
720 extern void WINAPI IDirect3DCubeTexture8Impl_PreLoad(LPDIRECT3DCUBETEXTURE8 iface);
721 extern D3DRESOURCETYPE WINAPI IDirect3DCubeTexture8Impl_GetType(LPDIRECT3DCUBETEXTURE8 iface);
723 /* IDirect3DCubeTexture8: (Inherited from IDirect3DBaseTexture8) */
724 extern DWORD WINAPI IDirect3DCubeTexture8Impl_SetLOD(LPDIRECT3DCUBETEXTURE8 iface, DWORD LODNew);
725 extern DWORD WINAPI IDirect3DCubeTexture8Impl_GetLOD(LPDIRECT3DCUBETEXTURE8 iface);
726 extern DWORD WINAPI IDirect3DCubeTexture8Impl_GetLevelCount(LPDIRECT3DCUBETEXTURE8 iface);
728 /* IDirect3DCubeTexture8 */
729 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_GetLevelDesc(LPDIRECT3DCUBETEXTURE8 iface,UINT Level,D3DSURFACE_DESC *pDesc);
730 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_GetCubeMapSurface(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface8** ppCubeMapSurface);
731 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_LockRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
732 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_UnlockRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,UINT Level);
733 extern HRESULT WINAPI IDirect3DCubeTexture8Impl_AddDirtyRect(LPDIRECT3DCUBETEXTURE8 iface,D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect);
735 /* ----------------- */
736 /* IDirect3DTexture8 */
737 /* ----------------- */
739 /*****************************************************************************
740 * Predeclare the interface implementation structures
742 extern ICOM_VTABLE(IDirect3DTexture8) Direct3DTexture8_Vtbl;
744 /*****************************************************************************
745 * IDirect3DTexture8 implementation structure
747 struct IDirect3DTexture8Impl
749 /* IUnknown fields */
750 ICOM_VFIELD(IDirect3DTexture8);
751 DWORD ref;
753 /* IDirect3DResourc8 fields */
754 IDirect3DDevice8Impl *Device;
755 D3DRESOURCETYPE ResourceType;
757 /* IDirect3DBaseTexture8 fields */
759 /* IDirect3DTexture8 fields */
760 UINT width;
761 UINT height;
762 UINT levels;
763 DWORD usage;
764 D3DFORMAT format;
766 IDirect3DDevice8Impl *device;
767 IDirect3DSurface8Impl *surfaces[MAX_LEVELS];
768 BOOL Dirty;
771 /* IUnknown: */
772 extern HRESULT WINAPI IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface,REFIID refiid,LPVOID *obj);
773 extern ULONG WINAPI IDirect3DTexture8Impl_AddRef(LPDIRECT3DTEXTURE8 iface);
774 extern ULONG WINAPI IDirect3DTexture8Impl_Release(LPDIRECT3DTEXTURE8 iface);
776 /* IDirect3DTexture8: (Inherited from IDirect3DResource8) */
777 extern HRESULT WINAPI IDirect3DTexture8Impl_GetDevice(LPDIRECT3DTEXTURE8 iface, IDirect3DDevice8** ppDevice);
778 extern HRESULT WINAPI IDirect3DTexture8Impl_SetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
779 extern HRESULT WINAPI IDirect3DTexture8Impl_GetPrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
780 extern HRESULT WINAPI IDirect3DTexture8Impl_FreePrivateData(LPDIRECT3DTEXTURE8 iface, REFGUID refguid);
781 extern DWORD WINAPI IDirect3DTexture8Impl_SetPriority(LPDIRECT3DTEXTURE8 iface, DWORD PriorityNew);
782 extern DWORD WINAPI IDirect3DTexture8Impl_GetPriority(LPDIRECT3DTEXTURE8 iface);
783 extern void WINAPI IDirect3DTexture8Impl_PreLoad(LPDIRECT3DTEXTURE8 iface);
784 extern D3DRESOURCETYPE WINAPI IDirect3DTexture8Impl_GetType(LPDIRECT3DTEXTURE8 iface);
786 /* IDirect3DTexture8: (Inherited from IDirect3DBaseTexture8) */
787 extern DWORD WINAPI IDirect3DTexture8Impl_SetLOD(LPDIRECT3DTEXTURE8 iface, DWORD LODNew);
788 extern DWORD WINAPI IDirect3DTexture8Impl_GetLOD(LPDIRECT3DTEXTURE8 iface);
789 extern DWORD WINAPI IDirect3DTexture8Impl_GetLevelCount(LPDIRECT3DTEXTURE8 iface);
791 /* IDirect3DTexture8: */
792 extern HRESULT WINAPI IDirect3DTexture8Impl_GetLevelDesc(LPDIRECT3DTEXTURE8 iface, UINT Level,D3DSURFACE_DESC* pDesc);
793 extern HRESULT WINAPI IDirect3DTexture8Impl_GetSurfaceLevel(LPDIRECT3DTEXTURE8 iface, UINT Level,IDirect3DSurface8** ppSurfaceLevel);
794 extern HRESULT WINAPI IDirect3DTexture8Impl_LockRect(LPDIRECT3DTEXTURE8 iface, UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags);
795 extern HRESULT WINAPI IDirect3DTexture8Impl_UnlockRect(LPDIRECT3DTEXTURE8 iface, UINT Level);
796 extern HRESULT WINAPI IDirect3DTexture8Impl_AddDirtyRect(LPDIRECT3DTEXTURE8 iface, CONST RECT* pDirtyRect);
798 /* ----------------------- */
799 /* IDirect3DVolumeTexture8 */
800 /* ----------------------- */
802 /*****************************************************************************
803 * Predeclare the interface implementation structures
805 extern ICOM_VTABLE(IDirect3DVolumeTexture8) Direct3DVolumeTexture8_Vtbl;
807 /*****************************************************************************
808 * IDirect3DVolumeTexture8 implementation structure
810 struct IDirect3DVolumeTexture8Impl
812 /* IUnknown fields */
813 ICOM_VFIELD(IDirect3DVolumeTexture8);
814 DWORD ref;
816 /* IDirect3DResource8 fields */
817 IDirect3DDevice8Impl *Device;
818 D3DRESOURCETYPE ResourceType;
820 /* IDirect3DBaseTexture8 fields */
822 /* IDirect3DVolumeTexture8 fields */
823 UINT width;
824 UINT height;
825 UINT depth;
826 UINT levels;
827 DWORD usage;
828 D3DFORMAT format;
830 IDirect3DDevice8Impl *device;
831 IDirect3DVolume8Impl *volumes[MAX_LEVELS];
832 BOOL Dirty;
835 /* IUnknown: */
836 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTURE8 iface,REFIID refiid,LPVOID *obj);
837 extern ULONG WINAPI IDirect3DVolumeTexture8Impl_AddRef(LPDIRECT3DVOLUMETEXTURE8 iface);
838 extern ULONG WINAPI IDirect3DVolumeTexture8Impl_Release(LPDIRECT3DVOLUMETEXTURE8 iface);
840 /* IDirect3DVolumeTexture8: (Inherited from IDirect3DResource8) */
841 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetDevice(LPDIRECT3DVOLUMETEXTURE8 iface, IDirect3DDevice8** ppDevice);
842 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_SetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags);
843 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetPrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid, void* pData, DWORD* pSizeOfData);
844 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_FreePrivateData(LPDIRECT3DVOLUMETEXTURE8 iface, REFGUID refguid);
845 extern DWORD WINAPI IDirect3DVolumeTexture8Impl_SetPriority(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD PriorityNew);
846 extern DWORD WINAPI IDirect3DVolumeTexture8Impl_GetPriority(LPDIRECT3DVOLUMETEXTURE8 iface);
847 extern void WINAPI IDirect3DVolumeTexture8Impl_PreLoad(LPDIRECT3DVOLUMETEXTURE8 iface);
848 extern D3DRESOURCETYPE WINAPI IDirect3DVolumeTexture8Impl_GetType(LPDIRECT3DVOLUMETEXTURE8 iface);
850 /* IDirect3DVolumeTexture8: (Inherited from IDirect3DBaseTexture8) */
851 extern DWORD WINAPI IDirect3DVolumeTexture8Impl_SetLOD(LPDIRECT3DVOLUMETEXTURE8 iface, DWORD LODNew);
852 extern DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLOD(LPDIRECT3DVOLUMETEXTURE8 iface);
853 extern DWORD WINAPI IDirect3DVolumeTexture8Impl_GetLevelCount(LPDIRECT3DVOLUMETEXTURE8 iface);
855 /* IDirect3DVolumeTexture8: */
856 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetLevelDesc(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DVOLUME_DESC *pDesc);
857 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_GetVolumeLevel(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,IDirect3DVolume8** ppVolumeLevel);
858 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_LockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level,D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox,DWORD Flags);
859 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_UnlockBox(LPDIRECT3DVOLUMETEXTURE8 iface, UINT Level);
860 extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3DVOLUMETEXTURE8 iface, CONST D3DBOX* pDirtyBox);
862 /* ==============================================================================
863 Private interfactes: beginning of cleaning/splitting for HAL and d3d9 support
864 ============================================================================== */
866 /* State Block for Begin/End/Capture/Create/Apply State Block */
867 /* Note: Very long winded but I do not believe gl Lists will */
868 /* resolve everything we need, so doing it manually for now */
869 typedef struct SAVEDSTATES {
870 BOOL lightEnable[MAX_ACTIVE_LIGHTS];
871 BOOL Indices;
872 BOOL lights[MAX_ACTIVE_LIGHTS];
873 BOOL material;
874 BOOL stream_source[MAX_STREAMS];
875 BOOL textures[8];
876 BOOL transform[HIGHEST_TRANSFORMSTATE];
877 BOOL viewport;
878 BOOL vertexShader;
879 BOOL vertexShaderConstant;
880 BOOL vertexShaderDecl;
881 BOOL pixelShader;
882 BOOL renderstate[HIGHEST_RENDER_STATE];
883 BOOL texture_state[8][HIGHEST_TEXTURE_STATE];
884 BOOL clipplane[MAX_CLIPPLANES];
885 } SAVEDSTATES;
888 /* ----------------------- */
889 /* IDirect3DStateBlockImpl */
890 /* ----------------------- */
892 /*****************************************************************************
893 * Predeclare the interface implementation structures
895 /*extern ICOM_VTABLE(IDirect3DStateBlock9) Direct3DStateBlock9_Vtbl;*/
897 /*****************************************************************************
898 * IDirect3DStateBlock implementation structure
900 struct IDirect3DStateBlockImpl {
901 /* IUnknown fields */
902 /*ICOM_VFIELD(IDirect3DStateBlock9);*/
903 DWORD ref;
905 /* The device, to be replaced by a IDirect3DDeviceImpl */
906 IDirect3DDevice8Impl* device;
908 D3DSTATEBLOCKTYPE blockType;
910 SAVEDSTATES Changed;
911 SAVEDSTATES Set;
913 /* Light Enable */
914 BOOL lightEnable[MAX_ACTIVE_LIGHTS];
916 /* ClipPlane */
917 double clipplane[MAX_CLIPPLANES][4];
919 /* Stream Source */
920 UINT stream_stride[MAX_STREAMS];
921 IDirect3DVertexBuffer8 *stream_source[MAX_STREAMS];
923 /* Indices */
924 IDirect3DIndexBuffer8* pIndexData;
925 UINT baseVertexIndex;
927 /* Texture */
928 IDirect3DBaseTexture8 *textures[8];
929 int textureDimensions[8];
930 /* Texture State Stage */
931 DWORD texture_state[8][HIGHEST_TEXTURE_STATE];
933 /* Lights */
934 D3DLIGHT8 lights[MAX_ACTIVE_LIGHTS];
936 /* Material */
937 D3DMATERIAL8 material;
939 /* RenderState */
940 DWORD renderstate[HIGHEST_RENDER_STATE];
942 /* Transform */
943 D3DMATRIX transforms[HIGHEST_TRANSFORMSTATE];
945 /* ViewPort */
946 D3DVIEWPORT8 viewport;
948 /* Vertex Shader */
949 DWORD VertexShader;
951 /* Vertex Shader Declaration */
952 IDirect3DVertexShaderDeclarationImpl* vertexShaderDecl;
954 /* Pixel Shader */
955 DWORD PixelShader;
956 /* TODO: Pixel Shader Constant */
958 /* Indexed Vertex Blending */
959 D3DVERTEXBLENDFLAGS vertex_blend;
960 FLOAT tween_factor;
962 /* Vertex Shader Constant */
963 D3DSHADERVECTOR vertexShaderConstant[D3D8_VSHADER_MAX_CONSTANTS];
966 /* exported Interfaces */
967 /* internal Interfaces */
968 /* temporary internal Interfaces */
969 extern HRESULT WINAPI IDirect3DDeviceImpl_InitStartupStateBlock(IDirect3DDevice8Impl* This);
970 extern HRESULT WINAPI IDirect3DDeviceImpl_CreateStateBlock(IDirect3DDevice8Impl* This, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlockImpl** ppStateBlock);
971 extern HRESULT WINAPI IDirect3DDeviceImpl_DeleteStateBlock(IDirect3DDevice8Impl* This, IDirect3DStateBlockImpl* pSB);
972 extern HRESULT WINAPI IDirect3DDeviceImpl_BeginStateBlock(IDirect3DDevice8Impl* This);
973 extern HRESULT WINAPI IDirect3DDeviceImpl_EndStateBlock(IDirect3DDevice8Impl* This, IDirect3DStateBlockImpl** ppStateBlock);
974 extern HRESULT WINAPI IDirect3DDeviceImpl_ApplyStateBlock(IDirect3DDevice8Impl* iface, IDirect3DStateBlockImpl* pSB);
975 extern HRESULT WINAPI IDirect3DDeviceImpl_CaptureStateBlock(IDirect3DDevice8Impl* This, IDirect3DStateBlockImpl* pSB);
977 /* ------------------------------------ */
978 /* IDirect3DVertexShaderDeclarationImpl */
979 /* ------------------------------------ */
981 /*****************************************************************************
982 * Predeclare the interface implementation structures
984 /*extern ICOM_VTABLE(IDirect3DVertexShaderDeclaration9) Direct3DVertexShaderDeclaration9_Vtbl;*/
986 /*****************************************************************************
987 * IDirect3DVertexShaderDeclaration implementation structure
989 struct IDirect3DVertexShaderDeclarationImpl {
990 /* IUnknown fields */
991 /*ICOM_VFIELD(IDirect3DVertexShaderDeclaration9);*/
992 DWORD ref;
994 /* The device, to be replaced by a IDirect3DDeviceImpl */
995 IDirect3DDevice8Impl* device;
997 /** precomputed fvf if simple declaration */
998 DWORD fvf;
999 /** dx8 compatible Declaration fields */
1000 DWORD* pDeclaration8;
1001 DWORD declaration8Length;
1004 /* exported Interfaces */
1005 extern HRESULT WINAPI IDirect3DVertexShaderDeclarationImpl_GetDeclaration8(IDirect3DVertexShaderDeclarationImpl* This, DWORD* pData, UINT* pSizeOfData);
1006 /*extern HRESULT IDirect3DVertexShaderDeclarationImpl_GetDeclaration9(IDirect3DVertexShaderDeclarationImpl* This, D3DVERTEXELEMENT9* pData, UINT* pNumElements);*/
1007 /* internal Interfaces */
1008 /* temporary internal Interfaces */
1009 extern HRESULT WINAPI IDirect3DDeviceImpl_CreateVertexShaderDeclaration8(IDirect3DDevice8Impl* This, CONST DWORD* pDeclaration8, IDirect3DVertexShaderDeclarationImpl** ppVertexShaderDecl);
1012 /* ------------------------- */
1013 /* IDirect3DVertexShaderImpl */
1014 /* ------------------------- */
1016 /*****************************************************************************
1017 * Predeclare the interface implementation structures
1019 /*extern ICOM_VTABLE(IDirect3DVertexShader9) Direct3DVertexShader9_Vtbl;*/
1021 /*****************************************************************************
1022 * IDirect3DVertexShader implementation structure
1024 struct IDirect3DVertexShaderImpl {
1025 /*ICOM_VFIELD(IDirect3DVertexShader9);*/
1026 DWORD ref;
1028 /* The device, to be replaced by a IDirect3DDeviceImpl */
1029 IDirect3DDevice8Impl* device;
1031 DWORD* function;
1032 UINT functionLength;
1033 DWORD usage; /* 0 || D3DUSAGE_SOFTWAREPROCESSING */
1034 DWORD version;
1035 /* run time datas */
1036 SHADERDATA8* data;
1037 VSHADERINPUTDATA8 input;
1038 VSHADEROUTPUTDATA8 output;
1041 /* exported Interfaces */
1042 extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetFunction(IDirect3DVertexShaderImpl* This, VOID* pData, UINT* pSizeOfData);
1043 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);*/
1044 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST INT* pConstantData, UINT Vector4iCount);*/
1045 extern HRESULT WINAPI IDirect3DVertexShaderImpl_SetConstantF(IDirect3DVertexShaderImpl* This, UINT StartRegister, CONST FLOAT* pConstantData, UINT Vector4fCount);
1046 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantB(IDirect3DVertexShaderImpl* This, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);*/
1047 /*extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantI(IDirect3DVertexShaderImpl* This, UINT StartRegister, INT* pConstantData, UINT Vector4iCount);*/
1048 extern HRESULT WINAPI IDirect3DVertexShaderImpl_GetConstantF(IDirect3DVertexShaderImpl* This, UINT StartRegister, FLOAT* pConstantData, UINT Vector4fCount);
1049 /* internal Interfaces */
1050 extern DWORD WINAPI IDirect3DVertexShaderImpl_GetVersion(IDirect3DVertexShaderImpl* This);
1051 extern HRESULT WINAPI IDirect3DVertexShaderImpl_ExecuteSW(IDirect3DVertexShaderImpl* This, VSHADERINPUTDATA8* input, VSHADEROUTPUTDATA8* output);
1052 /* temporary internal Interfaces */
1053 extern HRESULT WINAPI IDirect3DDeviceImpl_CreateVertexShader(IDirect3DDevice8Impl* This, CONST DWORD* pFunction, DWORD Usage, IDirect3DVertexShaderImpl** ppVertexShader);
1054 extern HRESULT WINAPI IDirect3DDeviceImpl_FillVertexShaderInput(IDirect3DDevice8Impl* This, IDirect3DVertexShaderImpl* vshader, const void* vertexFirstStream, DWORD StartVertexIndex, DWORD idxDecal);
1056 /* ------------------------ */
1057 /* IDirect3DPixelShaderImpl */
1058 /* ------------------------ */
1060 /*****************************************************************************
1061 * Predeclare the interface implementation structures
1063 /*extern ICOM_VTABLE(IDirect3DPixelShader9) Direct3DPixelShader9_Vtbl;*/
1065 /*****************************************************************************
1066 * IDirect3DPixelShader implementation structure
1068 struct IDirect3DPixelShaderImpl {
1069 /*ICOM_VFIELD(IDirect3DPixelShader9);*/
1070 DWORD ref;
1072 /* The device, to be replaced by a IDirect3DDeviceImpl */
1073 IDirect3DDevice8Impl* device;
1075 /* TODO: Pixel Shader */
1076 CONST DWORD* function;
1077 UINT functionLength;
1078 DWORD version;
1079 /* run time datas */
1080 SHADERDATA8* data;
1083 /* exported Interfaces */
1084 extern HRESULT WINAPI IDirect3DPixelShaderImpl_GetFunction(IDirect3DPixelShaderImpl* This, VOID* pData, UINT* pSizeOfData);
1085 /* internal Interfaces */
1086 extern DWORD WINAPI IDirect3DPixelShaderImpl_GetVersion(IDirect3DPixelShaderImpl* This);
1090 * Internals functions
1092 * to see how not defined it here
1094 void setupTextureStates(LPDIRECT3DDEVICE8 iface, DWORD Stage);
1096 #endif /* __WINE_D3DX8_PRIVATE_H */