VirtualBox

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

Last change on this file since 30585 was 28475, checked in by vboxsync, 15 years ago

crOpenGL: update to wine 1.1.43

  • Property svn:eol-style set to native
File size: 24.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(DWORD FVF, D3DVERTEXELEMENT9 **ppVertexElements) DECLSPEC_HIDDEN;
54D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format) DECLSPEC_HIDDEN;
55WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format) DECLSPEC_HIDDEN;
56
57/* ===========================================================================
58 Macros
59 =========================================================================== */
60/* Not nice, but it lets wined3d support different versions of directx */
61#define WINECAPSTOD3D9CAPS(_pD3D9Caps, _pWineCaps) \
62 _pD3D9Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
63 _pD3D9Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
64 _pD3D9Caps->Caps = _pWineCaps->Caps; \
65 _pD3D9Caps->Caps2 = _pWineCaps->Caps2; \
66 _pD3D9Caps->Caps3 = _pWineCaps->Caps3; \
67 _pD3D9Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
68 _pD3D9Caps->CursorCaps = _pWineCaps->CursorCaps; \
69 _pD3D9Caps->DevCaps = _pWineCaps->DevCaps; \
70 _pD3D9Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
71 _pD3D9Caps->RasterCaps = _pWineCaps->RasterCaps; \
72 _pD3D9Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
73 _pD3D9Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
74 _pD3D9Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
75 _pD3D9Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
76 _pD3D9Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
77 _pD3D9Caps->TextureCaps = _pWineCaps->TextureCaps; \
78 _pD3D9Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
79 _pD3D9Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
80 _pD3D9Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
81 _pD3D9Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
82 _pD3D9Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
83 _pD3D9Caps->LineCaps = _pWineCaps->LineCaps; \
84 _pD3D9Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
85 _pD3D9Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
86 _pD3D9Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
87 _pD3D9Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
88 _pD3D9Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
89 _pD3D9Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
90 _pD3D9Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
91 _pD3D9Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
92 _pD3D9Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
93 _pD3D9Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
94 _pD3D9Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
95 _pD3D9Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
96 _pD3D9Caps->StencilCaps = _pWineCaps->StencilCaps; \
97 _pD3D9Caps->FVFCaps = _pWineCaps->FVFCaps; \
98 _pD3D9Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
99 _pD3D9Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
100 _pD3D9Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
101 _pD3D9Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
102 _pD3D9Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
103 _pD3D9Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
104 _pD3D9Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
105 _pD3D9Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
106 _pD3D9Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
107 _pD3D9Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
108 _pD3D9Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
109 _pD3D9Caps->MaxStreams = _pWineCaps->MaxStreams; \
110 _pD3D9Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
111 _pD3D9Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
112 _pD3D9Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
113 _pD3D9Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
114 _pD3D9Caps->PixelShader1xMaxValue = _pWineCaps->PixelShader1xMaxValue; \
115 _pD3D9Caps->DevCaps2 = _pWineCaps->DevCaps2; \
116 _pD3D9Caps->MaxNpatchTessellationLevel = _pWineCaps->MaxNpatchTessellationLevel; \
117 _pD3D9Caps->MasterAdapterOrdinal = _pWineCaps->MasterAdapterOrdinal; \
118 _pD3D9Caps->AdapterOrdinalInGroup = _pWineCaps->AdapterOrdinalInGroup; \
119 _pD3D9Caps->NumberOfAdaptersInGroup = _pWineCaps->NumberOfAdaptersInGroup; \
120 _pD3D9Caps->DeclTypes = _pWineCaps->DeclTypes; \
121 _pD3D9Caps->NumSimultaneousRTs = _pWineCaps->NumSimultaneousRTs; \
122 _pD3D9Caps->StretchRectFilterCaps = _pWineCaps->StretchRectFilterCaps; \
123 _pD3D9Caps->VS20Caps.Caps = _pWineCaps->VS20Caps.Caps; \
124 _pD3D9Caps->VS20Caps.DynamicFlowControlDepth = _pWineCaps->VS20Caps.DynamicFlowControlDepth; \
125 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
126 _pD3D9Caps->VS20Caps.NumTemps = _pWineCaps->VS20Caps.NumTemps; \
127 _pD3D9Caps->VS20Caps.StaticFlowControlDepth = _pWineCaps->VS20Caps.StaticFlowControlDepth; \
128 _pD3D9Caps->PS20Caps.Caps = _pWineCaps->PS20Caps.Caps; \
129 _pD3D9Caps->PS20Caps.DynamicFlowControlDepth = _pWineCaps->PS20Caps.DynamicFlowControlDepth; \
130 _pD3D9Caps->PS20Caps.NumTemps = _pWineCaps->PS20Caps.NumTemps; \
131 _pD3D9Caps->PS20Caps.StaticFlowControlDepth = _pWineCaps->PS20Caps.StaticFlowControlDepth; \
132 _pD3D9Caps->PS20Caps.NumInstructionSlots = _pWineCaps->PS20Caps.NumInstructionSlots; \
133 _pD3D9Caps->VertexTextureFilterCaps = _pWineCaps->VertexTextureFilterCaps; \
134 _pD3D9Caps->MaxVShaderInstructionsExecuted = _pWineCaps->MaxVShaderInstructionsExecuted; \
135 _pD3D9Caps->MaxPShaderInstructionsExecuted = _pWineCaps->MaxPShaderInstructionsExecuted; \
136 _pD3D9Caps->MaxVertexShader30InstructionSlots = _pWineCaps->MaxVertexShader30InstructionSlots; \
137 _pD3D9Caps->MaxPixelShader30InstructionSlots = _pWineCaps->MaxPixelShader30InstructionSlots;
138
139/* ===========================================================================
140 D3D9 interfaces
141 =========================================================================== */
142
143/* ---------- */
144/* IDirect3D9 */
145/* ---------- */
146
147/*****************************************************************************
148 * Predeclare the interface implementation structures
149 */
150extern const IDirect3D9ExVtbl Direct3D9_Vtbl DECLSPEC_HIDDEN;
151
152/*****************************************************************************
153 * IDirect3D implementation structure
154 */
155typedef struct IDirect3D9Impl
156{
157 /* IUnknown fields */
158 const IDirect3D9ExVtbl *lpVtbl;
159 LONG ref;
160
161 /* The WineD3D device */
162 IWineD3D *WineD3D;
163
164 /* Created via Direct3DCreate9Ex? Can QI extended interfaces */
165 BOOL extended;
166} IDirect3D9Impl;
167
168void filter_caps(D3DCAPS9* pCaps) DECLSPEC_HIDDEN;
169
170/*****************************************************************************
171 * IDirect3DDevice9 implementation structure
172 */
173typedef struct IDirect3DDevice9Impl
174{
175 /* IUnknown fields */
176 const IDirect3DDevice9ExVtbl *lpVtbl;
177 const IWineD3DDeviceParentVtbl *device_parent_vtbl;
178 LONG ref;
179
180 /* IDirect3DDevice9 fields */
181 IWineD3DDevice *WineD3DDevice;
182
183 /* Avoids recursion with nested ReleaseRef to 0 */
184 BOOL inDestruction;
185
186 IDirect3DVertexDeclaration9 **convertedDecls;
187 unsigned int numConvertedDecls, declArraySize;
188
189 BOOL notreset;
190} IDirect3DDevice9Impl;
191
192HRESULT device_init(IDirect3DDevice9Impl *device, IWineD3D *wined3d, UINT adapter, D3DDEVTYPE device_type,
193 HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters) DECLSPEC_HIDDEN;
194
195/* IDirect3DDevice9: */
196extern HRESULT WINAPI IDirect3DDevice9Impl_GetSwapChain(IDirect3DDevice9Ex *iface,
197 UINT iSwapChain, IDirect3DSwapChain9 **pSwapChain) DECLSPEC_HIDDEN;
198extern UINT WINAPI IDirect3DDevice9Impl_GetNumberOfSwapChains(IDirect3DDevice9Ex *iface) DECLSPEC_HIDDEN;
199extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexDeclaration(IDirect3DDevice9Ex *iface,
200 IDirect3DVertexDeclaration9 *pDecl) DECLSPEC_HIDDEN;
201extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexDeclaration(IDirect3DDevice9Ex *iface,
202 IDirect3DVertexDeclaration9 **ppDecl) DECLSPEC_HIDDEN;
203extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShader(IDirect3DDevice9Ex *iface,
204 IDirect3DVertexShader9 *pShader) DECLSPEC_HIDDEN;
205extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShader(IDirect3DDevice9Ex *iface,
206 IDirect3DVertexShader9 **ppShader) DECLSPEC_HIDDEN;
207extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
208 UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
209extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantF(IDirect3DDevice9Ex *iface,
210 UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
211extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
212 UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
213extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantI(IDirect3DDevice9Ex *iface,
214 UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
215extern HRESULT WINAPI IDirect3DDevice9Impl_SetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
216 UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
217extern HRESULT WINAPI IDirect3DDevice9Impl_GetVertexShaderConstantB(IDirect3DDevice9Ex *iface,
218 UINT StartRegister, BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
219extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *iface,
220 IDirect3DPixelShader9 *pShader) DECLSPEC_HIDDEN;
221extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *iface,
222 IDirect3DPixelShader9 **ppShader) DECLSPEC_HIDDEN;
223extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
224 UINT StartRegister, const float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
225extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantF(IDirect3DDevice9Ex *iface,
226 UINT StartRegister, float *pConstantData, UINT Vector4fCount) DECLSPEC_HIDDEN;
227extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
228 UINT StartRegister, const int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
229extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantI(IDirect3DDevice9Ex *iface,
230 UINT StartRegister, int *pConstantData, UINT Vector4iCount) DECLSPEC_HIDDEN;
231extern HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShaderConstantB(IDirect3DDevice9Ex *iface,
232 UINT StartRegister, const BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
233extern HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShaderConstantB(IDirect3DDevice9Ex *iface,
234 UINT StartRegister, BOOL *pConstantData, UINT BoolCount) DECLSPEC_HIDDEN;
235
236/* ---------------- */
237/* IDirect3DVolume9 */
238/* ---------------- */
239
240/*****************************************************************************
241 * IDirect3DVolume9 implementation structure
242 */
243typedef struct IDirect3DVolume9Impl
244{
245 /* IUnknown fields */
246 const IDirect3DVolume9Vtbl *lpVtbl;
247 LONG ref;
248
249 /* IDirect3DVolume9 fields */
250 IWineD3DVolume *wineD3DVolume;
251
252 /* The volume container */
253 IUnknown *container;
254
255 /* If set forward refcounting to this object */
256 IUnknown *forwardReference;
257} IDirect3DVolume9Impl;
258
259HRESULT volume_init(IDirect3DVolume9Impl *volume, IDirect3DDevice9Impl *device, UINT width, UINT height,
260 UINT depth, DWORD usage, WINED3DFORMAT format, WINED3DPOOL pool) DECLSPEC_HIDDEN;
261
262/* ------------------- */
263/* IDirect3DSwapChain9 */
264/* ------------------- */
265
266/*****************************************************************************
267 * IDirect3DSwapChain9 implementation structure
268 */
269typedef struct IDirect3DSwapChain9Impl
270{
271 /* IUnknown fields */
272 const IDirect3DSwapChain9Vtbl *lpVtbl;
273 LONG ref;
274
275 /* IDirect3DSwapChain9 fields */
276 IWineD3DSwapChain *wineD3DSwapChain;
277
278 /* Parent reference */
279 LPDIRECT3DDEVICE9EX parentDevice;
280
281 /* Flags an implicit swap chain */
282 BOOL isImplicit;
283} IDirect3DSwapChain9Impl;
284
285HRESULT swapchain_init(IDirect3DSwapChain9Impl *swapchain, IDirect3DDevice9Impl *device,
286 D3DPRESENT_PARAMETERS *present_parameters) DECLSPEC_HIDDEN;
287
288/* ----------------- */
289/* IDirect3DSurface9 */
290/* ----------------- */
291
292/*****************************************************************************
293 * IDirect3DSurface9 implementation structure
294 */
295typedef struct IDirect3DSurface9Impl
296{
297 /* IUnknown fields */
298 const IDirect3DSurface9Vtbl *lpVtbl;
299 LONG ref;
300
301 /* IDirect3DResource9 fields */
302 IWineD3DSurface *wineD3DSurface;
303
304 /* Parent reference */
305 LPDIRECT3DDEVICE9EX parentDevice;
306
307 /* The surface container */
308 IUnknown *container;
309
310 /* If set forward refcounting to this object */
311 IUnknown *forwardReference;
312
313 BOOL getdc_supported;
314} IDirect3DSurface9Impl;
315
316HRESULT surface_init(IDirect3DSurface9Impl *surface, IDirect3DDevice9Impl *device,
317 UINT width, UINT height, D3DFORMAT format, BOOL lockable, BOOL discard, UINT level,
318 DWORD usage, D3DPOOL pool, D3DMULTISAMPLE_TYPE multisample_type, DWORD multisample_quality) DECLSPEC_HIDDEN;
319
320/* ---------------------- */
321/* IDirect3DVertexBuffer9 */
322/* ---------------------- */
323
324/*****************************************************************************
325 * IDirect3DVertexBuffer9 implementation structure
326 */
327typedef struct IDirect3DVertexBuffer9Impl
328{
329 /* IUnknown fields */
330 const IDirect3DVertexBuffer9Vtbl *lpVtbl;
331 LONG ref;
332
333 /* IDirect3DResource9 fields */
334 IWineD3DBuffer *wineD3DVertexBuffer;
335
336 /* Parent reference */
337 LPDIRECT3DDEVICE9EX parentDevice;
338
339 DWORD fvf;
340} IDirect3DVertexBuffer9Impl;
341
342HRESULT vertexbuffer_init(IDirect3DVertexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
343 UINT size, UINT usage, DWORD fvf, D3DPOOL pool) DECLSPEC_HIDDEN;
344
345/* --------------------- */
346/* IDirect3DIndexBuffer9 */
347/* --------------------- */
348
349/*****************************************************************************
350 * IDirect3DIndexBuffer9 implementation structure
351 */
352typedef 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
366HRESULT indexbuffer_init(IDirect3DIndexBuffer9Impl *buffer, IDirect3DDevice9Impl *device,
367 UINT size, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
368
369/* --------------------- */
370/* IDirect3DBaseTexture9 */
371/* --------------------- */
372
373/*****************************************************************************
374 * IDirect3DBaseTexture9 implementation structure
375 */
376typedef struct IDirect3DBaseTexture9Impl
377{
378 /* IUnknown fields */
379 const IDirect3DBaseTexture9Vtbl *lpVtbl;
380 LONG ref;
381
382 /* IDirect3DResource9 fields */
383 IWineD3DBaseTexture *wineD3DBaseTexture;
384} IDirect3DBaseTexture9Impl;
385
386/* --------------------- */
387/* IDirect3DCubeTexture9 */
388/* --------------------- */
389
390/*****************************************************************************
391 * IDirect3DCubeTexture9 implementation structure
392 */
393typedef struct IDirect3DCubeTexture9Impl
394{
395 /* IUnknown fields */
396 const IDirect3DCubeTexture9Vtbl *lpVtbl;
397 LONG ref;
398
399 /* IDirect3DResource9 fields */
400 IWineD3DCubeTexture *wineD3DCubeTexture;
401
402 /* Parent reference */
403 LPDIRECT3DDEVICE9EX parentDevice;
404} IDirect3DCubeTexture9Impl;
405
406HRESULT cubetexture_init(IDirect3DCubeTexture9Impl *texture, IDirect3DDevice9Impl *device,
407 UINT edge_length, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
408
409/* ----------------- */
410/* IDirect3DTexture9 */
411/* ----------------- */
412
413/*****************************************************************************
414 * IDirect3DTexture9 implementation structure
415 */
416typedef struct IDirect3DTexture9Impl
417{
418 /* IUnknown fields */
419 const IDirect3DTexture9Vtbl *lpVtbl;
420 LONG ref;
421
422 /* IDirect3DResource9 fields */
423 IWineD3DTexture *wineD3DTexture;
424
425 /* Parent reference */
426 LPDIRECT3DDEVICE9EX parentDevice;
427} IDirect3DTexture9Impl;
428
429HRESULT texture_init(IDirect3DTexture9Impl *texture, IDirect3DDevice9Impl *device,
430 UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
431
432/* ----------------------- */
433/* IDirect3DVolumeTexture9 */
434/* ----------------------- */
435
436/*****************************************************************************
437 * IDirect3DVolumeTexture9 implementation structure
438 */
439typedef struct IDirect3DVolumeTexture9Impl
440{
441 /* IUnknown fields */
442 const IDirect3DVolumeTexture9Vtbl *lpVtbl;
443 LONG ref;
444
445 /* IDirect3DResource9 fields */
446 IWineD3DVolumeTexture *wineD3DVolumeTexture;
447
448 /* Parent reference */
449 LPDIRECT3DDEVICE9EX parentDevice;
450} IDirect3DVolumeTexture9Impl;
451
452HRESULT volumetexture_init(IDirect3DVolumeTexture9Impl *texture, IDirect3DDevice9Impl *device,
453 UINT width, UINT height, UINT depth, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool) DECLSPEC_HIDDEN;
454
455/* ----------------------- */
456/* IDirect3DStateBlock9 */
457/* ----------------------- */
458
459/*****************************************************************************
460 * IDirect3DStateBlock9 implementation structure
461 */
462typedef struct IDirect3DStateBlock9Impl {
463 /* IUnknown fields */
464 const IDirect3DStateBlock9Vtbl *lpVtbl;
465 LONG ref;
466
467 /* IDirect3DStateBlock9 fields */
468 IWineD3DStateBlock *wineD3DStateBlock;
469
470 /* Parent reference */
471 LPDIRECT3DDEVICE9EX parentDevice;
472} IDirect3DStateBlock9Impl;
473
474HRESULT stateblock_init(IDirect3DStateBlock9Impl *stateblock, IDirect3DDevice9Impl *device,
475 D3DSTATEBLOCKTYPE type, IWineD3DStateBlock *wined3d_stateblock) DECLSPEC_HIDDEN;
476
477/* --------------------------- */
478/* IDirect3DVertexDeclaration9 */
479/* --------------------------- */
480
481/*****************************************************************************
482 * IDirect3DVertexDeclaration implementation structure
483 */
484typedef struct IDirect3DVertexDeclaration9Impl {
485 /* IUnknown fields */
486 const IDirect3DVertexDeclaration9Vtbl *lpVtbl;
487 LONG ref;
488
489 D3DVERTEXELEMENT9 *elements;
490 UINT element_count;
491
492 /* IDirect3DVertexDeclaration9 fields */
493 IWineD3DVertexDeclaration *wineD3DVertexDeclaration;
494 DWORD convFVF;
495
496 /* Parent reference */
497 LPDIRECT3DDEVICE9EX parentDevice;
498} IDirect3DVertexDeclaration9Impl;
499
500void IDirect3DVertexDeclaration9Impl_Destroy(LPDIRECT3DVERTEXDECLARATION9 iface) DECLSPEC_HIDDEN;
501HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
502 IDirect3DDevice9Impl *device, const D3DVERTEXELEMENT9 *elements) DECLSPEC_HIDDEN;
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
523HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader,
524 IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
525
526#define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256
527#define D3D9_MAX_SIMULTANEOUS_RENDERTARGETS 4
528
529/* --------------------- */
530/* IDirect3DPixelShader9 */
531/* --------------------- */
532
533/*****************************************************************************
534 * IDirect3DPixelShader implementation structure
535 */
536typedef struct IDirect3DPixelShader9Impl {
537 /* IUnknown fields */
538 const IDirect3DPixelShader9Vtbl *lpVtbl;
539 LONG ref;
540
541 /* IDirect3DPixelShader9 fields */
542 IWineD3DPixelShader *wineD3DPixelShader;
543
544 /* Parent reference */
545 LPDIRECT3DDEVICE9EX parentDevice;
546} IDirect3DPixelShader9Impl;
547
548HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader,
549 IDirect3DDevice9Impl *device, const DWORD *byte_code) DECLSPEC_HIDDEN;
550
551/* --------------- */
552/* IDirect3DQuery9 */
553/* --------------- */
554
555/*****************************************************************************
556 * IDirect3DPixelShader implementation structure
557 */
558typedef struct IDirect3DQuery9Impl {
559 /* IUnknown fields */
560 const IDirect3DQuery9Vtbl *lpVtbl;
561 LONG ref;
562
563 /* IDirect3DQuery9 fields */
564 IWineD3DQuery *wineD3DQuery;
565
566 /* Parent reference */
567 LPDIRECT3DDEVICE9EX parentDevice;
568} IDirect3DQuery9Impl;
569
570HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device,
571 D3DQUERYTYPE type) DECLSPEC_HIDDEN;
572
573#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