ole32: Round the extected size in the marshal and moniker tests using the results...
[wine/multimedia.git] / dlls / d3d8 / d3d8_private.h
blob98d5c7fcaf6c182811804388403af2a6defb64ad
1 /*
2 * Direct3D 8 private include file
4 * Copyright 2002-2004 Jason Edmeades
5 * Copyright 2003-2004 Raphael Junqueira
6 * Copyright 2004 Christian Costa
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.
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.
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
23 #ifndef __WINE_D3D8_PRIVATE_H
24 #define __WINE_D3D8_PRIVATE_H
26 #include <stdarg.h>
28 #define NONAMELESSUNION
29 #define NONAMELESSSTRUCT
30 #define COBJMACROS
31 #include "windef.h"
32 #include "winbase.h"
33 #include "wingdi.h"
34 #include "wine/debug.h"
35 #include "d3d8.h"
36 #include "wine/wined3d.h"
38 /* Device caps */
39 #define INITIAL_SHADER_HANDLE_TABLE_SIZE 64
41 /* CreateVertexShader can return > 0xFFFF */
42 #define VS_HIGHESTFIXEDFXF 0xF0000000
44 /* ===========================================================================
45 Macros
46 =========================================================================== */
47 /* Not nice, but it lets wined3d support different versions of directx */
48 #define WINECAPSTOD3D8CAPS(_pD3D8Caps, _pWineCaps) \
49 _pD3D8Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
50 _pD3D8Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
51 _pD3D8Caps->Caps = _pWineCaps->Caps; \
52 _pD3D8Caps->Caps2 = _pWineCaps->Caps2; \
53 _pD3D8Caps->Caps3 = _pWineCaps->Caps3; \
54 _pD3D8Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
55 _pD3D8Caps->CursorCaps = _pWineCaps->CursorCaps; \
56 _pD3D8Caps->DevCaps = _pWineCaps->DevCaps; \
57 _pD3D8Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
58 _pD3D8Caps->RasterCaps = _pWineCaps->RasterCaps; \
59 _pD3D8Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
60 _pD3D8Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
61 _pD3D8Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
62 _pD3D8Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
63 _pD3D8Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
64 _pD3D8Caps->TextureCaps = _pWineCaps->TextureCaps; \
65 _pD3D8Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
66 _pD3D8Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
67 _pD3D8Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
68 _pD3D8Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
69 _pD3D8Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
70 _pD3D8Caps->LineCaps = _pWineCaps->LineCaps; \
71 _pD3D8Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
72 _pD3D8Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
73 _pD3D8Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
74 _pD3D8Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
75 _pD3D8Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
76 _pD3D8Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
77 _pD3D8Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
78 _pD3D8Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
79 _pD3D8Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
80 _pD3D8Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
81 _pD3D8Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
82 _pD3D8Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
83 _pD3D8Caps->StencilCaps = _pWineCaps->StencilCaps; \
84 _pD3D8Caps->FVFCaps = _pWineCaps->FVFCaps; \
85 _pD3D8Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
86 _pD3D8Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
87 _pD3D8Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
88 _pD3D8Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
89 _pD3D8Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
90 _pD3D8Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
91 _pD3D8Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
92 _pD3D8Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
93 _pD3D8Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
94 _pD3D8Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
95 _pD3D8Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
96 _pD3D8Caps->MaxStreams = _pWineCaps->MaxStreams; \
97 _pD3D8Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
98 _pD3D8Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
99 _pD3D8Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
100 _pD3D8Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
101 _pD3D8Caps->MaxPixelShaderValue = _pWineCaps->PixelShader1xMaxValue;
103 /* Direct3D8 Interfaces: */
104 typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
105 typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl;
106 typedef struct IDirect3D8Impl IDirect3D8Impl;
107 typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl;
108 typedef struct IDirect3DTexture8Impl IDirect3DTexture8Impl;
109 typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl;
110 typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
111 typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
112 typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
113 typedef struct IDirect3DResource8Impl IDirect3DResource8Impl;
114 typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
115 typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl;
117 /** Private Interfaces: */
118 typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
119 typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
120 typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
121 typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
123 /* Advance declaration of structures to satisfy compiler */
124 typedef struct IDirect3DVertexShader8Impl IDirect3DVertexShader8Impl;
126 /* Global critical section */
127 extern CRITICAL_SECTION d3d8_cs;
129 /* ===========================================================================
130 The interfaces themselves
131 =========================================================================== */
133 /* ---------- */
134 /* IDirect3D8 */
135 /* ---------- */
137 /*****************************************************************************
138 * Predeclare the interface implementation structures
140 extern const IDirect3D8Vtbl Direct3D8_Vtbl;
142 /*****************************************************************************
143 * IDirect3D implementation structure
145 struct IDirect3D8Impl
147 /* IUnknown fields */
148 const IDirect3D8Vtbl *lpVtbl;
149 LONG ref;
151 /* The WineD3D device */
152 IWineD3D *WineD3D;
155 /* ---------------- */
156 /* IDirect3DDevice8 */
157 /* ---------------- */
159 /*****************************************************************************
160 * Predeclare the interface implementation structures
162 extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl;
163 extern const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl;
165 /*****************************************************************************
166 * IDirect3DDevice8 implementation structure
169 typedef void * shader_handle;
171 struct FvfToDecl
173 DWORD fvf;
174 struct IDirect3DVertexDeclaration8 *decl;
177 struct IDirect3DDevice8Impl
179 /* IUnknown fields */
180 const IDirect3DDevice8Vtbl *lpVtbl;
181 const IWineD3DDeviceParentVtbl *device_parent_vtbl;
182 LONG ref;
183 /* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
184 IWineD3DDevice *WineD3DDevice;
185 DWORD shader_handle_table_size;
186 DWORD allocated_shader_handles;
187 shader_handle *shader_handles;
188 shader_handle *free_shader_handles;
190 /* FVF management */
191 struct FvfToDecl *decls;
192 UINT numConvertedDecls, declArraySize;
194 /* Avoids recursion with nested ReleaseRef to 0 */
195 BOOL inDestruction;
198 /* ---------------- */
199 /* IDirect3DVolume8 */
200 /* ---------------- */
202 /*****************************************************************************
203 * IDirect3DVolume8 implementation structure
205 extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
206 struct IDirect3DVolume8Impl
208 /* IUnknown fields */
209 const IDirect3DVolume8Vtbl *lpVtbl;
210 LONG ref;
212 /* IDirect3DVolume8 fields */
213 IWineD3DVolume *wineD3DVolume;
215 /* The volume container */
216 IUnknown *container;
218 /* If set forward refcounting to this object */
219 IUnknown *forwardReference;
222 /* ------------------- */
223 /* IDirect3DSwapChain8 */
224 /* ------------------- */
226 /*****************************************************************************
227 * Predeclare the interface implementation structures
229 extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
231 /*****************************************************************************
232 * IDirect3DSwapChain8 implementation structure
234 struct IDirect3DSwapChain8Impl
236 /* IUnknown fields */
237 const IDirect3DSwapChain8Vtbl *lpVtbl;
238 LONG ref;
240 /* IDirect3DSwapChain8 fields */
241 IWineD3DSwapChain *wineD3DSwapChain;
243 /* Parent reference */
244 LPDIRECT3DDEVICE8 parentDevice;
247 /* ----------------- */
248 /* IDirect3DSurface8 */
249 /* ----------------- */
251 /*****************************************************************************
252 * Predeclare the interface implementation structures
254 extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
256 /*****************************************************************************
257 * IDirect3DSurface8 implementation structure
259 struct IDirect3DSurface8Impl
261 /* IUnknown fields */
262 const IDirect3DSurface8Vtbl *lpVtbl;
263 LONG ref;
265 /* IDirect3DSurface8 fields */
266 IWineD3DSurface *wineD3DSurface;
268 /* Parent reference */
269 LPDIRECT3DDEVICE8 parentDevice;
271 /* The surface container */
272 IUnknown *container;
274 /* If set forward refcounting to this object */
275 IUnknown *forwardReference;
277 /* Flags an implicit surface */
278 BOOL isImplicit;
281 /* ------------------ */
282 /* IDirect3DResource8 */
283 /* ------------------ */
285 /*****************************************************************************
286 * Predeclare the interface implementation structures
288 extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
290 /*****************************************************************************
291 * IDirect3DResource8 implementation structure
293 struct IDirect3DResource8Impl
295 /* IUnknown fields */
296 const IDirect3DResource8Vtbl *lpVtbl;
297 LONG ref;
299 /* IDirect3DResource8 fields */
300 IWineD3DResource *wineD3DResource;
302 extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
304 /* ---------------------- */
305 /* IDirect3DVertexBuffer8 */
306 /* ---------------------- */
308 /*****************************************************************************
309 * Predeclare the interface implementation structures
311 extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
313 /*****************************************************************************
314 * IDirect3DVertexBuffer8 implementation structure
316 struct IDirect3DVertexBuffer8Impl
318 /* IUnknown fields */
319 const IDirect3DVertexBuffer8Vtbl *lpVtbl;
320 LONG ref;
322 /* IDirect3DResource8 fields */
323 IWineD3DVertexBuffer *wineD3DVertexBuffer;
325 /* Parent reference */
326 LPDIRECT3DDEVICE8 parentDevice;
329 /* --------------------- */
330 /* IDirect3DIndexBuffer8 */
331 /* --------------------- */
333 /*****************************************************************************
334 * Predeclare the interface implementation structures
336 extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
338 /*****************************************************************************
339 * IDirect3DIndexBuffer8 implementation structure
341 struct IDirect3DIndexBuffer8Impl
343 /* IUnknown fields */
344 const IDirect3DIndexBuffer8Vtbl *lpVtbl;
345 LONG ref;
347 /* IDirect3DResource8 fields */
348 IWineD3DIndexBuffer *wineD3DIndexBuffer;
350 /* Parent reference */
351 LPDIRECT3DDEVICE8 parentDevice;
354 /* --------------------- */
355 /* IDirect3DBaseTexture8 */
356 /* --------------------- */
358 /*****************************************************************************
359 * IDirect3DBaseTexture8 implementation structure
361 struct IDirect3DBaseTexture8Impl
363 /* IUnknown fields */
364 const IDirect3DBaseTexture8Vtbl *lpVtbl;
365 LONG ref;
367 /* IDirect3DResource8 fields */
368 IWineD3DBaseTexture *wineD3DBaseTexture;
371 /* --------------------- */
372 /* IDirect3DCubeTexture8 */
373 /* --------------------- */
375 /*****************************************************************************
376 * Predeclare the interface implementation structures
378 extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
380 /*****************************************************************************
381 * IDirect3DCubeTexture8 implementation structure
383 struct IDirect3DCubeTexture8Impl
385 /* IUnknown fields */
386 const IDirect3DCubeTexture8Vtbl *lpVtbl;
387 LONG ref;
389 /* IDirect3DResource8 fields */
390 IWineD3DCubeTexture *wineD3DCubeTexture;
392 /* Parent reference */
393 LPDIRECT3DDEVICE8 parentDevice;
396 /* ----------------- */
397 /* IDirect3DTexture8 */
398 /* ----------------- */
400 /*****************************************************************************
401 * Predeclare the interface implementation structures
403 extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
405 /*****************************************************************************
406 * IDirect3DTexture8 implementation structure
408 struct IDirect3DTexture8Impl
410 /* IUnknown fields */
411 const IDirect3DTexture8Vtbl *lpVtbl;
412 LONG ref;
414 /* IDirect3DResourc8 fields */
415 IWineD3DTexture *wineD3DTexture;
417 /* Parent reference */
418 LPDIRECT3DDEVICE8 parentDevice;
421 /* ----------------------- */
422 /* IDirect3DVolumeTexture8 */
423 /* ----------------------- */
425 /*****************************************************************************
426 * Predeclare the interface implementation structures
428 extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
430 /*****************************************************************************
431 * IDirect3DVolumeTexture8 implementation structure
433 struct IDirect3DVolumeTexture8Impl
435 /* IUnknown fields */
436 const IDirect3DVolumeTexture8Vtbl *lpVtbl;
437 LONG ref;
439 /* IDirect3DResource8 fields */
440 IWineD3DVolumeTexture *wineD3DVolumeTexture;
442 /* Parent reference */
443 LPDIRECT3DDEVICE8 parentDevice;
446 /* ----------------------- */
447 /* IDirect3DStateBlockImpl */
448 /* ----------------------- */
450 /* TODO: Generate a valid GUIDs */
451 /* {83B073CE-6F30-11d9-C687-00046142C14F} */
452 DEFINE_GUID(IID_IDirect3DStateBlock8,
453 0x83b073ce, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
455 DEFINE_GUID(IID_IDirect3DVertexDeclaration8,
456 0x5dd7478d, 0xcbf3, 0x41a6, 0x8c, 0xfd, 0xfd, 0x19, 0x2b, 0x11, 0xc7, 0x90);
458 DEFINE_GUID(IID_IDirect3DVertexShader8,
459 0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
461 DEFINE_GUID(IID_IDirect3DPixelShader8,
462 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
465 /*****************************************************************************
466 * IDirect3DStateBlock8 interface
468 #define INTERFACE IDirect3DStateBlock8
469 DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
471 /*** IUnknown methods ***/
472 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
473 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
474 STDMETHOD_(ULONG,Release)(THIS) PURE;
475 /*** IDirect3DStateBlock9 methods ***/
476 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
477 STDMETHOD(Capture)(THIS) PURE;
478 STDMETHOD(Apply)(THIS) PURE;
480 #undef INTERFACE
482 /*** IUnknown methods ***/
483 #define IDirect3DStateBlock8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
484 #define IDirect3DStateBlock8_AddRef(p) (p)->lpVtbl->AddRef(p)
485 #define IDirect3DStateBlock8_Release(p) (p)->lpVtbl->Release(p)
486 /*** IDirect3DStateBlock9 methods ***/
487 #define IDirect3DStateBlock8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
488 #define IDirect3DStateBlock8_Capture(p) (p)->lpVtbl->Capture(p)
489 #define IDirect3DStateBlock8_Apply(p) (p)->lpVtbl->Apply(p)
491 /*****************************************************************************
492 * Predeclare the interface implementation structures
494 extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
496 /*****************************************************************************
497 * IDirect3DStateBlock implementation structure
499 typedef struct IDirect3DStateBlock8Impl {
500 /* IUnknown fields */
501 const IDirect3DStateBlock8Vtbl *lpVtbl;
502 LONG ref;
504 /* IDirect3DResource8 fields */
505 IWineD3DStateBlock *wineD3DStateBlock;
506 } IDirect3DStateBlock8Impl;
508 /*****************************************************************************
509 * IDirect3DVertexDeclaration8 interface
511 #define INTERFACE IDirect3DVertexDeclaration8
512 DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
514 /*** IUnknown methods ***/
515 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** obj_ptr) PURE;
516 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
517 STDMETHOD_(ULONG,Release)(THIS) PURE;
519 #undef INTERFACE
521 /*** IUnknown methods ***/
522 #define IDirect3DVertexDeclaration8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
523 #define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
524 #define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
526 /*** Implementation ***/
527 extern const IDirect3DVertexDeclaration8Vtbl Direct3DVertexDeclaration8_Vtbl;
529 typedef struct {
530 const IDirect3DVertexDeclaration8Vtbl *lpVtbl;
531 LONG ref_count;
533 DWORD *elements;
534 DWORD elements_size; /* Size of elements, in bytes */
536 IWineD3DVertexDeclaration *wined3d_vertex_declaration;
537 DWORD shader_handle;
538 } IDirect3DVertexDeclaration8Impl;
541 /*****************************************************************************
542 * IDirect3DVertexShader8 interface
544 #define INTERFACE IDirect3DVertexShader8
545 DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
547 /*** IUnknown methods ***/
548 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
549 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
550 STDMETHOD_(ULONG,Release)(THIS) PURE;
552 #undef INTERFACE
554 /*** IUnknown methods ***/
555 #define IDirect3DVertexShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
556 #define IDirect3DVertexShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
557 #define IDirect3DVertexShader8_Release(p) (p)->lpVtbl->Release(p)
559 /* ------------------------- */
560 /* IDirect3DVertexShader8Impl */
561 /* ------------------------- */
563 /*****************************************************************************
564 * IDirect3DPixelShader8 interface
566 #define INTERFACE IDirect3DPixelShader8
567 DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
569 /*** IUnknown methods ***/
570 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
571 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
572 STDMETHOD_(ULONG,Release)(THIS) PURE;
574 #undef INTERFACE
576 /*** IUnknown methods ***/
577 #define IDirect3DPixelShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
578 #define IDirect3DPixelShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
579 #define IDirect3DPixelShader8_Release(p) (p)->lpVtbl->Release(p)
581 /*****************************************************************************
582 * Predeclare the interface implementation structures
584 extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
586 /*****************************************************************************
587 * IDirect3DVertexShader implementation structure
590 struct IDirect3DVertexShader8Impl {
591 const IDirect3DVertexShader8Vtbl *lpVtbl;
592 LONG ref;
594 IDirect3DVertexDeclaration8 *vertex_declaration;
595 IWineD3DVertexShader *wineD3DVertexShader;
599 /* ------------------------ */
600 /* IDirect3DPixelShaderImpl */
601 /* ------------------------ */
604 /*****************************************************************************
605 * Predeclare the interface implementation structures
607 extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
609 /*****************************************************************************
610 * IDirect3DPixelShader implementation structure
612 typedef struct IDirect3DPixelShader8Impl {
613 const IDirect3DPixelShader8Vtbl *lpVtbl;
614 LONG ref;
616 DWORD handle;
617 IWineD3DPixelShader *wineD3DPixelShader;
618 } IDirect3DPixelShader8Impl;
621 * Internals functions
623 * to see how not defined it here
625 void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
626 UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
627 size_t parse_token(const DWORD* pToken);
629 /* Callbacks */
630 extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
631 extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
632 extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
633 extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
634 extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
636 #endif /* __WINE_D3DX8_PRIVATE_H */