VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d9/d3d9_private.h@ 16684

Last change on this file since 16684 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 26.1 KB
Line 
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 =========================================================================== */
53extern HRESULT vdecl_convert_fvf(
54 DWORD FVF,
55 D3DVERTEXELEMENT9** ppVertexElements);
56extern CRITICAL_SECTION d3d9_cs;
57
58/* ===========================================================================
59 Macros
60 =========================================================================== */
61/* Not nice, but it lets wined3d support different versions of directx */
62#define WINECAPSTOD3D9CAPS(_pD3D9Caps, _pWineCaps) \
63 _pD3D9Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
64 _pD3D9Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
65 _pD3D9Caps->Caps = _pWineCaps->Caps; \
66 _pD3D9Caps->Caps2 = _pWineCaps->Caps2; \
67 _pD3D9Caps->Caps3 = _pWineCaps->Caps3; \
68 _pD3D9Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
69 _pD3D9Caps->CursorCaps = _pWineCaps->CursorCaps; \
70 _pD3D9Caps->DevCaps = _pWineCaps->DevCaps; \
71 _pD3D9Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
72 _pD3D9Caps->RasterCaps = _pWineCaps->RasterCaps; \
73 _pD3D9Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
74 _pD3D9Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
75 _pD3D9Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
76 _pD3D9Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
77 _pD3D9Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
78 _pD3D9Caps->TextureCaps = _pWineCaps->TextureCaps; \
79 _pD3D9Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
80 _pD3D9Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
81 _pD3D9Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
82 _pD3D9Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
83 _pD3D9Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
84 _pD3D9Caps->LineCaps = _pWineCaps->LineCaps; \
85 _pD3D9Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
86 _pD3D9Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
87 _pD3D9Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
88 _pD3D9Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
89 _pD3D9Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
90 _pD3D9Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
91 _pD3D9Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
92 _pD3D9Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
93 _pD3D9Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
94 _pD3D9Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
95 _pD3D9Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
96 _pD3D9Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
97 _pD3D9Caps->StencilCaps = _pWineCaps->StencilCaps; \
98 _pD3D9Caps->FVFCaps = _pWineCaps->FVFCaps; \
99 _pD3D9Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
100 _pD3D9Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
101 _pD3D9Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
102 _pD3D9Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
103 _pD3D9Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
104 _pD3D9Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
105 _pD3D9Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
106 _pD3D9Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
107 _pD3D9Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
108 _pD3D9Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
109 _pD3D9Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
110 _pD3D9Caps->MaxStreams = _pWineCaps->MaxStreams; \
111 _pD3D9Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
112 _pD3D9Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
113 _pD3D9Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
114 _pD3D9Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
115 _pD3D9Caps->PixelShader1xMaxValue = _pWineCaps->PixelShader1xMaxValue; \
116 _pD3D9Caps->DevCaps2 = _pWineCaps->DevCaps2; \
117 _pD3D9Caps->MaxNpatchTessellationLevel = _pWineCaps->MaxNpatchTessellationLevel; \
118 _pD3D9Caps->MasterAdapterOrdinal = _pWineCaps->MasterAdapterOrdinal; \
119 _pD3D9Caps->AdapterOrdinalInGroup = _pWineCaps->AdapterOrdinalInGroup; \
120 _pD3D9Caps->NumberOfAdaptersInGroup = _pWineCaps->NumberOfAdaptersInGroup; \
121 _pD3D9Caps->DeclTypes = _pWineCaps->DeclTypes; \
122 _pD3D9Caps->NumSimultaneousRTs = _pWineCaps->NumSimultaneousRTs; \
123 _pD3D9Caps->StretchRectFilterCaps = _pWineCaps->StretchRectFilterCaps; \
124 _pD3D9Caps->VS20Caps.Caps = _pWineCaps->VS20Caps.Caps; \
125 _pD3D9Caps->VS20Caps.DynamicFlowControlDepth = _pWineCaps->VS20Caps.DynamicFlowControlDepth; \
126 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
127 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
128 _pD3D9Caps->VS20Caps.StaticFlowControlDepth = _pWineCaps->VS20Caps.StaticFlowControlDepth; \
129 _pD3D9Caps->PS20Caps.Caps = _pWineCaps->PS20Caps.Caps; \
130 _pD3D9Caps->PS20Caps.DynamicFlowControlDepth = _pWineCaps->PS20Caps.DynamicFlowControlDepth; \
131 _pD3D9Caps->PS20Caps.NumTemps = _pWineCaps->PS20Caps.NumTemps; \
132 _pD3D9Caps->PS20Caps.StaticFlowControlDepth = _pWineCaps->PS20Caps.StaticFlowControlDepth; \
133 _pD3D9Caps->PS20Caps.NumInstructionSlots = _pWineCaps->PS20Caps.NumInstructionSlots; \
134 _pD3D9Caps->VertexTextureFilterCaps = _pWineCaps->VertexTextureFilterCaps; \
135 _pD3D9Caps->MaxVShaderInstructionsExecuted = _pWineCaps->MaxVShaderInstructionsExecuted; \
136 _pD3D9Caps->MaxPShaderInstructionsExecuted = _pWineCaps->MaxPShaderInstructionsExecuted; \
137 _pD3D9Caps->MaxVertexShader30InstructionSlots = _pWineCaps->MaxVertexShader30InstructionSlots; \
138 _pD3D9Caps->MaxPixelShader30InstructionSlots = _pWineCaps->MaxPixelShader30InstructionSlots;
139
140/* ===========================================================================
141 D3D9 interfaces
142 =========================================================================== */
143
144/* ---------- */
145/* IDirect3D9 */
146/* ---------- */
147
148/*****************************************************************************
149 * Predeclare the interface implementation structures
150 */
151extern const IDirect3D9ExVtbl Direct3D9_Vtbl;
152
153/*****************************************************************************
154 * IDirect3D implementation structure
155 */
156typedef struct IDirect3D9Impl
157{
158 /* IUnknown fields */
159 const IDirect3D9ExVtbl *lpVtbl;
160 LONG ref;
161
162 /* The WineD3D device */
163 IWineD3D *WineD3D;
164
165 /* Created via Direct3DCreate9Ex? Can QI extended interfaces */
166 BOOL extended;
167} IDirect3D9Impl;
168
169void filter_caps(D3DCAPS9* pCaps);
170
171/* ---------------- */
172/* IDirect3DDevice9 */
173/* ---------------- */
174
175/*****************************************************************************
176 * Predeclare the interface implementation structures
177 */
178extern const IDirect3DDevice9ExVtbl Direct3DDevice9_Vtbl;
179
180/*****************************************************************************
181 * IDirect3DDevice9 implementation structure
182 */
183typedef struct IDirect3DDevice9Impl
184{
185 /* IUnknown fields */
186 const IDirect3DDevice9ExVtbl *lpVtbl;
187 LONG ref;
188
189 /* IDirect3DDevice9 fields */
190 IWineD3DDevice *WineD3DDevice;
191
192 /* Avoids recursion with nested ReleaseRef to 0 */
193 BOOL inDestruction;
194
195 IDirect3DVertexDeclaration9 **convertedDecls;
196 unsigned int numConvertedDecls, declArraySize;
197
198 BOOL notreset;
199} IDirect3DDevice9Impl;
200
201
202/* IDirect3DDevice9: */
203extern HRESULT WINAPI IDirect3DDevice9Impl_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9EX iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** pSwapChain);
204extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(LPDIRECT3DDEVICE9EX iface, UINT iSwapChain, IDirect3DSwapChain9** pSwapChain);
205extern UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(LPDIRECT3DDEVICE9EX iface);
206extern HRESULT WINAPI IDirect3DDevice9Impl_CreateTexture(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle);
207extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVolumeTexture(LPDIRECT3DDEVICE9EX iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle);
208extern HRESULT WINAPI IDirect3DDevice9Impl_CreateCubeTexture(LPDIRECT3DDEVICE9EX iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle);
209extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexBuffer(LPDIRECT3DDEVICE9EX iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle);
210extern HRESULT WINAPI IDirect3DDevice9Impl_CreateIndexBuffer(LPDIRECT3DDEVICE9EX iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle);
211extern HRESULT WINAPI IDirect3DDevice9Impl_CreateStateBlock(LPDIRECT3DDEVICE9EX iface, D3DSTATEBLOCKTYPE Type, IDirect3DStateBlock9** ppSB);
212extern HRESULT WINAPI IDirect3DDevice9Impl_BeginStateBlock(LPDIRECT3DDEVICE9EX iface);
213extern HRESULT WINAPI IDirect3DDevice9Impl_EndStateBlock(LPDIRECT3DDEVICE9EX iface, IDirect3DStateBlock9** ppSB);
214extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexDeclaration(LPDIRECT3DDEVICE9EX iface, CONST D3DVERTEXELEMENT9* pVertexElements, IDirect3DVertexDeclaration9** ppDecl);
215extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexDeclaration9* pDecl);
216extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexDeclaration9** ppDecl);
217extern HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(LPDIRECT3DDEVICE9EX iface, CONST DWORD* pFunction, IDirect3DVertexShader9** ppShader);
218extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexShader9* pShader);
219extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(LPDIRECT3DDEVICE9EX iface, IDirect3DVertexShader9** ppShader);
220extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
221extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount);
222extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
223extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount);
224extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
225extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
226extern HRESULT WINAPI IDirect3DDevice9Impl_CreatePixelShader(LPDIRECT3DDEVICE9EX iface, CONST DWORD* pFunction, IDirect3DPixelShader9** ppShader);
227extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(LPDIRECT3DDEVICE9EX iface, IDirect3DPixelShader9* pShader);
228extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(LPDIRECT3DDEVICE9EX iface, IDirect3DPixelShader9** ppShader);
229extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST float* pConstantData, UINT Vector4fCount);
230extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, float* pConstantData, UINT Vector4fCount);
231extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount);
232extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, int* pConstantData, UINT Vector4iCount);
233extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount);
234extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(LPDIRECT3DDEVICE9EX iface, UINT StartRegister, BOOL* pConstantData, UINT BoolCount);
235extern HRESULT WINAPI IDirect3DDevice9Impl_CreateQuery(LPDIRECT3DDEVICE9EX iface, D3DQUERYTYPE Type, IDirect3DQuery9** ppQuery);
236
237
238/* ---------------- */
239/* IDirect3DVolume9 */
240/* ---------------- */
241
242/*****************************************************************************
243 * IDirect3DVolume9 implementation structure
244 */
245typedef struct IDirect3DVolume9Impl
246{
247 /* IUnknown fields */
248 const IDirect3DVolume9Vtbl *lpVtbl;
249 LONG ref;
250
251 /* IDirect3DVolume9 fields */
252 IWineD3DVolume *wineD3DVolume;
253
254 /* The volume container */
255 IUnknown *container;
256
257 /* If set forward refcounting to this object */
258 IUnknown *forwardReference;
259} IDirect3DVolume9Impl;
260
261/* ------------------- */
262/* IDirect3DSwapChain9 */
263/* ------------------- */
264
265/*****************************************************************************
266 * IDirect3DSwapChain9 implementation structure
267 */
268typedef struct IDirect3DSwapChain9Impl
269{
270 /* IUnknown fields */
271 const IDirect3DSwapChain9Vtbl *lpVtbl;
272 LONG ref;
273
274 /* IDirect3DSwapChain9 fields */
275 IWineD3DSwapChain *wineD3DSwapChain;
276
277 /* Parent reference */
278 LPDIRECT3DDEVICE9EX parentDevice;
279
280 /* Flags an implicit swap chain */
281 BOOL isImplicit;
282} IDirect3DSwapChain9Impl;
283
284/* ------------------ */
285/* IDirect3DResource9 */
286/* ------------------ */
287
288/*****************************************************************************
289 * IDirect3DResource9 implementation structure
290 */
291typedef struct IDirect3DResource9Impl
292{
293 /* IUnknown fields */
294 const IDirect3DResource9Vtbl *lpVtbl;
295 LONG ref;
296
297 /* IDirect3DResource9 fields */
298 IWineD3DResource *wineD3DResource;
299} IDirect3DResource9Impl;
300
301extern HRESULT WINAPI IDirect3DResource9Impl_GetDevice(LPDIRECT3DRESOURCE9 iface, IDirect3DDevice9** ppDevice);
302
303
304/* ----------------- */
305/* IDirect3DSurface9 */
306/* ----------------- */
307
308/*****************************************************************************
309 * Predeclare the interface implementation structures
310 */
311extern const IDirect3DSurface9Vtbl Direct3DSurface9_Vtbl;
312
313/*****************************************************************************
314 * IDirect3DSurface9 implementation structure
315 */
316typedef struct IDirect3DSurface9Impl
317{
318 /* IUnknown fields */
319 const IDirect3DSurface9Vtbl *lpVtbl;
320 LONG ref;
321
322 /* IDirect3DResource9 fields */
323 IWineD3DSurface *wineD3DSurface;
324
325 /* Parent reference */
326 LPDIRECT3DDEVICE9EX parentDevice;
327
328 /* The surface container */
329 IUnknown *container;
330
331 /* If set forward refcounting to this object */
332 IUnknown *forwardReference;
333
334 /* Flags an implicit surface */
335 BOOL isImplicit;
336} IDirect3DSurface9Impl;
337
338/* ---------------------- */
339/* IDirect3DVertexBuffer9 */
340/* ---------------------- */
341
342/*****************************************************************************
343 * IDirect3DVertexBuffer9 implementation structure
344 */
345typedef struct IDirect3DVertexBuffer9Impl
346{
347 /* IUnknown fields */
348 const IDirect3DVertexBuffer9Vtbl *lpVtbl;
349 LONG ref;
350
351 /* IDirect3DResource9 fields */
352 IWineD3DVertexBuffer *wineD3DVertexBuffer;
353
354 /* Parent reference */
355 LPDIRECT3DDEVICE9EX parentDevice;
356} IDirect3DVertexBuffer9Impl;
357
358/* --------------------- */
359/* IDirect3DIndexBuffer9 */
360/* --------------------- */
361
362/*****************************************************************************
363 * IDirect3DIndexBuffer9 implementation structure
364 */
365typedef struct IDirect3DIndexBuffer9Impl
366{
367 /* IUnknown fields */
368 const IDirect3DIndexBuffer9Vtbl *lpVtbl;
369 LONG ref;
370
371 /* IDirect3DResource9 fields */
372 IWineD3DIndexBuffer *wineD3DIndexBuffer;
373
374 /* Parent reference */
375 LPDIRECT3DDEVICE9EX parentDevice;
376} IDirect3DIndexBuffer9Impl;
377
378/* --------------------- */
379/* IDirect3DBaseTexture9 */
380/* --------------------- */
381
382/*****************************************************************************
383 * IDirect3DBaseTexture9 implementation structure
384 */
385typedef struct IDirect3DBaseTexture9Impl
386{
387 /* IUnknown fields */
388 const IDirect3DBaseTexture9Vtbl *lpVtbl;
389 LONG ref;
390
391 /* IDirect3DResource9 fields */
392 IWineD3DBaseTexture *wineD3DBaseTexture;
393
394} IDirect3DBaseTexture9Impl;
395
396extern DWORD WINAPI IDirect3DBaseTexture9Impl_GetLOD(LPDIRECT3DBASETEXTURE9 iface);
397
398/* --------------------- */
399/* IDirect3DCubeTexture9 */
400/* --------------------- */
401
402/*****************************************************************************
403 * IDirect3DCubeTexture9 implementation structure
404 */
405typedef struct IDirect3DCubeTexture9Impl
406{
407 /* IUnknown fields */
408 const IDirect3DCubeTexture9Vtbl *lpVtbl;
409 LONG ref;
410
411 /* IDirect3DResource9 fields */
412 IWineD3DCubeTexture *wineD3DCubeTexture;
413
414 /* Parent reference */
415 LPDIRECT3DDEVICE9EX parentDevice;
416} IDirect3DCubeTexture9Impl;
417
418
419/* ----------------- */
420/* IDirect3DTexture9 */
421/* ----------------- */
422
423/*****************************************************************************
424 * IDirect3DTexture9 implementation structure
425 */
426typedef struct IDirect3DTexture9Impl
427{
428 /* IUnknown fields */
429 const IDirect3DTexture9Vtbl *lpVtbl;
430 LONG ref;
431
432 /* IDirect3DResource9 fields */
433 IWineD3DTexture *wineD3DTexture;
434
435 /* Parent reference */
436 LPDIRECT3DDEVICE9EX parentDevice;
437} IDirect3DTexture9Impl;
438
439/* ----------------------- */
440/* IDirect3DVolumeTexture9 */
441/* ----------------------- */
442
443/*****************************************************************************
444 * IDirect3DVolumeTexture9 implementation structure
445 */
446typedef struct IDirect3DVolumeTexture9Impl
447{
448 /* IUnknown fields */
449 const IDirect3DVolumeTexture9Vtbl *lpVtbl;
450 LONG ref;
451
452 /* IDirect3DResource9 fields */
453 IWineD3DVolumeTexture *wineD3DVolumeTexture;
454
455 /* Parent reference */
456 LPDIRECT3DDEVICE9EX parentDevice;
457} IDirect3DVolumeTexture9Impl;
458
459/* ----------------------- */
460/* IDirect3DStateBlock9 */
461/* ----------------------- */
462
463/*****************************************************************************
464 * IDirect3DStateBlock9 implementation structure
465 */
466typedef struct IDirect3DStateBlock9Impl {
467 /* IUnknown fields */
468 const IDirect3DStateBlock9Vtbl *lpVtbl;
469 LONG ref;
470
471 /* IDirect3DStateBlock9 fields */
472 IWineD3DStateBlock *wineD3DStateBlock;
473
474 /* Parent reference */
475 LPDIRECT3DDEVICE9EX parentDevice;
476} IDirect3DStateBlock9Impl;
477
478
479/* --------------------------- */
480/* IDirect3DVertexDeclaration9 */
481/* --------------------------- */
482
483/*****************************************************************************
484 * IDirect3DVertexDeclaration implementation structure
485 */
486typedef struct IDirect3DVertexDeclaration9Impl {
487 /* IUnknown fields */
488 const IDirect3DVertexDeclaration9Vtbl *lpVtbl;
489 LONG ref;
490
491 D3DVERTEXELEMENT9 *elements;
492 UINT element_count;
493
494 /* IDirect3DVertexDeclaration9 fields */
495 IWineD3DVertexDeclaration *wineD3DVertexDeclaration;
496 DWORD convFVF;
497
498 /* Parent reference */
499 LPDIRECT3DDEVICE9EX parentDevice;
500} IDirect3DVertexDeclaration9Impl;
501
502void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface);
503
504/* ---------------------- */
505/* IDirect3DVertexShader9 */
506/* ---------------------- */
507
508/*****************************************************************************
509 * IDirect3DVertexShader implementation structure
510 */
511typedef struct IDirect3DVertexShader9Impl {
512 /* IUnknown fields */
513 const IDirect3DVertexShader9Vtbl *lpVtbl;
514 LONG ref;
515
516 /* IDirect3DVertexShader9 fields */
517 IWineD3DVertexShader *wineD3DVertexShader;
518
519 /* Parent reference */
520 LPDIRECT3DDEVICE9EX parentDevice;
521} IDirect3DVertexShader9Impl;
522
523/* --------------------- */
524/* IDirect3DPixelShader9 */
525/* --------------------- */
526
527/*****************************************************************************
528 * IDirect3DPixelShader implementation structure
529 */
530typedef struct IDirect3DPixelShader9Impl {
531 /* IUnknown fields */
532 const IDirect3DPixelShader9Vtbl *lpVtbl;
533 LONG ref;
534
535 /* IDirect3DPixelShader9 fields */
536 IWineD3DPixelShader *wineD3DPixelShader;
537
538 /* Parent reference */
539 LPDIRECT3DDEVICE9EX parentDevice;
540} IDirect3DPixelShader9Impl;
541
542/* --------------- */
543/* IDirect3DQuery9 */
544/* --------------- */
545
546/*****************************************************************************
547 * IDirect3DPixelShader implementation structure
548 */
549typedef struct IDirect3DQuery9Impl {
550 /* IUnknown fields */
551 const IDirect3DQuery9Vtbl *lpVtbl;
552 LONG ref;
553
554 /* IDirect3DQuery9 fields */
555 IWineD3DQuery *wineD3DQuery;
556
557 /* Parent reference */
558 LPDIRECT3DDEVICE9EX parentDevice;
559} IDirect3DQuery9Impl;
560
561
562/* Callbacks */
563extern HRESULT WINAPI D3D9CB_CreateSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
564 WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
565 WINED3DCUBEMAP_FACES Face, IWineD3DSurface** ppSurface,
566 HANDLE* pSharedHandle);
567
568extern HRESULT WINAPI D3D9CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
569 WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
570 IWineD3DVolume **ppVolume,
571 HANDLE * pSharedHandle);
572
573extern HRESULT WINAPI D3D9CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
574 WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
575 DWORD MultisampleQuality, BOOL Discard,
576 IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
577
578extern HRESULT WINAPI D3D9CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
579 WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
580 DWORD MultisampleQuality, BOOL Lockable,
581 IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
582
583extern ULONG WINAPI D3D9CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
584
585extern ULONG WINAPI D3D9CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
586
587extern ULONG WINAPI D3D9CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
588
589extern ULONG WINAPI D3D9CB_DestroySurface(IWineD3DSurface *pSurface);
590
591extern ULONG WINAPI D3D9CB_DestroyVolume(IWineD3DVolume *pVolume);
592
593#endif /* __WINE_D3D9_PRIVATE_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette