wined3d: Split device creation and opengl initialization.
[wine] / dlls / d3d8 / d3d8_private.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef __WINE_D3D8_PRIVATE_H
24 #define __WINE_D3D8_PRIVATE_H
25
26 #ifndef __WINE_CONFIG_H
27 # error You must include config.h to use this header
28 #endif
29
30 #undef APIENTRY
31 #undef CALLBACK
32 #undef WINAPI
33
34 /* Redefines the constants */
35 #define CALLBACK    __stdcall
36 #define WINAPI      __stdcall
37 #define APIENTRY    WINAPI
38
39 #include <stdarg.h>
40
41 #define NONAMELESSUNION
42 #define NONAMELESSSTRUCT
43 #define COBJMACROS
44 #include "windef.h"
45 #include "winbase.h"
46 #include "wingdi.h"
47 #include "wine/debug.h"
48 #include "d3d8.h"
49 #include "wine/wined3d_interface.h"
50
51 /* Device caps */
52 #define MAX_SHADERS        64
53
54 /* CreateVertexShader can return > 0xFFFF */
55 #define VS_HIGHESTFIXEDFXF 0xF0000000
56
57 /* ===========================================================================
58     Macros
59    =========================================================================== */
60 /* Not nice, but it lets wined3d support different versions of directx */
61 #define D3D8CAPSTOWINECAPS(_pD3D8Caps, _pWineCaps) \
62     _pWineCaps->DeviceType                        = (WINED3DDEVTYPE *) &_pD3D8Caps->DeviceType; \
63     _pWineCaps->AdapterOrdinal                    = &_pD3D8Caps->AdapterOrdinal; \
64     _pWineCaps->Caps                              = &_pD3D8Caps->Caps; \
65     _pWineCaps->Caps2                             = &_pD3D8Caps->Caps2; \
66     _pWineCaps->Caps3                             = &_pD3D8Caps->Caps3; \
67     _pWineCaps->PresentationIntervals             = &_pD3D8Caps->PresentationIntervals; \
68     _pWineCaps->CursorCaps                        = &_pD3D8Caps->CursorCaps; \
69     _pWineCaps->DevCaps                           = &_pD3D8Caps->DevCaps; \
70     _pWineCaps->PrimitiveMiscCaps                 = &_pD3D8Caps->PrimitiveMiscCaps; \
71     _pWineCaps->RasterCaps                        = &_pD3D8Caps->RasterCaps; \
72     _pWineCaps->ZCmpCaps                          = &_pD3D8Caps->ZCmpCaps; \
73     _pWineCaps->SrcBlendCaps                      = &_pD3D8Caps->SrcBlendCaps; \
74     _pWineCaps->DestBlendCaps                     = &_pD3D8Caps->DestBlendCaps; \
75     _pWineCaps->AlphaCmpCaps                      = &_pD3D8Caps->AlphaCmpCaps; \
76     _pWineCaps->ShadeCaps                         = &_pD3D8Caps->ShadeCaps; \
77     _pWineCaps->TextureCaps                       = &_pD3D8Caps->TextureCaps; \
78     _pWineCaps->TextureFilterCaps                 = &_pD3D8Caps->TextureFilterCaps; \
79     _pWineCaps->CubeTextureFilterCaps             = &_pD3D8Caps->CubeTextureFilterCaps; \
80     _pWineCaps->VolumeTextureFilterCaps           = &_pD3D8Caps->VolumeTextureFilterCaps; \
81     _pWineCaps->TextureAddressCaps                = &_pD3D8Caps->TextureAddressCaps; \
82     _pWineCaps->VolumeTextureAddressCaps          = &_pD3D8Caps->VolumeTextureAddressCaps; \
83     _pWineCaps->LineCaps                          = &_pD3D8Caps->LineCaps; \
84     _pWineCaps->MaxTextureWidth                   = &_pD3D8Caps->MaxTextureWidth; \
85     _pWineCaps->MaxTextureHeight                  = &_pD3D8Caps->MaxTextureHeight; \
86     _pWineCaps->MaxVolumeExtent                   = &_pD3D8Caps->MaxVolumeExtent; \
87     _pWineCaps->MaxTextureRepeat                  = &_pD3D8Caps->MaxTextureRepeat; \
88     _pWineCaps->MaxTextureAspectRatio             = &_pD3D8Caps->MaxTextureAspectRatio; \
89     _pWineCaps->MaxAnisotropy                     = &_pD3D8Caps->MaxAnisotropy; \
90     _pWineCaps->MaxVertexW                        = &_pD3D8Caps->MaxVertexW; \
91     _pWineCaps->GuardBandLeft                     = &_pD3D8Caps->GuardBandLeft; \
92     _pWineCaps->GuardBandTop                      = &_pD3D8Caps->GuardBandTop; \
93     _pWineCaps->GuardBandRight                    = &_pD3D8Caps->GuardBandRight; \
94     _pWineCaps->GuardBandBottom                   = &_pD3D8Caps->GuardBandBottom; \
95     _pWineCaps->ExtentsAdjust                     = &_pD3D8Caps->ExtentsAdjust; \
96     _pWineCaps->StencilCaps                       = &_pD3D8Caps->StencilCaps; \
97     _pWineCaps->FVFCaps                           = &_pD3D8Caps->FVFCaps; \
98     _pWineCaps->TextureOpCaps                     = &_pD3D8Caps->TextureOpCaps; \
99     _pWineCaps->MaxTextureBlendStages             = &_pD3D8Caps->MaxTextureBlendStages; \
100     _pWineCaps->MaxSimultaneousTextures           = &_pD3D8Caps->MaxSimultaneousTextures; \
101     _pWineCaps->VertexProcessingCaps              = &_pD3D8Caps->VertexProcessingCaps; \
102     _pWineCaps->MaxActiveLights                   = &_pD3D8Caps->MaxActiveLights; \
103     _pWineCaps->MaxUserClipPlanes                 = &_pD3D8Caps->MaxUserClipPlanes; \
104     _pWineCaps->MaxVertexBlendMatrices            = &_pD3D8Caps->MaxVertexBlendMatrices; \
105     _pWineCaps->MaxVertexBlendMatrixIndex         = &_pD3D8Caps->MaxVertexBlendMatrixIndex; \
106     _pWineCaps->MaxPointSize                      = &_pD3D8Caps->MaxPointSize; \
107     _pWineCaps->MaxPrimitiveCount                 = &_pD3D8Caps->MaxPrimitiveCount; \
108     _pWineCaps->MaxVertexIndex                    = &_pD3D8Caps->MaxVertexIndex; \
109     _pWineCaps->MaxStreams                        = &_pD3D8Caps->MaxStreams; \
110     _pWineCaps->MaxStreamStride                   = &_pD3D8Caps->MaxStreamStride; \
111     _pWineCaps->VertexShaderVersion               = &_pD3D8Caps->VertexShaderVersion; \
112     _pWineCaps->MaxVertexShaderConst              = &_pD3D8Caps->MaxVertexShaderConst; \
113     _pWineCaps->PixelShaderVersion                = &_pD3D8Caps->PixelShaderVersion; \
114     _pWineCaps->PixelShader1xMaxValue             = &_pD3D8Caps->MaxPixelShaderValue;
115
116 /* Direct3D8 Interfaces: */
117 typedef struct IDirect3DBaseTexture8Impl IDirect3DBaseTexture8Impl;
118 typedef struct IDirect3DVolumeTexture8Impl IDirect3DVolumeTexture8Impl;
119 typedef struct IDirect3D8Impl IDirect3D8Impl;
120 typedef struct IDirect3DDevice8Impl IDirect3DDevice8Impl;
121 typedef struct IDirect3DTexture8Impl IDirect3DTexture8Impl;
122 typedef struct IDirect3DCubeTexture8Impl IDirect3DCubeTexture8Impl;
123 typedef struct IDirect3DIndexBuffer8Impl IDirect3DIndexBuffer8Impl;
124 typedef struct IDirect3DSurface8Impl IDirect3DSurface8Impl;
125 typedef struct IDirect3DSwapChain8Impl IDirect3DSwapChain8Impl;
126 typedef struct IDirect3DResource8Impl IDirect3DResource8Impl;
127 typedef struct IDirect3DVolume8Impl IDirect3DVolume8Impl;
128 typedef struct IDirect3DVertexBuffer8Impl IDirect3DVertexBuffer8Impl;
129
130 /** Private Interfaces: */
131 typedef struct IDirect3DStateBlockImpl IDirect3DStateBlockImpl;
132 typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
133 typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
134 typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
135
136 /* Advance declaration of structures to satisfy compiler */
137 typedef struct IDirect3DVertexShader8Impl IDirect3DVertexShader8Impl;
138
139 /* ===========================================================================
140     The interfactes themselves
141    =========================================================================== */
142
143 /* ---------- */
144 /* IDirect3D8 */
145 /* ---------- */
146
147 /*****************************************************************************
148  * Predeclare the interface implementation structures
149  */
150 extern const IDirect3D8Vtbl Direct3D8_Vtbl;
151
152 /*****************************************************************************
153  * IDirect3D implementation structure
154  */
155 struct IDirect3D8Impl
156 {
157     /* IUnknown fields */
158     const IDirect3D8Vtbl   *lpVtbl;
159     LONG                    ref;
160
161     /* The WineD3D device */
162     IWineD3D               *WineD3D;
163 };
164
165 /* ---------------- */
166 /* IDirect3DDevice8 */
167 /* ---------------- */
168
169 /*****************************************************************************
170  * Predeclare the interface implementation structures
171  */
172 extern const IDirect3DDevice8Vtbl Direct3DDevice8_Vtbl;
173
174 /*****************************************************************************
175  * IDirect3DDevice8 implementation structure
176  */
177 struct IDirect3DDevice8Impl
178 {
179     /* IUnknown fields */
180     const IDirect3DDevice8Vtbl   *lpVtbl;
181     LONG                         ref;
182 /* But what about baseVertexIndex in state blocks? hmm... it may be a better idea to pass this to wined3d */
183     IWineD3DDevice               *WineD3DDevice;
184     IDirect3DVertexShader8Impl   *vShaders[MAX_SHADERS];
185 /* FIXME: Move *baseVertexIndex somewhere sensible like wined3d */
186     UINT                          baseVertexIndex;
187 };
188
189 /* ---------------- */
190 /* IDirect3DVolume8 */
191 /* ---------------- */
192
193 /*****************************************************************************
194  * Predeclare the interface implementation structures
195  */
196 extern const IDirect3DVolume8Vtbl Direct3DVolume8_Vtbl;
197
198 /*****************************************************************************
199  * IDirect3DVolume8 implementation structure
200  */
201 struct IDirect3DVolume8Impl
202 {
203     /* IUnknown fields */
204     const IDirect3DVolume8Vtbl *lpVtbl;
205     LONG                        ref;
206
207     /* IDirect3DVolume8 fields */
208     IWineD3DVolume             *wineD3DVolume;
209 };
210
211 /* ------------------- */
212 /* IDirect3DSwapChain8 */
213 /* ------------------- */
214
215 /*****************************************************************************
216  * Predeclare the interface implementation structures
217  */
218 extern const IDirect3DSwapChain8Vtbl Direct3DSwapChain8_Vtbl;
219
220 /*****************************************************************************
221  * IDirect3DSwapChain8 implementation structure
222  */
223 struct IDirect3DSwapChain8Impl
224 {
225     /* IUnknown fields */
226     const IDirect3DSwapChain8Vtbl *lpVtbl;
227     LONG                           ref;
228
229     /* IDirect3DSwapChain8 fields */
230     IWineD3DSwapChain             *wineD3DSwapChain;
231 };
232
233 /* ----------------- */
234 /* IDirect3DSurface8 */
235 /* ----------------- */
236
237 /*****************************************************************************
238  * Predeclare the interface implementation structures
239  */
240 extern const IDirect3DSurface8Vtbl Direct3DSurface8_Vtbl;
241
242 /*****************************************************************************
243  * IDirect3DSurface8 implementation structure
244  */
245 struct IDirect3DSurface8Impl
246 {
247     /* IUnknown fields */
248     const IDirect3DSurface8Vtbl *lpVtbl;
249     LONG                         ref;
250
251     /* IDirect3DSurface8 fields */
252     IWineD3DSurface             *wineD3DSurface;
253 };
254
255 /* ------------------ */
256 /* IDirect3DResource8 */
257 /* ------------------ */
258
259 /*****************************************************************************
260  * Predeclare the interface implementation structures
261  */
262 extern const IDirect3DResource8Vtbl Direct3DResource8_Vtbl;
263
264 /*****************************************************************************
265  * IDirect3DResource8 implementation structure
266  */
267 struct IDirect3DResource8Impl
268 {
269     /* IUnknown fields */
270     const IDirect3DResource8Vtbl *lpVtbl;
271     LONG                          ref;
272
273     /* IDirect3DResource8 fields */
274     IWineD3DResource             *wineD3DResource;
275 };
276 extern HRESULT WINAPI IDirect3DResource8Impl_GetDevice(LPDIRECT3DRESOURCE8 iface, IDirect3DDevice8** ppDevice);
277
278 /* ---------------------- */
279 /* IDirect3DVertexBuffer8 */
280 /* ---------------------- */
281
282 /*****************************************************************************
283  * Predeclare the interface implementation structures
284  */
285 extern const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl;
286
287 /*****************************************************************************
288  * IDirect3DVertexBuffer8 implementation structure
289  */
290 struct IDirect3DVertexBuffer8Impl
291 {
292     /* IUnknown fields */
293     const IDirect3DVertexBuffer8Vtbl *lpVtbl;
294     LONG                              ref;
295
296     /* IDirect3DResource8 fields */
297     IWineD3DVertexBuffer             *wineD3DVertexBuffer;
298
299     /* Parent reference */
300     LPDIRECT3DDEVICE8                 parentDevice;
301 };
302
303 /* --------------------- */
304 /* IDirect3DIndexBuffer8 */
305 /* --------------------- */
306
307 /*****************************************************************************
308  * Predeclare the interface implementation structures
309  */
310 extern const IDirect3DIndexBuffer8Vtbl Direct3DIndexBuffer8_Vtbl;
311
312 /*****************************************************************************
313  * IDirect3DIndexBuffer8 implementation structure
314  */
315 struct IDirect3DIndexBuffer8Impl
316 {
317     /* IUnknown fields */
318     const IDirect3DIndexBuffer8Vtbl *lpVtbl;
319     LONG                             ref;
320
321     /* IDirect3DResource8 fields */
322     IWineD3DIndexBuffer             *wineD3DIndexBuffer;
323 };
324
325 /* --------------------- */
326 /* IDirect3DBaseTexture8 */
327 /* --------------------- */
328
329 /*****************************************************************************
330  * IDirect3DBaseTexture8 implementation structure
331  */
332 struct IDirect3DBaseTexture8Impl
333 {
334     /* IUnknown fields */
335     const IDirect3DBaseTexture8Vtbl *lpVtbl;
336     LONG                   ref;
337
338     /* IDirect3DResource8 fields */
339     IWineD3DBaseTexture             *wineD3DBaseTexture;
340 };
341
342 /* --------------------- */
343 /* IDirect3DCubeTexture8 */
344 /* --------------------- */
345
346 /*****************************************************************************
347  * Predeclare the interface implementation structures
348  */
349 extern const IDirect3DCubeTexture8Vtbl Direct3DCubeTexture8_Vtbl;
350
351 /*****************************************************************************
352  * IDirect3DCubeTexture8 implementation structure
353  */
354 struct IDirect3DCubeTexture8Impl
355 {
356     /* IUnknown fields */
357     const IDirect3DCubeTexture8Vtbl *lpVtbl;
358     LONG                   ref;
359
360     /* IDirect3DResource8 fields */
361     IWineD3DCubeTexture             *wineD3DCubeTexture;
362 };
363
364 /* ----------------- */
365 /* IDirect3DTexture8 */
366 /* ----------------- */
367
368 /*****************************************************************************
369  * Predeclare the interface implementation structures
370  */
371 extern const IDirect3DTexture8Vtbl Direct3DTexture8_Vtbl;
372
373 /*****************************************************************************
374  * IDirect3DTexture8 implementation structure
375  */
376 struct IDirect3DTexture8Impl
377 {
378     /* IUnknown fields */
379     const IDirect3DTexture8Vtbl *lpVtbl;
380     LONG                   ref;
381
382     /* IDirect3DResourc8 fields */
383     IWineD3DTexture             *wineD3DTexture;
384 };
385
386 /* ----------------------- */
387 /* IDirect3DVolumeTexture8 */
388 /* ----------------------- */
389
390 /*****************************************************************************
391  * Predeclare the interface implementation structures
392  */
393 extern const IDirect3DVolumeTexture8Vtbl Direct3DVolumeTexture8_Vtbl;
394
395 /*****************************************************************************
396  * IDirect3DVolumeTexture8 implementation structure
397  */
398 struct IDirect3DVolumeTexture8Impl
399 {
400     /* IUnknown fields */
401     const IDirect3DVolumeTexture8Vtbl *lpVtbl;
402     LONG                   ref;
403
404     /* IDirect3DResource8 fields */
405     IWineD3DVolumeTexture             *wineD3DVolumeTexture;
406 };
407
408 /* ----------------------- */
409 /* IDirect3DStateBlockImpl */
410 /* ----------------------- */
411
412 /* TODO: Generate a valid GUIDs */
413 /* {83B073CE-6F30-11d9-C687-00046142C14F} */
414 DEFINE_GUID(IID_IDirect3DStateBlock8, 
415 0x83b073ce, 0x6f30, 0x11d9, 0xc6, 0x87, 0x0, 0x4, 0x61, 0x42, 0xc1, 0x4f);
416
417 DEFINE_GUID(IID_IDirect3DVertexShader8,
418 0xefc5557e, 0x6265, 0x4613, 0x8a, 0x94, 0x43, 0x85, 0x78, 0x89, 0xeb, 0x36);
419
420 DEFINE_GUID(IID_IDirect3DPixelShader8,
421 0x6d3bdbdc, 0x5b02, 0x4415, 0xb8, 0x52, 0xce, 0x5e, 0x8b, 0xcc, 0xb2, 0x89);
422
423
424 /*****************************************************************************
425  * IDirect3DStateBlock8 interface
426  */
427 #define INTERFACE IDirect3DStateBlock8
428 DECLARE_INTERFACE_(IDirect3DStateBlock8, IUnknown)
429 {
430     /*** IUnknown methods ***/
431     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
432     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
433     STDMETHOD_(ULONG,Release)(THIS) PURE;
434     /*** IDirect3DStateBlock9 methods ***/
435     STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
436     STDMETHOD(Capture)(THIS) PURE;
437     STDMETHOD(Apply)(THIS) PURE;
438 };
439 #undef INTERFACE
440
441 /*** IUnknown methods ***/
442 #define IDirect3DStateBlock8_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
443 #define IDirect3DStateBlock8_AddRef(p)              (p)->lpVtbl->AddRef(p)
444 #define IDirect3DStateBlock8_Release(p)             (p)->lpVtbl->Release(p)
445 /*** IDirect3DStateBlock9 methods ***/
446 #define IDirect3DStateBlock8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
447 #define IDirect3DStateBlock8_Capture(p)             (p)->lpVtbl->Capture(p)
448 #define IDirect3DStateBlock8_Apply(p)               (p)->lpVtbl->Apply(p)
449
450 /*****************************************************************************
451  * Predeclare the interface implementation structures
452  */
453 extern const IDirect3DStateBlock8Vtbl Direct3DStateBlock8_Vtbl;
454
455 /*****************************************************************************
456  * IDirect3DStateBlock implementation structure
457  */
458 typedef struct  IDirect3DStateBlock8Impl {
459     /* IUnknown fields */
460     const IDirect3DStateBlock8Vtbl *lpVtbl;
461     LONG                   ref;
462
463     /* IDirect3DResource8 fields */
464     IWineD3DStateBlock             *wineD3DStateBlock;
465 } IDirect3DStateBlock8Impl;
466
467 /*****************************************************************************
468  * IDirect3DVertexShader9 interface
469  */
470 #define INTERFACE IDirect3DVertexShader8
471 DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
472 {
473     /*** IUnknown methods ***/
474     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
475     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
476     STDMETHOD_(ULONG,Release)(THIS) PURE;
477     /*** IDirect3DVertexShader9 methods ***/
478     STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
479     STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
480 };
481 #undef INTERFACE
482
483 /*** IUnknown methods ***/
484 #define IDirect3DVertexShader8_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
485 #define IDirect3DVertexShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
486 #define IDirect3DVertexShader8_Release(p)             (p)->lpVtbl->Release(p)
487 /*** IDirect3DVertexShader8 methods ***/
488 #define IDirect3DVertexShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
489 #define IDirect3DVertexShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
490
491 /* ------------------------- */
492 /* IDirect3DVertexShader8Impl */
493 /* ------------------------- */
494
495 /*****************************************************************************
496  * IDirect3DPixelShader9 interface
497  */
498 #define INTERFACE IDirect3DPixelShader8
499 DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
500 {
501     /*** IUnknown methods ***/
502     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
503     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
504     STDMETHOD_(ULONG,Release)(THIS) PURE;
505     /*** IDirect3DPixelShader8 methods ***/
506     STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
507     STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
508 };
509 #undef INTERFACE
510
511 /*** IUnknown methods ***/
512 #define IDirect3DPixelShader8_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
513 #define IDirect3DPixelShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
514 #define IDirect3DPixelShader8_Release(p)             (p)->lpVtbl->Release(p)
515 /*** IDirect3DPixelShader8 methods ***/
516 #define IDirect3DPixelShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
517 #define IDirect3DPixelShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
518
519
520 /*****************************************************************************
521  * Predeclare the interface implementation structures
522  */
523 extern const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl;
524
525 /*****************************************************************************
526  * IDirect3DVertexShader implementation structure
527  */
528
529 struct IDirect3DVertexShader8Impl {
530   const IDirect3DVertexShader8Vtbl *lpVtbl;
531   LONG ref;
532
533   IWineD3DVertexShader             *wineD3DVertexShader;
534
535   /* Parent reference */
536   LPDIRECT3DDEVICE8                 parentDevice;
537 };
538
539
540 /* ------------------------ */
541 /* IDirect3DPixelShaderImpl */
542 /* ------------------------ */
543
544
545 /*****************************************************************************
546  * Predeclare the interface implementation structures
547  */
548 extern const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl;
549
550 /*****************************************************************************
551  * IDirect3DPixelShader implementation structure
552  */
553 typedef struct IDirect3DPixelShader8Impl {
554     const IDirect3DPixelShader8Vtbl *lpVtbl;
555     LONG                             ref;
556
557     /* The device, to be replaced by an IDirect3DDeviceImpl */
558     IWineD3DPixelShader             *wineD3DPixelShader;
559 } IDirect3DPixelShader8Impl;
560
561 /**
562  * Internals functions
563  *
564  * to see how not defined it here
565  */ 
566  
567 /* Callbacks */
568 extern HRESULT WINAPI D3D8CB_CreateSurface(IUnknown *device, UINT Width, UINT Height, 
569                                          WINED3DFORMAT Format, DWORD Usage, WINED3DPOOL Pool, UINT Level,
570                                          IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
571
572 extern HRESULT WINAPI D3D8CB_CreateVolume(IUnknown  *pDevice, UINT Width, UINT Height, UINT Depth, 
573                                           WINED3DFORMAT  Format, WINED3DPOOL Pool, DWORD Usage,
574                                           IWineD3DVolume **ppVolume, 
575                                           HANDLE   * pSharedHandle);
576
577 extern HRESULT WINAPI D3D8CB_CreateDepthStencilSurface(IUnknown *device, UINT Width, UINT Height,
578                                          WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
579                                          DWORD MultisampleQuality, BOOL Discard,
580                                          IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
581
582 extern HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height,
583                                          WINED3DFORMAT Format, WINED3DMULTISAMPLE_TYPE MultiSample,
584                                          DWORD MultisampleQuality, BOOL Lockable, 
585                                          IWineD3DSurface** ppSurface, HANDLE* pSharedHandle);
586
587 #endif /* __WINE_D3DX8_PRIVATE_H */