1 | /*
|
---|
2 | * Direct3D 9 private include file
|
---|
3 | *
|
---|
4 | * Copyright 2002-2003 Jason Edmeades
|
---|
5 | * Copyright 2002-2003 Raphael Junqueira
|
---|
6 | * Copyright 2005 Oliver Stieber
|
---|
7 | *
|
---|
8 | * This library is free software; you can redistribute it and/or
|
---|
9 | * modify it under the terms of the GNU Lesser General Public
|
---|
10 | * License as published by the Free Software Foundation; either
|
---|
11 | * version 2.1 of the License, or (at your option) any later version.
|
---|
12 | *
|
---|
13 | * This library is distributed in the hope that it will be useful,
|
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
16 | * Lesser General Public License for more details.
|
---|
17 | *
|
---|
18 | * You should have received a copy of the GNU Lesser General Public
|
---|
19 | * License along with this library; if not, write to the Free Software
|
---|
20 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
21 | */
|
---|
22 |
|
---|
23 | /*
|
---|
24 | * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
25 | * other than GPL or LGPL is available it will apply instead, Sun elects to use only
|
---|
26 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
27 | * a choice of LGPL license versions is made available with the language indicating
|
---|
28 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
29 | * of the LGPL is applied is otherwise unspecified.
|
---|
30 | */
|
---|
31 |
|
---|
32 | #ifndef __WINE_D3D9_PRIVATE_H
|
---|
33 | #define __WINE_D3D9_PRIVATE_H
|
---|
34 |
|
---|
35 | #include <stdarg.h>
|
---|
36 |
|
---|
37 | #define NONAMELESSUNION
|
---|
38 | #define NONAMELESSSTRUCT
|
---|
39 | #define COBJMACROS
|
---|
40 | #include "windef.h"
|
---|
41 | #include "winbase.h"
|
---|
42 | #include "wingdi.h"
|
---|
43 | #include "winuser.h"
|
---|
44 | #include "wine/debug.h"
|
---|
45 | #include "wine/unicode.h"
|
---|
46 |
|
---|
47 | #include "d3d9.h"
|
---|
48 | #include "wine/wined3d.h"
|
---|
49 |
|
---|
50 | /* ===========================================================================
|
---|
51 | Internal use
|
---|
52 | =========================================================================== */
|
---|
53 | extern HRESULT vdecl_convert_fvf(
|
---|
54 | DWORD FVF,
|
---|
55 | D3DVERTEXELEMENT9** ppVertexElements);
|
---|
56 | extern CRITICAL_SECTION d3d9_cs;
|
---|
57 | D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
|
---|
58 | WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
|
---|
59 |
|
---|
60 | /* ===========================================================================
|
---|
61 | Macros
|
---|
62 | =========================================================================== */
|
---|
63 | /* Not nice, but it lets wined3d support different versions of directx */
|
---|
64 | #define WINECAPSTOD3D9CAPS(_pD3D9Caps, _pWineCaps) \
|
---|
65 | _pD3D9Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
|
---|
66 | _pD3D9Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
|
---|
67 | _pD3D9Caps->Caps = _pWineCaps->Caps; \
|
---|
68 | _pD3D9Caps->Caps2 = _pWineCaps->Caps2; \
|
---|
69 | _pD3D9Caps->Caps3 = _pWineCaps->Caps3; \
|
---|
70 | _pD3D9Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
|
---|
71 | _pD3D9Caps->CursorCaps = _pWineCaps->CursorCaps; \
|
---|
72 | _pD3D9Caps->DevCaps = _pWineCaps->DevCaps; \
|
---|
73 | _pD3D9Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
|
---|
74 | _pD3D9Caps->RasterCaps = _pWineCaps->RasterCaps; \
|
---|
75 | _pD3D9Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
|
---|
76 | _pD3D9Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
|
---|
77 | _pD3D9Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
|
---|
78 | _pD3D9Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
|
---|
79 | _pD3D9Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
|
---|
80 | _pD3D9Caps->TextureCaps = _pWineCaps->TextureCaps; \
|
---|
81 | _pD3D9Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
|
---|
82 | _pD3D9Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
|
---|
83 | _pD3D9Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
|
---|
84 | _pD3D9Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
|
---|
85 | _pD3D9Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
|
---|
86 | _pD3D9Caps->LineCaps = _pWineCaps->LineCaps; \
|
---|
87 | _pD3D9Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
|
---|
88 | _pD3D9Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
|
---|
89 | _pD3D9Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
|
---|
90 | _pD3D9Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
|
---|
91 | _pD3D9Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
|
---|
92 | _pD3D9Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
|
---|
93 | _pD3D9Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
|
---|
94 | _pD3D9Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
|
---|
95 | _pD3D9Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
|
---|
96 | _pD3D9Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
|
---|
97 | _pD3D9Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
|
---|
98 | _pD3D9Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
|
---|
99 | _pD3D9Caps->StencilCaps = _pWineCaps->StencilCaps; \
|
---|
100 | _pD3D9Caps->FVFCaps = _pWineCaps->FVFCaps; \
|
---|
101 | _pD3D9Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
|
---|
102 | _pD3D9Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
|
---|
103 | _pD3D9Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
|
---|
104 | _pD3D9Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
|
---|
105 | _pD3D9Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
|
---|
106 | _pD3D9Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
|
---|
107 | _pD3D9Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
|
---|
108 | _pD3D9Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
|
---|
109 | _pD3D9Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
|
---|
110 | _pD3D9Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
|
---|
111 | _pD3D9Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
|
---|
112 | _pD3D9Caps->MaxStreams = _pWineCaps->MaxStreams; \
|
---|
113 | _pD3D9Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
|
---|
114 | _pD3D9Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
|
---|
115 | _pD3D9Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
|
---|
116 | _pD3D9Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
|
---|
117 | _pD3D9Caps->PixelShader1xMaxValue = _pWineCaps->PixelShader1xMaxValue; \
|
---|
118 | _pD3D9Caps->DevCaps2 = _pWineCaps->DevCaps2; \
|
---|
119 | _pD3D9Caps->MaxNpatchTessellationLevel = _pWineCaps->MaxNpatchTessellationLevel; \
|
---|
120 | _pD3D9Caps->MasterAdapterOrdinal = _pWineCaps->MasterAdapterOrdinal; \
|
---|
121 | _pD3D9Caps->AdapterOrdinalInGroup = _pWineCaps->AdapterOrdinalInGroup; \
|
---|
122 | _pD3D9Caps->NumberOfAdaptersInGroup = _pWineCaps->NumberOfAdaptersInGroup; \
|
---|
123 | _pD3D9Caps->DeclTypes = _pWineCaps->DeclTypes; \
|
---|
124 | _pD3D9Caps->NumSimultaneousRTs = _pWineCaps->NumSimultaneousRTs; \
|
---|
125 | _pD3D9Caps->StretchRectFilterCaps = _pWineCaps->StretchRectFilterCaps; \
|
---|
126 | _pD3D9Caps->VS20Caps.Caps = _pWineCaps->VS20Caps.Caps; \
|
---|
127 | _pD3D9Caps->VS20Caps.DynamicFlowControlDepth = _pWineCaps->VS20Caps.DynamicFlowControlDepth; \
|
---|
128 | _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
|
---|
129 | _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
|
---|
130 | _pD3D9Caps->VS20Caps.StaticFlowControlDepth = _pWineCaps->VS20Caps.StaticFlowControlDepth; \
|
---|
131 | _pD3D9Caps->PS20Caps.Caps = _pWineCaps->PS20Caps.Caps; \
|
---|
132 | _pD3D9Caps->PS20Caps.DynamicFlowControlDepth = _pWineCaps->PS20Caps.DynamicFlowControlDepth; \
|
---|
133 | _pD3D9Caps->PS20Caps.NumTemps = _pWineCaps->PS20Caps.NumTemps; \
|
---|
134 | _pD3D9Caps->PS20Caps.StaticFlowControlDepth = _pWineCaps->PS20Caps.StaticFlowControlDepth; \
|
---|
135 | _pD3D9Caps->PS20Caps.NumInstructionSlots = _pWineCaps->PS20Caps.NumInstructionSlots; \
|
---|
136 | _pD3D9Caps->VertexTextureFilterCaps = _pWineCaps->VertexTextureFilterCaps; \
|
---|
137 | _pD3D9Caps->MaxVShaderInstructionsExecuted = _pWineCaps->MaxVShaderInstructionsExecuted; \
|
---|
138 | _pD3D9Caps->MaxPShaderInstructionsExecuted = _pWineCaps->MaxPShaderInstructionsExecuted; \
|
---|
139 | _pD3D9Caps->MaxVertexShader30InstructionSlots = _pWineCaps->MaxVertexShader30InstructionSlots; \
|
---|
140 | _pD3D9Caps->MaxPixelShader30InstructionSlots = _pWineCaps->MaxPixelShader30InstructionSlots;
|
---|
141 |
|
---|
142 | /* ===========================================================================
|
---|
143 | D3D9 interfaces
|
---|
144 | =========================================================================== */
|
---|
145 |
|
---|
146 | /* ---------- */
|
---|
147 | /* IDirect3D9 */
|
---|
148 | /* ---------- */
|
---|
149 |
|
---|
150 | /*****************************************************************************
|
---|
151 | * Predeclare the interface implementation structures
|
---|
152 | */
|
---|
153 | extern const IDirect3D9ExVtbl Direct3D9_Vtbl;
|
---|
154 |
|
---|
155 | /*****************************************************************************
|
---|
156 | * IDirect3D implementation structure
|
---|
157 | */
|
---|
158 | typedef struct IDirect3D9Impl
|
---|
159 | {
|
---|
160 | /* IUnknown fields */
|
---|
161 | const IDirect3D9ExVtbl *lpVtbl;
|
---|
162 | LONG ref;
|
---|
163 |
|
---|
164 | /* The WineD3D device */
|
---|
165 | IWineD3D *WineD3D;
|
---|
166 |
|
---|
167 | /* Created via Direct3DCreate9Ex? Can QI extended interfaces */
|
---|
168 | BOOL extended;
|
---|
169 | } IDirect3D9Impl;
|
---|
170 |
|
---|
171 | void filter_caps(D3DCAPS9* pCaps);
|
---|
172 |
|
---|
173 | /* ---------------- */
|
---|
174 | /* IDirect3DDevice9 */
|
---|
175 | /* ---------------- */
|
---|
176 |
|
---|
177 | /*****************************************************************************
|
---|
178 | * Predeclare the interface implementation structures
|
---|
179 | */
|
---|
180 | extern const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl;
|
---|
181 | extern const IWineD3DDeviceParentVtbl d3d9_wined3d_device_parent_vtbl;
|
---|
182 |
|
---|
183 | /*****************************************************************************
|
---|
184 | * IDirect3DDevice9 implementation structure
|
---|
185 | */
|
---|
186 | typedef struct IDirect3DDevice9Impl
|
---|
187 | {
|
---|
188 | /* IUnknown fields */
|
---|
189 | const IDirect3DDevice9ExVtbl *lpVtbl;
|
---|
190 | const IWineD3DDeviceParentVtbl *device_parent_vtbl;
|
---|
191 | LONG ref;
|
---|
192 |
|
---|
193 | /* IDirect3DDevice9 fields */
|
---|
194 | IWineD3DDevice *WineD3DDevice;
|
---|
195 |
|
---|
196 | /* Avoids recursion with nested ReleaseRef to 0 */
|
---|
197 | BOOL inDestruction;
|
---|
198 |
|
---|
199 | IDirect3DVertexDeclaration9 **convertedDecls;
|
---|
200 | unsigned int numConvertedDecls, declArraySize;
|
---|
201 |
|
---|
202 | BOOL notreset;
|
---|
203 | } IDirect3DDevice9Impl;
|
---|
204 |
|
---|
205 |
|
---|
206 | /* IDirect3DDevice9: */
|
---|
207 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain);
|
---|
208 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, IDirect3DSwapChain9** pSwapChain);
|
---|
209 | extern UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(LPDIRECT3DDEVICE9EX iface);
|
---|
210 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle);
|
---|
211 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle);
|
---|
212 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9EX iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle);
|
---|
213 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9EX iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle);
|
---|
214 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9EX iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle);
|
---|
215 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9EX iface, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB);
|
---|
216 | extern HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9EX iface);
|
---|
217 | extern HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9EX iface, IDirect3DStateBlock9** ppSB);
|
---|
218 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9EX iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl);
|
---|
219 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexDeclaration9* pDecl);
|
---|
220 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexDeclaration9** ppDecl);
|
---|
221 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9EX iface, CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader);
|
---|
222 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexShader9* pShader);
|
---|
223 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexShader9** ppShader);
|
---|
224 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
|
---|
225 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount);
|
---|
226 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
|
---|
227 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount);
|
---|
228 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
|
---|
229 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
|
---|
230 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(LPDIRECT3DDEVICE9EX iface, CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader);
|
---|
231 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(LPDIRECT3DDEVICE9EX iface, IDirect3DPixelShader9* pShader);
|
---|
232 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(LPDIRECT3DDEVICE9EX iface, IDirect3DPixelShader9** ppShader);
|
---|
233 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
|
---|
234 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount);
|
---|
235 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
|
---|
236 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount);
|
---|
237 | extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
|
---|
238 | extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
|
---|
239 | extern HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9EX iface, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
|
---|
240 |
|
---|
241 |
|
---|
242 | /* ---------------- */
|
---|
243 | /* IDirect3DVolume9 */
|
---|
244 | /* ---------------- */
|
---|
245 |
|
---|
246 | /*****************************************************************************
|
---|
247 | * IDirect3DVolume9 implementation structure
|
---|
248 | */
|
---|
249 | extern const IDirect3DVolume9Vtbl Direct3DVolume9_Vtbl;
|
---|
250 | typedef struct IDirect3DVolume9Impl
|
---|
251 | {
|
---|
252 | /* IUnknown fields */
|
---|
253 | const IDirect3DVolume9Vtbl *lpVtbl;
|
---|
254 | LONG ref;
|
---|
255 |
|
---|
256 | /* IDirect3DVolume9 fields */
|
---|
257 | IWineD3DVolume *wineD3DVolume;
|
---|
258 |
|
---|
259 | /* The volume container */
|
---|
260 | IUnknown *container;
|
---|
261 |
|
---|
262 | /* If set forward refcounting to this object */
|
---|
263 | IUnknown *forwardReference;
|
---|
264 | } IDirect3DVolume9Impl;
|
---|
265 |
|
---|
266 | /* ------------------- */
|
---|
267 | /* IDirect3DSwapChain9 */
|
---|
268 | /* ------------------- */
|
---|
269 |
|
---|
270 | /*****************************************************************************
|
---|
271 | * IDirect3DSwapChain9 implementation structure
|
---|
272 | */
|
---|
273 | typedef struct IDirect3DSwapChain9Impl
|
---|
274 | {
|
---|
275 | /* IUnknown fields */
|
---|
276 | const IDirect3DSwapChain9Vtbl *lpVtbl;
|
---|
277 | LONG ref;
|
---|
278 |
|
---|
279 | /* IDirect3DSwapChain9 fields */
|
---|
280 | IWineD3DSwapChain *wineD3DSwapChain;
|
---|
281 |
|
---|
282 | /* Parent reference */
|
---|
283 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
284 |
|
---|
285 | /* Flags an implicit swap chain */
|
---|
286 | BOOL isImplicit;
|
---|
287 | } IDirect3DSwapChain9Impl;
|
---|
288 |
|
---|
289 | /* ----------------- */
|
---|
290 | /* IDirect3DSurface9 */
|
---|
291 | /* ----------------- */
|
---|
292 |
|
---|
293 | /*****************************************************************************
|
---|
294 | * Predeclare the interface implementation structures
|
---|
295 | */
|
---|
296 | extern const IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl;
|
---|
297 |
|
---|
298 | /*****************************************************************************
|
---|
299 | * IDirect3DSurface9 implementation structure
|
---|
300 | */
|
---|
301 | typedef struct IDirect3DSurface9Impl
|
---|
302 | {
|
---|
303 | /* IUnknown fields */
|
---|
304 | const IDirect3DSurface9Vtbl *lpVtbl;
|
---|
305 | LONG ref;
|
---|
306 |
|
---|
307 | /* IDirect3DResource9 fields */
|
---|
308 | IWineD3DSurface *wineD3DSurface;
|
---|
309 |
|
---|
310 | /* Parent reference */
|
---|
311 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
312 |
|
---|
313 | /* The surface container */
|
---|
314 | IUnknown *container;
|
---|
315 |
|
---|
316 | /* If set forward refcounting to this object */
|
---|
317 | IUnknown *forwardReference;
|
---|
318 |
|
---|
319 | /* Flags an implicit surface */
|
---|
320 | BOOL isImplicit;
|
---|
321 | } IDirect3DSurface9Impl;
|
---|
322 |
|
---|
323 | /* ---------------------- */
|
---|
324 | /* IDirect3DVertexBuffer9 */
|
---|
325 | /* ---------------------- */
|
---|
326 |
|
---|
327 | /*****************************************************************************
|
---|
328 | * IDirect3DVertexBuffer9 implementation structure
|
---|
329 | */
|
---|
330 | typedef struct IDirect3DVertexBuffer9Impl
|
---|
331 | {
|
---|
332 | /* IUnknown fields */
|
---|
333 | const IDirect3DVertexBuffer9Vtbl *lpVtbl;
|
---|
334 | LONG ref;
|
---|
335 |
|
---|
336 | /* IDirect3DResource9 fields */
|
---|
337 | IWineD3DBuffer *wineD3DVertexBuffer;
|
---|
338 |
|
---|
339 | /* Parent reference */
|
---|
340 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
341 |
|
---|
342 | DWORD fvf;
|
---|
343 | } IDirect3DVertexBuffer9Impl;
|
---|
344 |
|
---|
345 | /* --------------------- */
|
---|
346 | /* IDirect3DIndexBuffer9 */
|
---|
347 | /* --------------------- */
|
---|
348 |
|
---|
349 | /*****************************************************************************
|
---|
350 | * IDirect3DIndexBuffer9 implementation structure
|
---|
351 | */
|
---|
352 | typedef struct IDirect3DIndexBuffer9Impl
|
---|
353 | {
|
---|
354 | /* IUnknown fields */
|
---|
355 | const IDirect3DIndexBuffer9Vtbl *lpVtbl;
|
---|
356 | LONG ref;
|
---|
357 |
|
---|
358 | /* IDirect3DResource9 fields */
|
---|
359 | IWineD3DBuffer *wineD3DIndexBuffer;
|
---|
360 |
|
---|
361 | /* Parent reference */
|
---|
362 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
363 | WINED3DFORMAT format;
|
---|
364 | } IDirect3DIndexBuffer9Impl;
|
---|
365 |
|
---|
366 | /* --------------------- */
|
---|
367 | /* IDirect3DBaseTexture9 */
|
---|
368 | /* --------------------- */
|
---|
369 |
|
---|
370 | /*****************************************************************************
|
---|
371 | * IDirect3DBaseTexture9 implementation structure
|
---|
372 | */
|
---|
373 | typedef struct IDirect3DBaseTexture9Impl
|
---|
374 | {
|
---|
375 | /* IUnknown fields */
|
---|
376 | const IDirect3DBaseTexture9Vtbl *lpVtbl;
|
---|
377 | LONG ref;
|
---|
378 |
|
---|
379 | /* IDirect3DResource9 fields */
|
---|
380 | IWineD3DBaseTexture *wineD3DBaseTexture;
|
---|
381 |
|
---|
382 | } IDirect3DBaseTexture9Impl;
|
---|
383 |
|
---|
384 | /* --------------------- */
|
---|
385 | /* IDirect3DCubeTexture9 */
|
---|
386 | /* --------------------- */
|
---|
387 |
|
---|
388 | /*****************************************************************************
|
---|
389 | * IDirect3DCubeTexture9 implementation structure
|
---|
390 | */
|
---|
391 | typedef struct IDirect3DCubeTexture9Impl
|
---|
392 | {
|
---|
393 | /* IUnknown fields */
|
---|
394 | const IDirect3DCubeTexture9Vtbl *lpVtbl;
|
---|
395 | LONG ref;
|
---|
396 |
|
---|
397 | /* IDirect3DResource9 fields */
|
---|
398 | IWineD3DCubeTexture *wineD3DCubeTexture;
|
---|
399 |
|
---|
400 | /* Parent reference */
|
---|
401 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
402 | } IDirect3DCubeTexture9Impl;
|
---|
403 |
|
---|
404 |
|
---|
405 | /* ----------------- */
|
---|
406 | /* IDirect3DTexture9 */
|
---|
407 | /* ----------------- */
|
---|
408 |
|
---|
409 | /*****************************************************************************
|
---|
410 | * IDirect3DTexture9 implementation structure
|
---|
411 | */
|
---|
412 | typedef struct IDirect3DTexture9Impl
|
---|
413 | {
|
---|
414 | /* IUnknown fields */
|
---|
415 | const IDirect3DTexture9Vtbl *lpVtbl;
|
---|
416 | LONG ref;
|
---|
417 |
|
---|
418 | /* IDirect3DResource9 fields */
|
---|
419 | IWineD3DTexture *wineD3DTexture;
|
---|
420 |
|
---|
421 | /* Parent reference */
|
---|
422 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
423 | } IDirect3DTexture9Impl;
|
---|
424 |
|
---|
425 | /* ----------------------- */
|
---|
426 | /* IDirect3DVolumeTexture9 */
|
---|
427 | /* ----------------------- */
|
---|
428 |
|
---|
429 | /*****************************************************************************
|
---|
430 | * IDirect3DVolumeTexture9 implementation structure
|
---|
431 | */
|
---|
432 | typedef struct IDirect3DVolumeTexture9Impl
|
---|
433 | {
|
---|
434 | /* IUnknown fields */
|
---|
435 | const IDirect3DVolumeTexture9Vtbl *lpVtbl;
|
---|
436 | LONG ref;
|
---|
437 |
|
---|
438 | /* IDirect3DResource9 fields */
|
---|
439 | IWineD3DVolumeTexture *wineD3DVolumeTexture;
|
---|
440 |
|
---|
441 | /* Parent reference */
|
---|
442 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
443 | } IDirect3DVolumeTexture9Impl;
|
---|
444 |
|
---|
445 | /* ----------------------- */
|
---|
446 | /* IDirect3DStateBlock9 */
|
---|
447 | /* ----------------------- */
|
---|
448 |
|
---|
449 | /*****************************************************************************
|
---|
450 | * IDirect3DStateBlock9 implementation structure
|
---|
451 | */
|
---|
452 | typedef struct IDirect3DStateBlock9Impl {
|
---|
453 | /* IUnknown fields */
|
---|
454 | const IDirect3DStateBlock9Vtbl *lpVtbl;
|
---|
455 | LONG ref;
|
---|
456 |
|
---|
457 | /* IDirect3DStateBlock9 fields */
|
---|
458 | IWineD3DStateBlock *wineD3DStateBlock;
|
---|
459 |
|
---|
460 | /* Parent reference */
|
---|
461 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
462 | } IDirect3DStateBlock9Impl;
|
---|
463 |
|
---|
464 |
|
---|
465 | /* --------------------------- */
|
---|
466 | /* IDirect3DVertexDeclaration9 */
|
---|
467 | /* --------------------------- */
|
---|
468 |
|
---|
469 | /*****************************************************************************
|
---|
470 | * IDirect3DVertexDeclaration implementation structure
|
---|
471 | */
|
---|
472 | typedef struct IDirect3DVertexDeclaration9Impl {
|
---|
473 | /* IUnknown fields */
|
---|
474 | const IDirect3DVertexDeclaration9Vtbl *lpVtbl;
|
---|
475 | LONG ref;
|
---|
476 |
|
---|
477 | D3DVERTEXELEMENT9 *elements;
|
---|
478 | UINT element_count;
|
---|
479 |
|
---|
480 | /* IDirect3DVertexDeclaration9 fields */
|
---|
481 | IWineD3DVertexDeclaration *wineD3DVertexDeclaration;
|
---|
482 | DWORD convFVF;
|
---|
483 |
|
---|
484 | /* Parent reference */
|
---|
485 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
486 | } IDirect3DVertexDeclaration9Impl;
|
---|
487 |
|
---|
488 | void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface);
|
---|
489 |
|
---|
490 | /* ---------------------- */
|
---|
491 | /* IDirect3DVertexShader9 */
|
---|
492 | /* ---------------------- */
|
---|
493 |
|
---|
494 | /*****************************************************************************
|
---|
495 | * IDirect3DVertexShader implementation structure
|
---|
496 | */
|
---|
497 | typedef struct IDirect3DVertexShader9Impl {
|
---|
498 | /* IUnknown fields */
|
---|
499 | const IDirect3DVertexShader9Vtbl *lpVtbl;
|
---|
500 | LONG ref;
|
---|
501 |
|
---|
502 | /* IDirect3DVertexShader9 fields */
|
---|
503 | IWineD3DVertexShader *wineD3DVertexShader;
|
---|
504 |
|
---|
505 | /* Parent reference */
|
---|
506 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
507 | } IDirect3DVertexShader9Impl;
|
---|
508 |
|
---|
509 | #define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256
|
---|
510 |
|
---|
511 | /* --------------------- */
|
---|
512 | /* IDirect3DPixelShader9 */
|
---|
513 | /* --------------------- */
|
---|
514 |
|
---|
515 | /*****************************************************************************
|
---|
516 | * IDirect3DPixelShader implementation structure
|
---|
517 | */
|
---|
518 | typedef struct IDirect3DPixelShader9Impl {
|
---|
519 | /* IUnknown fields */
|
---|
520 | const IDirect3DPixelShader9Vtbl *lpVtbl;
|
---|
521 | LONG ref;
|
---|
522 |
|
---|
523 | /* IDirect3DPixelShader9 fields */
|
---|
524 | IWineD3DPixelShader *wineD3DPixelShader;
|
---|
525 |
|
---|
526 | /* Parent reference */
|
---|
527 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
528 | } IDirect3DPixelShader9Impl;
|
---|
529 |
|
---|
530 | /* --------------- */
|
---|
531 | /* IDirect3DQuery9 */
|
---|
532 | /* --------------- */
|
---|
533 |
|
---|
534 | /*****************************************************************************
|
---|
535 | * IDirect3DPixelShader implementation structure
|
---|
536 | */
|
---|
537 | typedef struct IDirect3DQuery9Impl {
|
---|
538 | /* IUnknown fields */
|
---|
539 | const IDirect3DQuery9Vtbl *lpVtbl;
|
---|
540 | LONG ref;
|
---|
541 |
|
---|
542 | /* IDirect3DQuery9 fields */
|
---|
543 | IWineD3DQuery *wineD3DQuery;
|
---|
544 |
|
---|
545 | /* Parent reference */
|
---|
546 | LPDIRECT3DDEVICE9EX parentDevice;
|
---|
547 | } IDirect3DQuery9Impl;
|
---|
548 |
|
---|
549 |
|
---|
550 | /* Callbacks */
|
---|
551 | extern ULONG WINAPI D3D9CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
|
---|
552 | extern ULONG WINAPI D3D9CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
|
---|
553 | extern ULONG WINAPI D3D9CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
|
---|
554 | extern ULONG WINAPI D3D9CB_DestroySurface(IWineD3DSurface *pSurface);
|
---|
555 | extern ULONG WINAPI D3D9CB_DestroyVolume(IWineD3DVolume *pVolume);
|
---|
556 |
|
---|
557 | #endif /* __WINE_D3D9_PRIVATE_H */
|
---|