includes: Fix alignment for 64-bits
[wine/wine64.git] / dlls / d3d8 / d3d8_private.h
blobb9850b6aa80ac70b88641a88bb3e7b5cb4b24fe9
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;
164 /*****************************************************************************
165 * IDirect3DDevice8 implementation structure
168 typedef void * shader_handle;
170 struct FvfToDecl
172 DWORD fvf;
173 struct IDirect3DVertexDeclaration8 *decl;
176 struct IDirect3DDevice8Impl
178 /* IUnknown fields */
179 const IDirect3DDevice8Vtbl *lpVtbl;
180 LONG ref;
181 /* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
182 IWineD3DDevice *WineD3DDevice;
183 DWORD shader_handle_table_size;
184 DWORD allocated_shader_handles;
185 shader_handle *shader_handles;
186 shader_handle *free_shader_handles;
188 /* FVF management */
189 struct FvfToDecl *decls;
190 UINT numConvertedDecls, declArraySize;
192 /* Avoids recursion with nested ReleaseRef to 0 */
193 BOOL inDestruction;
196 /* ---------------- */
197 /* IDirect3DVolume8 */
198 /* ---------------- */
200 /*****************************************************************************
201 * IDirect3DVolume8 implementation structure
203 struct IDirect3DVolume8Impl
205 /* IUnknown fields */
206 const IDirect3DVolume8Vtbl *lpVtbl;
207 LONG ref;
209 /* IDirect3DVolume8 fields */
210 IWineD3DVolume *wineD3DVolume;
212 /* The volume container */
213 IUnknown *container;
215 /* If set forward refcounting to this object */
216 IUnknown *forwardReference;
219 /* ------------------- */
220 /* IDirect3DSwapChain8 */
221 /* ------------------- */
223 /*****************************************************************************
224 * Predeclare the interface implementation structures
226 extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
228 /*****************************************************************************
229 * IDirect3DSwapChain8 implementation structure
231 struct IDirect3DSwapChain8Impl
233 /* IUnknown fields */
234 const IDirect3DSwapChain8Vtbl *lpVtbl;
235 LONG ref;
237 /* IDirect3DSwapChain8 fields */
238 IWineD3DSwapChain *wineD3DSwapChain;
240 /* Parent reference */
241 LPDIRECT3DDEVICE8 parentDevice;
244 /* ----------------- */
245 /* IDirect3DSurface8 */
246 /* ----------------- */
248 /*****************************************************************************
249 * Predeclare the interface implementation structures
251 extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
253 /*****************************************************************************
254 * IDirect3DSurface8 implementation structure
256 struct IDirect3DSurface8Impl
258 /* IUnknown fields */
259 const IDirect3DSurface8Vtbl *lpVtbl;
260 LONG ref;
262 /* IDirect3DSurface8 fields */
263 IWineD3DSurface *wineD3DSurface;
265 /* Parent reference */
266 LPDIRECT3DDEVICE8 parentDevice;
268 /* The surface container */
269 IUnknown *container;
271 /* If set forward refcounting to this object */
272 IUnknown *forwardReference;
274 /* Flags an implicit surface */
275 BOOL isImplicit;
278 /* ------------------ */
279 /* IDirect3DResource8 */
280 /* ------------------ */
282 /*****************************************************************************
283 * Predeclare the interface implementation structures
285 extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
287 /*****************************************************************************
288 * IDirect3DResource8 implementation structure
290 struct IDirect3DResource8Impl
292 /* IUnknown fields */
293 const IDirect3DResource8Vtbl *lpVtbl;
294 LONG ref;
296 /* IDirect3DResource8 fields */
297 IWineD3DResource *wineD3DResource;
299 extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
301 /* ---------------------- */
302 /* IDirect3DVertexBuffer8 */
303 /* ---------------------- */
305 /*****************************************************************************
306 * Predeclare the interface implementation structures
308 extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
310 /*****************************************************************************
311 * IDirect3DVertexBuffer8 implementation structure
313 struct IDirect3DVertexBuffer8Impl
315 /* IUnknown fields */
316 const IDirect3DVertexBuffer8Vtbl *lpVtbl;
317 LONG ref;
319 /* IDirect3DResource8 fields */
320 IWineD3DVertexBuffer *wineD3DVertexBuffer;
322 /* Parent reference */
323 LPDIRECT3DDEVICE8 parentDevice;
326 /* --------------------- */
327 /* IDirect3DIndexBuffer8 */
328 /* --------------------- */
330 /*****************************************************************************
331 * Predeclare the interface implementation structures
333 extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
335 /*****************************************************************************
336 * IDirect3DIndexBuffer8 implementation structure
338 struct IDirect3DIndexBuffer8Impl
340 /* IUnknown fields */
341 const IDirect3DIndexBuffer8Vtbl *lpVtbl;
342 LONG ref;
344 /* IDirect3DResource8 fields */
345 IWineD3DIndexBuffer *wineD3DIndexBuffer;
347 /* Parent reference */
348 LPDIRECT3DDEVICE8 parentDevice;
351 /* --------------------- */
352 /* IDirect3DBaseTexture8 */
353 /* --------------------- */
355 /*****************************************************************************
356 * IDirect3DBaseTexture8 implementation structure
358 struct IDirect3DBaseTexture8Impl
360 /* IUnknown fields */
361 const IDirect3DBaseTexture8Vtbl *lpVtbl;
362 LONG ref;
364 /* IDirect3DResource8 fields */
365 IWineD3DBaseTexture *wineD3DBaseTexture;
368 /* --------------------- */
369 /* IDirect3DCubeTexture8 */
370 /* --------------------- */
372 /*****************************************************************************
373 * Predeclare the interface implementation structures
375 extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
377 /*****************************************************************************
378 * IDirect3DCubeTexture8 implementation structure
380 struct IDirect3DCubeTexture8Impl
382 /* IUnknown fields */
383 const IDirect3DCubeTexture8Vtbl *lpVtbl;
384 LONG ref;
386 /* IDirect3DResource8 fields */
387 IWineD3DCubeTexture *wineD3DCubeTexture;
389 /* Parent reference */
390 LPDIRECT3DDEVICE8 parentDevice;
393 /* ----------------- */
394 /* IDirect3DTexture8 */
395 /* ----------------- */
397 /*****************************************************************************
398 * Predeclare the interface implementation structures
400 extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
402 /*****************************************************************************
403 * IDirect3DTexture8 implementation structure
405 struct IDirect3DTexture8Impl
407 /* IUnknown fields */
408 const IDirect3DTexture8Vtbl *lpVtbl;
409 LONG ref;
411 /* IDirect3DResourc8 fields */
412 IWineD3DTexture *wineD3DTexture;
414 /* Parent reference */
415 LPDIRECT3DDEVICE8 parentDevice;
418 /* ----------------------- */
419 /* IDirect3DVolumeTexture8 */
420 /* ----------------------- */
422 /*****************************************************************************
423 * Predeclare the interface implementation structures
425 extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
427 /*****************************************************************************
428 * IDirect3DVolumeTexture8 implementation structure
430 struct IDirect3DVolumeTexture8Impl
432 /* IUnknown fields */
433 const IDirect3DVolumeTexture8Vtbl *lpVtbl;
434 LONG ref;
436 /* IDirect3DResource8 fields */
437 IWineD3DVolumeTexture *wineD3DVolumeTexture;
439 /* Parent reference */
440 LPDIRECT3DDEVICE8 parentDevice;
443 /* ----------------------- */
444 /* IDirect3DStateBlockImpl */
445 /* ----------------------- */
447 /* TODO: Generate a valid GUIDs */
448 /* {83B073CE-6F30-11d9-C687-00046142C14F} */
449 DEFINE_GUID(IID_IDirect3DStateBlock8,
450 0x83b073ce, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
452 DEFINE_GUID(IID_IDirect3DVertexDeclaration8,
453 0x5dd7478d, 0xcbf3, 0x41a6, 0x8c, 0xfd, 0xfd, 0x19, 0x2b, 0x11, 0xc7, 0x90);
455 DEFINE_GUID(IID_IDirect3DVertexShader8,
456 0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
458 DEFINE_GUID(IID_IDirect3DPixelShader8,
459 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
462 /*****************************************************************************
463 * IDirect3DStateBlock8 interface
465 #define INTERFACE IDirect3DStateBlock8
466 DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
468 /*** IUnknown methods ***/
469 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
470 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
471 STDMETHOD_(ULONG,Release)(THIS) PURE;
472 /*** IDirect3DStateBlock9 methods ***/
473 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
474 STDMETHOD(Capture)(THIS) PURE;
475 STDMETHOD(Apply)(THIS) PURE;
477 #undef INTERFACE
479 /*** IUnknown methods ***/
480 #define IDirect3DStateBlock8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
481 #define IDirect3DStateBlock8_AddRef(p) (p)->lpVtbl->AddRef(p)
482 #define IDirect3DStateBlock8_Release(p) (p)->lpVtbl->Release(p)
483 /*** IDirect3DStateBlock9 methods ***/
484 #define IDirect3DStateBlock8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
485 #define IDirect3DStateBlock8_Capture(p) (p)->lpVtbl->Capture(p)
486 #define IDirect3DStateBlock8_Apply(p) (p)->lpVtbl->Apply(p)
488 /*****************************************************************************
489 * Predeclare the interface implementation structures
491 extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
493 /*****************************************************************************
494 * IDirect3DStateBlock implementation structure
496 typedef struct IDirect3DStateBlock8Impl {
497 /* IUnknown fields */
498 const IDirect3DStateBlock8Vtbl *lpVtbl;
499 LONG ref;
501 /* IDirect3DResource8 fields */
502 IWineD3DStateBlock *wineD3DStateBlock;
503 } IDirect3DStateBlock8Impl;
505 /*****************************************************************************
506 * IDirect3DVertexDeclaration8 interface
508 #define INTERFACE IDirect3DVertexDeclaration8
509 DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
511 /*** IUnknown methods ***/
512 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** obj_ptr) PURE;
513 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
514 STDMETHOD_(ULONG,Release)(THIS) PURE;
516 #undef INTERFACE
518 /*** IUnknown methods ***/
519 #define IDirect3DVertexDeclaration8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
520 #define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
521 #define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
523 /*** Implementation ***/
524 extern const IDirect3DVertexDeclaration8Vtbl Direct3DVertexDeclaration8_Vtbl;
526 typedef struct {
527 const IDirect3DVertexDeclaration8Vtbl *lpVtbl;
528 LONG ref_count;
530 DWORD *elements;
531 DWORD elements_size; /* Size of elements, in bytes */
533 IWineD3DVertexDeclaration *wined3d_vertex_declaration;
534 DWORD shader_handle;
535 } IDirect3DVertexDeclaration8Impl;
538 /*****************************************************************************
539 * IDirect3DVertexShader8 interface
541 #define INTERFACE IDirect3DVertexShader8
542 DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
544 /*** IUnknown methods ***/
545 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
546 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
547 STDMETHOD_(ULONG,Release)(THIS) PURE;
549 #undef INTERFACE
551 /*** IUnknown methods ***/
552 #define IDirect3DVertexShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
553 #define IDirect3DVertexShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
554 #define IDirect3DVertexShader8_Release(p) (p)->lpVtbl->Release(p)
556 /* ------------------------- */
557 /* IDirect3DVertexShader8Impl */
558 /* ------------------------- */
560 /*****************************************************************************
561 * IDirect3DPixelShader8 interface
563 #define INTERFACE IDirect3DPixelShader8
564 DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
566 /*** IUnknown methods ***/
567 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
568 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
569 STDMETHOD_(ULONG,Release)(THIS) PURE;
571 #undef INTERFACE
573 /*** IUnknown methods ***/
574 #define IDirect3DPixelShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
575 #define IDirect3DPixelShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
576 #define IDirect3DPixelShader8_Release(p) (p)->lpVtbl->Release(p)
578 /*****************************************************************************
579 * Predeclare the interface implementation structures
581 extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
583 /*****************************************************************************
584 * IDirect3DVertexShader implementation structure
587 struct IDirect3DVertexShader8Impl {
588 const IDirect3DVertexShader8Vtbl *lpVtbl;
589 LONG ref;
591 IDirect3DVertexDeclaration8 *vertex_declaration;
592 IWineD3DVertexShader *wineD3DVertexShader;
596 /* ------------------------ */
597 /* IDirect3DPixelShaderImpl */
598 /* ------------------------ */
601 /*****************************************************************************
602 * Predeclare the interface implementation structures
604 extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
606 /*****************************************************************************
607 * IDirect3DPixelShader implementation structure
609 typedef struct IDirect3DPixelShader8Impl {
610 const IDirect3DPixelShader8Vtbl *lpVtbl;
611 LONG ref;
613 DWORD handle;
614 IWineD3DPixelShader *wineD3DPixelShader;
615 } IDirect3DPixelShader8Impl;
618 * Internals functions
620 * to see how not defined it here
622 void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
623 UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
624 size_t parse_token(const DWORD* pToken);
626 /* Callbacks */
627 extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown *pDevice, IUnknown *pSuperior, UINT Width, UINT Height, UINT Depth,
628 WINED3DFORMAT Format, WINED3DPOOL Pool, DWORD Usage,
629 IWineD3DVolume **ppVolume,
630 HANDLE * pSharedHandle);
632 extern HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
633 WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
634 DWORD MultisampleQuality, BOOL Discard,
635 IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
637 extern HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, IUnknown *pSuperior, UINT Width, UINT Height,
638 WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
639 DWORD MultisampleQuality, BOOL Lockable,
640 IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
642 extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
644 extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
646 extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
648 extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
650 extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
652 #endif /* __WINE_D3DX8_PRIVATE_H */