VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/d3d8/d3d8_private.h@ 19678

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

opengl: update wine to 1.1.21, add d3d9.dll to build list

  • Property svn:eol-style set to native
File size: 23.7 KB
Line 
1/*
2 * Direct3D 8 private include file
3 *
4 * Copyright 2002-2004 Jason Edmeades
5 * Copyright 2003-2004 Raphael Junqueira
6 * Copyright 2004 Christian Costa
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_D3D8_PRIVATE_H
33#define __WINE_D3D8_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 "wine/debug.h"
44#include "d3d8.h"
45#include "wine/wined3d.h"
46
47/* CreateVertexShader can return > 0xFFFF */
48#define VS_HIGHESTFIXEDFXF 0xF0000000
49
50/* ===========================================================================
51 Macros
52 =========================================================================== */
53/* Not nice, but it lets wined3d support different versions of directx */
54#define WINECAPSTOD3D8CAPS(_pD3D8Caps, _pWineCaps) \
55 _pD3D8Caps->DeviceType = (D3DDEVTYPE) _pWineCaps->DeviceType; \
56 _pD3D8Caps->AdapterOrdinal = _pWineCaps->AdapterOrdinal; \
57 _pD3D8Caps->Caps = _pWineCaps->Caps; \
58 _pD3D8Caps->Caps2 = _pWineCaps->Caps2; \
59 _pD3D8Caps->Caps3 = _pWineCaps->Caps3; \
60 _pD3D8Caps->PresentationIntervals = _pWineCaps->PresentationIntervals; \
61 _pD3D8Caps->CursorCaps = _pWineCaps->CursorCaps; \
62 _pD3D8Caps->DevCaps = _pWineCaps->DevCaps; \
63 _pD3D8Caps->PrimitiveMiscCaps = _pWineCaps->PrimitiveMiscCaps; \
64 _pD3D8Caps->RasterCaps = _pWineCaps->RasterCaps; \
65 _pD3D8Caps->ZCmpCaps = _pWineCaps->ZCmpCaps; \
66 _pD3D8Caps->SrcBlendCaps = _pWineCaps->SrcBlendCaps; \
67 _pD3D8Caps->DestBlendCaps = _pWineCaps->DestBlendCaps; \
68 _pD3D8Caps->AlphaCmpCaps = _pWineCaps->AlphaCmpCaps; \
69 _pD3D8Caps->ShadeCaps = _pWineCaps->ShadeCaps; \
70 _pD3D8Caps->TextureCaps = _pWineCaps->TextureCaps; \
71 _pD3D8Caps->TextureFilterCaps = _pWineCaps->TextureFilterCaps; \
72 _pD3D8Caps->CubeTextureFilterCaps = _pWineCaps->CubeTextureFilterCaps; \
73 _pD3D8Caps->VolumeTextureFilterCaps = _pWineCaps->VolumeTextureFilterCaps; \
74 _pD3D8Caps->TextureAddressCaps = _pWineCaps->TextureAddressCaps; \
75 _pD3D8Caps->VolumeTextureAddressCaps = _pWineCaps->VolumeTextureAddressCaps; \
76 _pD3D8Caps->LineCaps = _pWineCaps->LineCaps; \
77 _pD3D8Caps->MaxTextureWidth = _pWineCaps->MaxTextureWidth; \
78 _pD3D8Caps->MaxTextureHeight = _pWineCaps->MaxTextureHeight; \
79 _pD3D8Caps->MaxVolumeExtent = _pWineCaps->MaxVolumeExtent; \
80 _pD3D8Caps->MaxTextureRepeat = _pWineCaps->MaxTextureRepeat; \
81 _pD3D8Caps->MaxTextureAspectRatio = _pWineCaps->MaxTextureAspectRatio; \
82 _pD3D8Caps->MaxAnisotropy = _pWineCaps->MaxAnisotropy; \
83 _pD3D8Caps->MaxVertexW = _pWineCaps->MaxVertexW; \
84 _pD3D8Caps->GuardBandLeft = _pWineCaps->GuardBandLeft; \
85 _pD3D8Caps->GuardBandTop = _pWineCaps->GuardBandTop; \
86 _pD3D8Caps->GuardBandRight = _pWineCaps->GuardBandRight; \
87 _pD3D8Caps->GuardBandBottom = _pWineCaps->GuardBandBottom; \
88 _pD3D8Caps->ExtentsAdjust = _pWineCaps->ExtentsAdjust; \
89 _pD3D8Caps->StencilCaps = _pWineCaps->StencilCaps; \
90 _pD3D8Caps->FVFCaps = _pWineCaps->FVFCaps; \
91 _pD3D8Caps->TextureOpCaps = _pWineCaps->TextureOpCaps; \
92 _pD3D8Caps->MaxTextureBlendStages = _pWineCaps->MaxTextureBlendStages; \
93 _pD3D8Caps->MaxSimultaneousTextures = _pWineCaps->MaxSimultaneousTextures; \
94 _pD3D8Caps->VertexProcessingCaps = _pWineCaps->VertexProcessingCaps; \
95 _pD3D8Caps->MaxActiveLights = _pWineCaps->MaxActiveLights; \
96 _pD3D8Caps->MaxUserClipPlanes = _pWineCaps->MaxUserClipPlanes; \
97 _pD3D8Caps->MaxVertexBlendMatrices = _pWineCaps->MaxVertexBlendMatrices; \
98 _pD3D8Caps->MaxVertexBlendMatrixIndex = _pWineCaps->MaxVertexBlendMatrixIndex; \
99 _pD3D8Caps->MaxPointSize = _pWineCaps->MaxPointSize; \
100 _pD3D8Caps->MaxPrimitiveCount = _pWineCaps->MaxPrimitiveCount; \
101 _pD3D8Caps->MaxVertexIndex = _pWineCaps->MaxVertexIndex; \
102 _pD3D8Caps->MaxStreams = _pWineCaps->MaxStreams; \
103 _pD3D8Caps->MaxStreamStride = _pWineCaps->MaxStreamStride; \
104 _pD3D8Caps->VertexShaderVersion = _pWineCaps->VertexShaderVersion; \
105 _pD3D8Caps->MaxVertexShaderConst = _pWineCaps->MaxVertexShaderConst; \
106 _pD3D8Caps->PixelShaderVersion = _pWineCaps->PixelShaderVersion; \
107 _pD3D8Caps->MaxPixelShaderValue = _pWineCaps->PixelShader1xMaxValue;
108
109/* Direct3D8 Interfaces: */
110typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
111typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl;
112typedef struct IDirect3D8Impl IDirect3D8Impl;
113typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl;
114typedef struct IDirect3DTexture8Impl IDirect3DTexture8Impl;
115typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl;
116typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
117typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
118typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
119typedef struct IDirect3DResource8Impl IDirect3DResource8Impl;
120typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
121typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl;
122
123/** Private Interfaces: */
124typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
125typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
126typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
127typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
128
129/* Advance declaration of structures to satisfy compiler */
130typedef struct IDirect3DVertexShader8Impl IDirect3DVertexShader8Impl;
131
132/* Global critical section */
133extern CRITICAL_SECTION d3d8_cs;
134
135/* ===========================================================================
136 The interfaces themselves
137 =========================================================================== */
138
139/* ---------- */
140/* IDirect3D8 */
141/* ---------- */
142
143/*****************************************************************************
144 * Predeclare the interface implementation structures
145 */
146extern const IDirect3D8Vtbl Direct3D8_Vtbl;
147
148/*****************************************************************************
149 * IDirect3D implementation structure
150 */
151struct IDirect3D8Impl
152{
153 /* IUnknown fields */
154 const IDirect3D8Vtbl *lpVtbl;
155 LONG ref;
156
157 /* The WineD3D device */
158 IWineD3D *WineD3D;
159};
160
161/* ---------------- */
162/* IDirect3DDevice8 */
163/* ---------------- */
164
165/*****************************************************************************
166 * Predeclare the interface implementation structures
167 */
168extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl;
169extern const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl;
170
171/*****************************************************************************
172 * IDirect3DDevice8 implementation structure
173 */
174
175#define D3D8_INITIAL_HANDLE_TABLE_SIZE 64
176#define D3D8_INVALID_HANDLE ~0U
177
178struct d3d8_handle_table
179{
180 void **entries;
181 void **free_entries;
182 UINT table_size;
183 UINT entry_count;
184};
185
186struct FvfToDecl
187{
188 DWORD fvf;
189 struct IDirect3DVertexDeclaration8 *decl;
190};
191
192struct IDirect3DDevice8Impl
193{
194 /* IUnknown fields */
195 const IDirect3DDevice8Vtbl *lpVtbl;
196 const IWineD3DDeviceParentVtbl *device_parent_vtbl;
197 LONG ref;
198/* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
199 IWineD3DDevice *WineD3DDevice;
200 struct d3d8_handle_table handle_table;
201
202 /* FVF management */
203 struct FvfToDecl *decls;
204 UINT numConvertedDecls, declArraySize;
205
206 /* Avoids recursion with nested ReleaseRef to 0 */
207 BOOL inDestruction;
208};
209
210/* ---------------- */
211/* IDirect3DVolume8 */
212/* ---------------- */
213
214/*****************************************************************************
215 * IDirect3DVolume8 implementation structure
216 */
217extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
218struct IDirect3DVolume8Impl
219{
220 /* IUnknown fields */
221 const IDirect3DVolume8Vtbl *lpVtbl;
222 LONG ref;
223
224 /* IDirect3DVolume8 fields */
225 IWineD3DVolume *wineD3DVolume;
226
227 /* The volume container */
228 IUnknown *container;
229
230 /* If set forward refcounting to this object */
231 IUnknown *forwardReference;
232};
233
234/* ------------------- */
235/* IDirect3DSwapChain8 */
236/* ------------------- */
237
238/*****************************************************************************
239 * Predeclare the interface implementation structures
240 */
241extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
242
243/*****************************************************************************
244 * IDirect3DSwapChain8 implementation structure
245 */
246struct IDirect3DSwapChain8Impl
247{
248 /* IUnknown fields */
249 const IDirect3DSwapChain8Vtbl *lpVtbl;
250 LONG ref;
251
252 /* IDirect3DSwapChain8 fields */
253 IWineD3DSwapChain *wineD3DSwapChain;
254
255 /* Parent reference */
256 LPDIRECT3DDEVICE8 parentDevice;
257};
258
259/* ----------------- */
260/* IDirect3DSurface8 */
261/* ----------------- */
262
263/*****************************************************************************
264 * Predeclare the interface implementation structures
265 */
266extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
267
268/*****************************************************************************
269 * IDirect3DSurface8 implementation structure
270 */
271struct IDirect3DSurface8Impl
272{
273 /* IUnknown fields */
274 const IDirect3DSurface8Vtbl *lpVtbl;
275 LONG ref;
276
277 /* IDirect3DSurface8 fields */
278 IWineD3DSurface *wineD3DSurface;
279
280 /* Parent reference */
281 LPDIRECT3DDEVICE8 parentDevice;
282
283 /* The surface container */
284 IUnknown *container;
285
286 /* If set forward refcounting to this object */
287 IUnknown *forwardReference;
288
289 /* Flags an implicit surface */
290 BOOL isImplicit;
291};
292
293/* ------------------ */
294/* IDirect3DResource8 */
295/* ------------------ */
296
297/*****************************************************************************
298 * Predeclare the interface implementation structures
299 */
300extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
301
302/*****************************************************************************
303 * IDirect3DResource8 implementation structure
304 */
305struct IDirect3DResource8Impl
306{
307 /* IUnknown fields */
308 const IDirect3DResource8Vtbl *lpVtbl;
309 LONG ref;
310
311 /* IDirect3DResource8 fields */
312 IWineD3DResource *wineD3DResource;
313};
314
315/* ---------------------- */
316/* IDirect3DVertexBuffer8 */
317/* ---------------------- */
318
319/*****************************************************************************
320 * Predeclare the interface implementation structures
321 */
322extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
323
324/*****************************************************************************
325 * IDirect3DVertexBuffer8 implementation structure
326 */
327struct IDirect3DVertexBuffer8Impl
328{
329 /* IUnknown fields */
330 const IDirect3DVertexBuffer8Vtbl *lpVtbl;
331 LONG ref;
332
333 /* IDirect3DResource8 fields */
334 IWineD3DBuffer *wineD3DVertexBuffer;
335
336 /* Parent reference */
337 LPDIRECT3DDEVICE8 parentDevice;
338
339 DWORD fvf;
340};
341
342/* --------------------- */
343/* IDirect3DIndexBuffer8 */
344/* --------------------- */
345
346/*****************************************************************************
347 * Predeclare the interface implementation structures
348 */
349extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
350
351/*****************************************************************************
352 * IDirect3DIndexBuffer8 implementation structure
353 */
354struct IDirect3DIndexBuffer8Impl
355{
356 /* IUnknown fields */
357 const IDirect3DIndexBuffer8Vtbl *lpVtbl;
358 LONG ref;
359
360 /* IDirect3DResource8 fields */
361 IWineD3DBuffer *wineD3DIndexBuffer;
362
363 /* Parent reference */
364 LPDIRECT3DDEVICE8 parentDevice;
365
366 WINED3DFORMAT format;
367};
368
369/* --------------------- */
370/* IDirect3DBaseTexture8 */
371/* --------------------- */
372
373/*****************************************************************************
374 * IDirect3DBaseTexture8 implementation structure
375 */
376struct IDirect3DBaseTexture8Impl
377{
378 /* IUnknown fields */
379 const IDirect3DBaseTexture8Vtbl *lpVtbl;
380 LONG ref;
381
382 /* IDirect3DResource8 fields */
383 IWineD3DBaseTexture *wineD3DBaseTexture;
384};
385
386/* --------------------- */
387/* IDirect3DCubeTexture8 */
388/* --------------------- */
389
390/*****************************************************************************
391 * Predeclare the interface implementation structures
392 */
393extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
394
395/*****************************************************************************
396 * IDirect3DCubeTexture8 implementation structure
397 */
398struct IDirect3DCubeTexture8Impl
399{
400 /* IUnknown fields */
401 const IDirect3DCubeTexture8Vtbl *lpVtbl;
402 LONG ref;
403
404 /* IDirect3DResource8 fields */
405 IWineD3DCubeTexture *wineD3DCubeTexture;
406
407 /* Parent reference */
408 LPDIRECT3DDEVICE8 parentDevice;
409};
410
411/* ----------------- */
412/* IDirect3DTexture8 */
413/* ----------------- */
414
415/*****************************************************************************
416 * Predeclare the interface implementation structures
417 */
418extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
419
420/*****************************************************************************
421 * IDirect3DTexture8 implementation structure
422 */
423struct IDirect3DTexture8Impl
424{
425 /* IUnknown fields */
426 const IDirect3DTexture8Vtbl *lpVtbl;
427 LONG ref;
428
429 /* IDirect3DResourc8 fields */
430 IWineD3DTexture *wineD3DTexture;
431
432 /* Parent reference */
433 LPDIRECT3DDEVICE8 parentDevice;
434};
435
436/* ----------------------- */
437/* IDirect3DVolumeTexture8 */
438/* ----------------------- */
439
440/*****************************************************************************
441 * Predeclare the interface implementation structures
442 */
443extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
444
445/*****************************************************************************
446 * IDirect3DVolumeTexture8 implementation structure
447 */
448struct IDirect3DVolumeTexture8Impl
449{
450 /* IUnknown fields */
451 const IDirect3DVolumeTexture8Vtbl *lpVtbl;
452 LONG ref;
453
454 /* IDirect3DResource8 fields */
455 IWineD3DVolumeTexture *wineD3DVolumeTexture;
456
457 /* Parent reference */
458 LPDIRECT3DDEVICE8 parentDevice;
459};
460
461/* ----------------------- */
462/* IDirect3DStateBlockImpl */
463/* ----------------------- */
464
465/* TODO: Generate a valid GUIDs */
466/* {83B073CE-6F30-11d9-C687-00046142C14F} */
467DEFINE_GUID(IID_IDirect3DStateBlock8,
4680x83b073ce, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
469
470DEFINE_GUID(IID_IDirect3DVertexDeclaration8,
4710x5dd7478d, 0xcbf3, 0x41a6, 0x8c, 0xfd, 0xfd, 0x19, 0x2b, 0x11, 0xc7, 0x90);
472
473DEFINE_GUID(IID_IDirect3DVertexShader8,
4740xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
475
476DEFINE_GUID(IID_IDirect3DPixelShader8,
4770x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
478
479
480/*****************************************************************************
481 * IDirect3DStateBlock8 interface
482 */
483#define INTERFACE IDirect3DStateBlock8
484DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
485{
486 /*** IUnknown methods ***/
487 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
488 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
489 STDMETHOD_(ULONG,Release)(THIS) PURE;
490 /*** IDirect3DStateBlock9 methods ***/
491 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
492 STDMETHOD(Capture)(THIS) PURE;
493 STDMETHOD(Apply)(THIS) PURE;
494};
495#undef INTERFACE
496
497/*** IUnknown methods ***/
498#define IDirect3DStateBlock8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
499#define IDirect3DStateBlock8_AddRef(p) (p)->lpVtbl->AddRef(p)
500#define IDirect3DStateBlock8_Release(p) (p)->lpVtbl->Release(p)
501/*** IDirect3DStateBlock9 methods ***/
502#define IDirect3DStateBlock8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
503#define IDirect3DStateBlock8_Capture(p) (p)->lpVtbl->Capture(p)
504#define IDirect3DStateBlock8_Apply(p) (p)->lpVtbl->Apply(p)
505
506/*****************************************************************************
507 * Predeclare the interface implementation structures
508 */
509extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
510
511/*****************************************************************************
512 * IDirect3DStateBlock implementation structure
513 */
514typedef struct IDirect3DStateBlock8Impl {
515 /* IUnknown fields */
516 const IDirect3DStateBlock8Vtbl *lpVtbl;
517 LONG ref;
518
519 /* IDirect3DResource8 fields */
520 IWineD3DStateBlock *wineD3DStateBlock;
521} IDirect3DStateBlock8Impl;
522
523/*****************************************************************************
524 * IDirect3DVertexDeclaration8 interface
525 */
526#define INTERFACE IDirect3DVertexDeclaration8
527DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
528{
529 /*** IUnknown methods ***/
530 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** obj_ptr) PURE;
531 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
532 STDMETHOD_(ULONG,Release)(THIS) PURE;
533};
534#undef INTERFACE
535
536/*** IUnknown methods ***/
537#define IDirect3DVertexDeclaration8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
538#define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
539#define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
540
541/*** Implementation ***/
542extern const IDirect3DVertexDeclaration8Vtbl Direct3DVertexDeclaration8_Vtbl;
543
544typedef struct {
545 const IDirect3DVertexDeclaration8Vtbl *lpVtbl;
546 LONG ref_count;
547
548 DWORD *elements;
549 DWORD elements_size; /* Size of elements, in bytes */
550
551 IWineD3DVertexDeclaration *wined3d_vertex_declaration;
552 DWORD shader_handle;
553} IDirect3DVertexDeclaration8Impl;
554
555
556/*****************************************************************************
557 * IDirect3DVertexShader8 interface
558 */
559#define INTERFACE IDirect3DVertexShader8
560DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
561{
562 /*** IUnknown methods ***/
563 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
564 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
565 STDMETHOD_(ULONG,Release)(THIS) PURE;
566};
567#undef INTERFACE
568
569/*** IUnknown methods ***/
570#define IDirect3DVertexShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
571#define IDirect3DVertexShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
572#define IDirect3DVertexShader8_Release(p) (p)->lpVtbl->Release(p)
573
574/* ------------------------- */
575/* IDirect3DVertexShader8Impl */
576/* ------------------------- */
577
578/*****************************************************************************
579 * IDirect3DPixelShader8 interface
580 */
581#define INTERFACE IDirect3DPixelShader8
582DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
583{
584 /*** IUnknown methods ***/
585 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
586 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
587 STDMETHOD_(ULONG,Release)(THIS) PURE;
588};
589#undef INTERFACE
590
591/*** IUnknown methods ***/
592#define IDirect3DPixelShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
593#define IDirect3DPixelShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
594#define IDirect3DPixelShader8_Release(p) (p)->lpVtbl->Release(p)
595
596/*****************************************************************************
597 * Predeclare the interface implementation structures
598 */
599extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
600
601/*****************************************************************************
602 * IDirect3DVertexShader implementation structure
603 */
604
605struct IDirect3DVertexShader8Impl {
606 const IDirect3DVertexShader8Vtbl *lpVtbl;
607 LONG ref;
608
609 IDirect3DVertexDeclaration8 *vertex_declaration;
610 IWineD3DVertexShader *wineD3DVertexShader;
611};
612
613#define D3D8_MAX_VERTEX_SHADER_CONSTANTF 256
614
615
616/* ------------------------ */
617/* IDirect3DPixelShaderImpl */
618/* ------------------------ */
619
620
621/*****************************************************************************
622 * Predeclare the interface implementation structures
623 */
624extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
625
626/*****************************************************************************
627 * IDirect3DPixelShader implementation structure
628 */
629typedef struct IDirect3DPixelShader8Impl {
630 const IDirect3DPixelShader8Vtbl *lpVtbl;
631 LONG ref;
632
633 DWORD handle;
634 IWineD3DPixelShader *wineD3DPixelShader;
635} IDirect3DPixelShader8Impl;
636
637/**
638 * Internals functions
639 *
640 * to see how not defined it here
641 */
642D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
643WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
644void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
645UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
646size_t parse_token(const DWORD* pToken);
647
648/* Callbacks */
649extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
650extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
651extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
652extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
653extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
654
655#endif /* __WINE_D3DX8_PRIVATE_H */
Note: See TracBrowser for help on using the repository browser.

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