VirtualBox

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

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

crOpenGL: update to wine 1.1.26

  • Property svn:eol-style set to native
File size: 23.9 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
178enum d3d8_handle_type
179{
180 D3D8_HANDLE_FREE,
181 D3D8_HANDLE_VS,
182 D3D8_HANDLE_PS,
183 D3D8_HANDLE_SB,
184};
185
186struct d3d8_handle_entry
187{
188 void *object;
189 enum d3d8_handle_type type;
190};
191
192struct d3d8_handle_table
193{
194 struct d3d8_handle_entry *entries;
195 struct d3d8_handle_entry *free_entries;
196 UINT table_size;
197 UINT entry_count;
198};
199
200struct FvfToDecl
201{
202 DWORD fvf;
203 struct IDirect3DVertexDeclaration8 *decl;
204};
205
206struct IDirect3DDevice8Impl
207{
208 /* IUnknown fields */
209 const IDirect3DDevice8Vtbl *lpVtbl;
210 const IWineD3DDeviceParentVtbl *device_parent_vtbl;
211 LONG ref;
212/* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
213 IWineD3DDevice *WineD3DDevice;
214 struct d3d8_handle_table handle_table;
215
216 /* FVF management */
217 struct FvfToDecl *decls;
218 UINT numConvertedDecls, declArraySize;
219
220 /* Avoids recursion with nested ReleaseRef to 0 */
221 BOOL inDestruction;
222};
223
224/* ---------------- */
225/* IDirect3DVolume8 */
226/* ---------------- */
227
228/*****************************************************************************
229 * IDirect3DVolume8 implementation structure
230 */
231extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
232struct IDirect3DVolume8Impl
233{
234 /* IUnknown fields */
235 const IDirect3DVolume8Vtbl *lpVtbl;
236 LONG ref;
237
238 /* IDirect3DVolume8 fields */
239 IWineD3DVolume *wineD3DVolume;
240
241 /* The volume container */
242 IUnknown *container;
243
244 /* If set forward refcounting to this object */
245 IUnknown *forwardReference;
246};
247
248/* ------------------- */
249/* IDirect3DSwapChain8 */
250/* ------------------- */
251
252/*****************************************************************************
253 * Predeclare the interface implementation structures
254 */
255extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
256
257/*****************************************************************************
258 * IDirect3DSwapChain8 implementation structure
259 */
260struct IDirect3DSwapChain8Impl
261{
262 /* IUnknown fields */
263 const IDirect3DSwapChain8Vtbl *lpVtbl;
264 LONG ref;
265
266 /* IDirect3DSwapChain8 fields */
267 IWineD3DSwapChain *wineD3DSwapChain;
268
269 /* Parent reference */
270 LPDIRECT3DDEVICE8 parentDevice;
271};
272
273/* ----------------- */
274/* IDirect3DSurface8 */
275/* ----------------- */
276
277/*****************************************************************************
278 * Predeclare the interface implementation structures
279 */
280extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
281
282/*****************************************************************************
283 * IDirect3DSurface8 implementation structure
284 */
285struct IDirect3DSurface8Impl
286{
287 /* IUnknown fields */
288 const IDirect3DSurface8Vtbl *lpVtbl;
289 LONG ref;
290
291 /* IDirect3DSurface8 fields */
292 IWineD3DSurface *wineD3DSurface;
293
294 /* Parent reference */
295 LPDIRECT3DDEVICE8 parentDevice;
296
297 /* The surface container */
298 IUnknown *container;
299
300 /* If set forward refcounting to this object */
301 IUnknown *forwardReference;
302
303 /* Flags an implicit surface */
304 BOOL isImplicit;
305};
306
307/* ------------------ */
308/* IDirect3DResource8 */
309/* ------------------ */
310
311/*****************************************************************************
312 * Predeclare the interface implementation structures
313 */
314extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
315
316/*****************************************************************************
317 * IDirect3DResource8 implementation structure
318 */
319struct IDirect3DResource8Impl
320{
321 /* IUnknown fields */
322 const IDirect3DResource8Vtbl *lpVtbl;
323 LONG ref;
324
325 /* IDirect3DResource8 fields */
326 IWineD3DResource *wineD3DResource;
327};
328
329/* ---------------------- */
330/* IDirect3DVertexBuffer8 */
331/* ---------------------- */
332
333/*****************************************************************************
334 * Predeclare the interface implementation structures
335 */
336extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
337
338/*****************************************************************************
339 * IDirect3DVertexBuffer8 implementation structure
340 */
341struct IDirect3DVertexBuffer8Impl
342{
343 /* IUnknown fields */
344 const IDirect3DVertexBuffer8Vtbl *lpVtbl;
345 LONG ref;
346
347 /* IDirect3DResource8 fields */
348 IWineD3DBuffer *wineD3DVertexBuffer;
349
350 /* Parent reference */
351 LPDIRECT3DDEVICE8 parentDevice;
352
353 DWORD fvf;
354};
355
356/* --------------------- */
357/* IDirect3DIndexBuffer8 */
358/* --------------------- */
359
360/*****************************************************************************
361 * Predeclare the interface implementation structures
362 */
363extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
364
365/*****************************************************************************
366 * IDirect3DIndexBuffer8 implementation structure
367 */
368struct IDirect3DIndexBuffer8Impl
369{
370 /* IUnknown fields */
371 const IDirect3DIndexBuffer8Vtbl *lpVtbl;
372 LONG ref;
373
374 /* IDirect3DResource8 fields */
375 IWineD3DBuffer *wineD3DIndexBuffer;
376
377 /* Parent reference */
378 LPDIRECT3DDEVICE8 parentDevice;
379
380 WINED3DFORMAT format;
381};
382
383/* --------------------- */
384/* IDirect3DBaseTexture8 */
385/* --------------------- */
386
387/*****************************************************************************
388 * IDirect3DBaseTexture8 implementation structure
389 */
390struct IDirect3DBaseTexture8Impl
391{
392 /* IUnknown fields */
393 const IDirect3DBaseTexture8Vtbl *lpVtbl;
394 LONG ref;
395
396 /* IDirect3DResource8 fields */
397 IWineD3DBaseTexture *wineD3DBaseTexture;
398};
399
400/* --------------------- */
401/* IDirect3DCubeTexture8 */
402/* --------------------- */
403
404/*****************************************************************************
405 * Predeclare the interface implementation structures
406 */
407extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
408
409/*****************************************************************************
410 * IDirect3DCubeTexture8 implementation structure
411 */
412struct IDirect3DCubeTexture8Impl
413{
414 /* IUnknown fields */
415 const IDirect3DCubeTexture8Vtbl *lpVtbl;
416 LONG ref;
417
418 /* IDirect3DResource8 fields */
419 IWineD3DCubeTexture *wineD3DCubeTexture;
420
421 /* Parent reference */
422 LPDIRECT3DDEVICE8 parentDevice;
423};
424
425/* ----------------- */
426/* IDirect3DTexture8 */
427/* ----------------- */
428
429/*****************************************************************************
430 * Predeclare the interface implementation structures
431 */
432extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
433
434/*****************************************************************************
435 * IDirect3DTexture8 implementation structure
436 */
437struct IDirect3DTexture8Impl
438{
439 /* IUnknown fields */
440 const IDirect3DTexture8Vtbl *lpVtbl;
441 LONG ref;
442
443 /* IDirect3DResourc8 fields */
444 IWineD3DTexture *wineD3DTexture;
445
446 /* Parent reference */
447 LPDIRECT3DDEVICE8 parentDevice;
448};
449
450/* ----------------------- */
451/* IDirect3DVolumeTexture8 */
452/* ----------------------- */
453
454/*****************************************************************************
455 * Predeclare the interface implementation structures
456 */
457extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
458
459/*****************************************************************************
460 * IDirect3DVolumeTexture8 implementation structure
461 */
462struct IDirect3DVolumeTexture8Impl
463{
464 /* IUnknown fields */
465 const IDirect3DVolumeTexture8Vtbl *lpVtbl;
466 LONG ref;
467
468 /* IDirect3DResource8 fields */
469 IWineD3DVolumeTexture *wineD3DVolumeTexture;
470
471 /* Parent reference */
472 LPDIRECT3DDEVICE8 parentDevice;
473};
474
475/* ----------------------- */
476/* IDirect3DStateBlockImpl */
477/* ----------------------- */
478
479/* TODO: Generate a valid GUIDs */
480/* {83B073CE-6F30-11d9-C687-00046142C14F} */
481DEFINE_GUID(IID_IDirect3DStateBlock8,
4820x83b073ce, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
483
484DEFINE_GUID(IID_IDirect3DVertexDeclaration8,
4850x5dd7478d, 0xcbf3, 0x41a6, 0x8c, 0xfd, 0xfd, 0x19, 0x2b, 0x11, 0xc7, 0x90);
486
487DEFINE_GUID(IID_IDirect3DVertexShader8,
4880xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
489
490DEFINE_GUID(IID_IDirect3DPixelShader8,
4910x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
492
493
494/*****************************************************************************
495 * IDirect3DStateBlock8 interface
496 */
497#define INTERFACE IDirect3DStateBlock8
498DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
499{
500 /*** IUnknown methods ***/
501 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
502 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
503 STDMETHOD_(ULONG,Release)(THIS) PURE;
504 /*** IDirect3DStateBlock9 methods ***/
505 STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
506 STDMETHOD(Capture)(THIS) PURE;
507 STDMETHOD(Apply)(THIS) PURE;
508};
509#undef INTERFACE
510
511/*** IUnknown methods ***/
512#define IDirect3DStateBlock8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
513#define IDirect3DStateBlock8_AddRef(p) (p)->lpVtbl->AddRef(p)
514#define IDirect3DStateBlock8_Release(p) (p)->lpVtbl->Release(p)
515/*** IDirect3DStateBlock9 methods ***/
516#define IDirect3DStateBlock8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
517#define IDirect3DStateBlock8_Capture(p) (p)->lpVtbl->Capture(p)
518#define IDirect3DStateBlock8_Apply(p) (p)->lpVtbl->Apply(p)
519
520/*****************************************************************************
521 * Predeclare the interface implementation structures
522 */
523extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
524
525/*****************************************************************************
526 * IDirect3DStateBlock implementation structure
527 */
528typedef struct IDirect3DStateBlock8Impl {
529 /* IUnknown fields */
530 const IDirect3DStateBlock8Vtbl *lpVtbl;
531 LONG ref;
532
533 /* IDirect3DResource8 fields */
534 IWineD3DStateBlock *wineD3DStateBlock;
535} IDirect3DStateBlock8Impl;
536
537/*****************************************************************************
538 * IDirect3DVertexDeclaration8 interface
539 */
540#define INTERFACE IDirect3DVertexDeclaration8
541DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
542{
543 /*** IUnknown methods ***/
544 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** obj_ptr) PURE;
545 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
546 STDMETHOD_(ULONG,Release)(THIS) PURE;
547};
548#undef INTERFACE
549
550/*** IUnknown methods ***/
551#define IDirect3DVertexDeclaration8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
552#define IDirect3DVertexDeclaration8_AddRef(p) (p)->lpVtbl->AddRef(p)
553#define IDirect3DVertexDeclaration8_Release(p) (p)->lpVtbl->Release(p)
554
555/*** Implementation ***/
556extern const IDirect3DVertexDeclaration8Vtbl Direct3DVertexDeclaration8_Vtbl;
557
558typedef struct {
559 const IDirect3DVertexDeclaration8Vtbl *lpVtbl;
560 LONG ref_count;
561
562 DWORD *elements;
563 DWORD elements_size; /* Size of elements, in bytes */
564
565 IWineD3DVertexDeclaration *wined3d_vertex_declaration;
566 DWORD shader_handle;
567} IDirect3DVertexDeclaration8Impl;
568
569
570/*****************************************************************************
571 * IDirect3DVertexShader8 interface
572 */
573#define INTERFACE IDirect3DVertexShader8
574DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
575{
576 /*** IUnknown methods ***/
577 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
578 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
579 STDMETHOD_(ULONG,Release)(THIS) PURE;
580};
581#undef INTERFACE
582
583/*** IUnknown methods ***/
584#define IDirect3DVertexShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
585#define IDirect3DVertexShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
586#define IDirect3DVertexShader8_Release(p) (p)->lpVtbl->Release(p)
587
588/* ------------------------- */
589/* IDirect3DVertexShader8Impl */
590/* ------------------------- */
591
592/*****************************************************************************
593 * IDirect3DPixelShader8 interface
594 */
595#define INTERFACE IDirect3DPixelShader8
596DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
597{
598 /*** IUnknown methods ***/
599 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
600 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
601 STDMETHOD_(ULONG,Release)(THIS) PURE;
602};
603#undef INTERFACE
604
605/*** IUnknown methods ***/
606#define IDirect3DPixelShader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
607#define IDirect3DPixelShader8_AddRef(p) (p)->lpVtbl->AddRef(p)
608#define IDirect3DPixelShader8_Release(p) (p)->lpVtbl->Release(p)
609
610/*****************************************************************************
611 * Predeclare the interface implementation structures
612 */
613extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
614
615/*****************************************************************************
616 * IDirect3DVertexShader implementation structure
617 */
618
619struct IDirect3DVertexShader8Impl {
620 const IDirect3DVertexShader8Vtbl *lpVtbl;
621 LONG ref;
622
623 IDirect3DVertexDeclaration8 *vertex_declaration;
624 IWineD3DVertexShader *wineD3DVertexShader;
625};
626
627#define D3D8_MAX_VERTEX_SHADER_CONSTANTF 256
628
629
630/* ------------------------ */
631/* IDirect3DPixelShaderImpl */
632/* ------------------------ */
633
634
635/*****************************************************************************
636 * Predeclare the interface implementation structures
637 */
638extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
639
640/*****************************************************************************
641 * IDirect3DPixelShader implementation structure
642 */
643typedef struct IDirect3DPixelShader8Impl {
644 const IDirect3DPixelShader8Vtbl *lpVtbl;
645 LONG ref;
646
647 DWORD handle;
648 IWineD3DPixelShader *wineD3DPixelShader;
649} IDirect3DPixelShader8Impl;
650
651/**
652 * Internals functions
653 *
654 * to see how not defined it here
655 */
656D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
657WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
658void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
659UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
660size_t parse_token(const DWORD* pToken);
661
662/* Callbacks */
663extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
664extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
665extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
666extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
667extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
668
669#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