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 #ifndef __WINE_D3D8_PRIVATE_H
24 #define __WINE_D3D8_PRIVATE_H
25
26 #include <stdarg.h>
27
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"
37
38 /* Device caps */
39 #define INITIAL_SHADER_HANDLE_TABLE_SIZE 64
40
41 /* CreateVertexShader can return > 0xFFFF */
42 #define VS_HIGHESTFIXEDFXF 0xF0000000
43
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;
102
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;
116
117 /** Private Interfaces: */
118 typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
119 typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
120 typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
121 typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
122
123 /* Advance declaration of structures to satisfy compiler */
124 typedef struct IDirect3DVertexShader8Impl IDirect3DVertexShader8Impl;
125
126 /* Global critical section */
127 extern CRITICAL_SECTION d3d8_cs;
128
129 /* ===========================================================================
130 The interfaces themselves
131 =========================================================================== */
132
133 /* ---------- */
134 /* IDirect3D8 */
135 /* ---------- */
136
137 /*****************************************************************************
138 * Predeclare the interface implementation structures
139 */
140 extern const IDirect3D8Vtbl Direct3D8_Vtbl;
141
142 /*****************************************************************************
143 * IDirect3D implementation structure
144 */
145 struct IDirect3D8Impl
146 {
147 /* IUnknown fields */
148 const IDirect3D8Vtbl *lpVtbl;
149 LONG ref;
150
151 /* The WineD3D device */
152 IWineD3D *WineD3D;
153 };
154
155 /* ---------------- */
156 /* IDirect3DDevice8 */
157 /* ---------------- */
158
159 /*****************************************************************************
160 * Predeclare the interface implementation structures
161 */
162 extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl;
163 extern const IWineD3DDeviceParentVtbl d3d8_wined3d_device_parent_vtbl;
164
165 /*****************************************************************************
166 * IDirect3DDevice8 implementation structure
167 */
168
169 typedef void * shader_handle;
170
171 struct FvfToDecl
172 {
173 DWORD fvf;
174 struct IDirect3DVertexDeclaration8 *decl;
175 };
176
177 struct IDirect3DDevice8Impl
178 {
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;
189
190 /* FVF management */
191 struct FvfToDecl *decls;
192 UINT numConvertedDecls, declArraySize;
193
194 /* Avoids recursion with nested ReleaseRef to 0 */
195 BOOL inDestruction;
196 };
197
198 /* ---------------- */
199 /* IDirect3DVolume8 */
200 /* ---------------- */
201
202 /*****************************************************************************
203 * IDirect3DVolume8 implementation structure
204 */
205 extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
206 struct IDirect3DVolume8Impl
207 {
208 /* IUnknown fields */
209 const IDirect3DVolume8Vtbl *lpVtbl;
210 LONG ref;
211
212 /* IDirect3DVolume8 fields */
213 IWineD3DVolume *wineD3DVolume;
214
215 /* The volume container */
216 IUnknown *container;
217
218 /* If set forward refcounting to this object */
219 IUnknown *forwardReference;
220 };
221
222 /* ------------------- */
223 /* IDirect3DSwapChain8 */
224 /* ------------------- */
225
226 /*****************************************************************************
227 * Predeclare the interface implementation structures
228 */
229 extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
230
231 /*****************************************************************************
232 * IDirect3DSwapChain8 implementation structure
233 */
234 struct IDirect3DSwapChain8Impl
235 {
236 /* IUnknown fields */
237 const IDirect3DSwapChain8Vtbl *lpVtbl;
238 LONG ref;
239
240 /* IDirect3DSwapChain8 fields */
241 IWineD3DSwapChain *wineD3DSwapChain;
242
243 /* Parent reference */
244 LPDIRECT3DDEVICE8 parentDevice;
245 };
246
247 /* ----------------- */
248 /* IDirect3DSurface8 */
249 /* ----------------- */
250
251 /*****************************************************************************
252 * Predeclare the interface implementation structures
253 */
254 extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
255
256 /*****************************************************************************
257 * IDirect3DSurface8 implementation structure
258 */
259 struct IDirect3DSurface8Impl
260 {
261 /* IUnknown fields */
262 const IDirect3DSurface8Vtbl *lpVtbl;
263 LONG ref;
264
265 /* IDirect3DSurface8 fields */
266 IWineD3DSurface *wineD3DSurface;
267
268 /* Parent reference */
269 LPDIRECT3DDEVICE8 parentDevice;
270
271 /* The surface container */
272 IUnknown *container;
273
274 /* If set forward refcounting to this object */
275 IUnknown *forwardReference;
276
277 /* Flags an implicit surface */
278 BOOL isImplicit;
279 };
280
281 /* ------------------ */
282 /* IDirect3DResource8 */
283 /* ------------------ */
284
285 /*****************************************************************************
286 * Predeclare the interface implementation structures
287 */
288 extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
289
290 /*****************************************************************************
291 * IDirect3DResource8 implementation structure
292 */
293 struct IDirect3DResource8Impl
294 {
295 /* IUnknown fields */
296 const IDirect3DResource8Vtbl *lpVtbl;
297 LONG ref;
298
299 /* IDirect3DResource8 fields */
300 IWineD3DResource *wineD3DResource;
301 };
302 extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
303
304 /* ---------------------- */
305 /* IDirect3DVertexBuffer8 */
306 /* ---------------------- */
307
308 /*****************************************************************************
309 * Predeclare the interface implementation structures
310 */
311 extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
312
313 /*****************************************************************************
314 * IDirect3DVertexBuffer8 implementation structure
315 */
316 struct IDirect3DVertexBuffer8Impl
317 {
318 /* IUnknown fields */
319 const IDirect3DVertexBuffer8Vtbl *lpVtbl;
320 LONG ref;
321
322 /* IDirect3DResource8 fields */
323 IWineD3DVertexBuffer *wineD3DVertexBuffer;
324
325 /* Parent reference */
326 LPDIRECT3DDEVICE8 parentDevice;
327 };
328
329 /* --------------------- */
330 /* IDirect3DIndexBuffer8 */
331 /* --------------------- */
332
333 /*****************************************************************************
334 * Predeclare the interface implementation structures
335 */
336 extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
337
338 /*****************************************************************************
339 * IDirect3DIndexBuffer8 implementation structure
340 */
341 struct IDirect3DIndexBuffer8Impl
342 {
343 /* IUnknown fields */
344 const IDirect3DIndexBuffer8Vtbl *lpVtbl;
345 LONG ref;
346
347 /* IDirect3DResource8 fields */
348 IWineD3DIndexBuffer *wineD3DIndexBuffer;
349
350 /* Parent reference */
351 LPDIRECT3DDEVICE8 parentDevice;
352 };
353
354 /* --------------------- */
355 /* IDirect3DBaseTexture8 */
356 /* --------------------- */
357
358 /*****************************************************************************
359 * IDirect3DBaseTexture8 implementation structure
360 */
361 struct IDirect3DBaseTexture8Impl
362 {
363 /* IUnknown fields */
364 const IDirect3DBaseTexture8Vtbl *lpVtbl;
365 LONG ref;
366
367 /* IDirect3DResource8 fields */
368 IWineD3DBaseTexture *wineD3DBaseTexture;
369 };
370
371 /* --------------------- */
372 /* IDirect3DCubeTexture8 */
373 /* --------------------- */
374
375 /*****************************************************************************
376 * Predeclare the interface implementation structures
377 */
378 extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
379
380 /*****************************************************************************
381 * IDirect3DCubeTexture8 implementation structure
382 */
383 struct IDirect3DCubeTexture8Impl
384 {
385 /* IUnknown fields */
386 const IDirect3DCubeTexture8Vtbl *lpVtbl;
387 LONG ref;
388
389 /* IDirect3DResource8 fields */
390 IWineD3DCubeTexture *wineD3DCubeTexture;
391
392 /* Parent reference */
393 LPDIRECT3DDEVICE8 parentDevice;
394 };
395
396 /* ----------------- */
397 /* IDirect3DTexture8 */
398 /* ----------------- */
399
400 /*****************************************************************************
401 * Predeclare the interface implementation structures
402 */
403 extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
404
405 /*****************************************************************************
406 * IDirect3DTexture8 implementation structure
407 */
408 struct IDirect3DTexture8Impl
409 {
410 /* IUnknown fields */
411 const IDirect3DTexture8Vtbl *lpVtbl;
412 LONG ref;
413
414 /* IDirect3DResourc8 fields */
415 IWineD3DTexture *wineD3DTexture;
416
417 /* Parent reference */
418 LPDIRECT3DDEVICE8 parentDevice;
419 };
420
421 /* ----------------------- */
422 /* IDirect3DVolumeTexture8 */
423 /* ----------------------- */
424
425 /*****************************************************************************
426 * Predeclare the interface implementation structures
427 */
428 extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
429
430 /*****************************************************************************
431 * IDirect3DVolumeTexture8 implementation structure
432 */
433 struct IDirect3DVolumeTexture8Impl
434 {
435 /* IUnknown fields */
436 const IDirect3DVolumeTexture8Vtbl *lpVtbl;
437 LONG ref;
438
439 /* IDirect3DResource8 fields */
440 IWineD3DVolumeTexture *wineD3DVolumeTexture;
441
442 /* Parent reference */
443 LPDIRECT3DDEVICE8 parentDevice;
444 };
445
446 /* ----------------------- */
447 /* IDirect3DStateBlockImpl */
448 /* ----------------------- */
449
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);
454
455 DEFINE_GUID(IID_IDirect3DVertexDeclaration8,
456 0x5dd7478d, 0xcbf3, 0x41a6, 0x8c, 0xfd, 0xfd, 0x19, 0x2b, 0x11, 0xc7, 0x90);
457
458 DEFINE_GUID(IID_IDirect3DVertexShader8,
459 0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
460
461 DEFINE_GUID(IID_IDirect3DPixelShader8,
462 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
463
464
465 /*****************************************************************************
466 * IDirect3DStateBlock8 interface
467 */
468 #define INTERFACE IDirect3DStateBlock8
469 DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
470 {
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;
479 };
480 #undef INTERFACE
481
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)
490
491 /*****************************************************************************
492 * Predeclare the interface implementation structures
493 */
494 extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
495
496 /*****************************************************************************
497 * IDirect3DStateBlock implementation structure
498 */
499 typedef struct IDirect3DStateBlock8Impl {
500 /* IUnknown fields */
501 const IDirect3DStateBlock8Vtbl *lpVtbl;
502 LONG ref;
503
504 /* IDirect3DResource8 fields */
505 IWineD3DStateBlock *wineD3DStateBlock;
506 } IDirect3DStateBlock8Impl;
507
508 /*****************************************************************************
509 * IDirect3DVertexDeclaration8 interface
510 */
511 #define INTERFACE IDirect3DVertexDeclaration8
512 DECLARE_INTERFACE_(IDirect3DVertexDeclaration8, IUnknown)
513 {
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;
518 };
519 #undef INTERFACE
520
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)
525
526 /*** Implementation ***/
527 extern const IDirect3DVertexDeclaration8Vtbl Direct3DVertexDeclaration8_Vtbl;
528
529 typedef struct {
530 const IDirect3DVertexDeclaration8Vtbl *lpVtbl;
531 LONG ref_count;
532
533 DWORD *elements;
534 DWORD elements_size; /* Size of elements, in bytes */
535
536 IWineD3DVertexDeclaration *wined3d_vertex_declaration;
537 DWORD shader_handle;
538 } IDirect3DVertexDeclaration8Impl;
539
540
541 /*****************************************************************************
542 * IDirect3DVertexShader8 interface
543 */
544 #define INTERFACE IDirect3DVertexShader8
545 DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
546 {
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;
551 };
552 #undef INTERFACE
553
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)
558
559 /* ------------------------- */
560 /* IDirect3DVertexShader8Impl */
561 /* ------------------------- */
562
563 /*****************************************************************************
564 * IDirect3DPixelShader8 interface
565 */
566 #define INTERFACE IDirect3DPixelShader8
567 DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
568 {
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;
573 };
574 #undef INTERFACE
575
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)
580
581 /*****************************************************************************
582 * Predeclare the interface implementation structures
583 */
584 extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
585
586 /*****************************************************************************
587 * IDirect3DVertexShader implementation structure
588 */
589
590 struct IDirect3DVertexShader8Impl {
591 const IDirect3DVertexShader8Vtbl *lpVtbl;
592 LONG ref;
593
594 IDirect3DVertexDeclaration8 *vertex_declaration;
595 IWineD3DVertexShader *wineD3DVertexShader;
596 };
597
598
599 /* ------------------------ */
600 /* IDirect3DPixelShaderImpl */
601 /* ------------------------ */
602
603
604 /*****************************************************************************
605 * Predeclare the interface implementation structures
606 */
607 extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
608
609 /*****************************************************************************
610 * IDirect3DPixelShader implementation structure
611 */
612 typedef struct IDirect3DPixelShader8Impl {
613 const IDirect3DPixelShader8Vtbl *lpVtbl;
614 LONG ref;
615
616 DWORD handle;
617 IWineD3DPixelShader *wineD3DPixelShader;
618 } IDirect3DPixelShader8Impl;
619
620 /**
621 * Internals functions
622 *
623 * to see how not defined it here
624 */
625 D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format);
626 WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format);
627 void load_local_constants(const DWORD *d3d8_elements, IWineD3DVertexShader *wined3d_vertex_shader);
628 UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3d8_elements_size, WINED3DVERTEXELEMENT **wined3d_elements);
629 size_t parse_token(const DWORD* pToken);
630
631 /* Callbacks */
632 extern ULONG WINAPI D3D8CB_DestroySwapChain (IWineD3DSwapChain *pSwapChain);
633 extern ULONG WINAPI D3D8CB_DestroyDepthStencilSurface (IWineD3DSurface *pSurface);
634 extern ULONG WINAPI D3D8CB_DestroyRenderTarget (IWineD3DSurface *pSurface);
635 extern ULONG WINAPI D3D8CB_DestroySurface(IWineD3DSurface *pSurface);
636 extern ULONG WINAPI D3D8CB_DestroyVolume(IWineD3DVolume *pVolume);
637
638 #endif /* __WINE_D3DX8_PRIVATE_H */
639
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.