Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/D3D8Interceptor/Direct3DDevice8Functions.cpp
2 views
1
#include "d3d8Wrapper.h"
2
3
extern "C"
4
{
5
namespace D3D8Wrapper
6
{
7
ThreadSafePointerSet IDirect3DDevice8::m_List;
8
9
D3D8Wrapper::IDirect3DDevice8::IDirect3DDevice8(D3D8Base::IDirect3DDevice8* realDevice) : IDirect3DUnknown((IUnknown*) realDevice)
10
{
11
LOG("IDirect3DDevice8::IDirect3DDevice8( " << realDevice << " )\n");
12
m_pDevice = realDevice;
13
}
14
15
D3D8Wrapper::IDirect3DDevice8* D3D8Wrapper::IDirect3DDevice8::GetDirect3DDevice(D3D8Base::IDirect3DDevice8* realDevice)
16
{
17
LOG("IDirect3DDevice8::GetDirect3DDevice( " << realDevice << " )\n");
18
D3D8Wrapper::IDirect3DDevice8* wrappedDevice = (D3D8Wrapper::IDirect3DDevice8*) m_List.GetDataPtr(realDevice);
19
if(wrappedDevice == NULL)
20
{
21
wrappedDevice = new D3D8Wrapper::IDirect3DDevice8(realDevice);
22
m_List.AddMember(realDevice, wrappedDevice);
23
return wrappedDevice;
24
}
25
26
wrappedDevice->m_ulRef++;
27
return wrappedDevice;
28
}
29
30
STDMETHODIMP_(ULONG) D3D8Wrapper::IDirect3DDevice8::Release(THIS)
31
{
32
LOG("IDirect3DDevice8::Release() [ " << this << " ]\n");
33
m_pUnk->Release();
34
35
ULONG ulRef = --m_ulRef;
36
37
if(ulRef == 0)
38
{
39
m_List.DeleteMember(GetD3D8Device());
40
delete this;
41
return NULL;
42
}
43
return ulRef;
44
}
45
46
47
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::TestCooperativeLevel()
48
{
49
LOG("IDirect3DDevice8::TestCooperativeLevel() [ " << this << " ]\n");
50
return m_pDevice->TestCooperativeLevel();
51
}
52
53
STDMETHODIMP_(UINT) D3D8Wrapper::IDirect3DDevice8::GetAvailableTextureMem()
54
{
55
LOG("IDirect3DDevice8::GetAvailableTextureMem() [ " << this << " ]\n");
56
return m_pDevice->GetAvailableTextureMem();
57
}
58
59
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ResourceManagerDiscardBytes(DWORD Bytes)
60
{
61
LOG("IDirect3DDevice8::ResourceManagerDiscardBytes( " << Bytes << " ) [ " << this << " ]\n");
62
return m_pDevice->ResourceManagerDiscardBytes(Bytes);
63
}
64
65
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDirect3D(D3D8Wrapper::IDirect3D8** ppD3D8)
66
{
67
LOG("IDirect3DDevice8::GetDirect3D( " << ppD3D8 << " ) [ " << this << " ]\n");
68
69
// Run the function and wrap the result before returning it
70
D3D8Base::IDirect3D8* realD3D = NULL;
71
72
HRESULT hr = m_pDevice->GetDirect3D(&realD3D);
73
74
D3D8Wrapper::IDirect3D8* wrappedD3D = D3D8Wrapper::IDirect3D8::GetDirect3D(realD3D);
75
76
*ppD3D8 = wrappedD3D;
77
78
return hr;
79
}
80
81
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDeviceCaps(D3D8Base::D3DCAPS8* pCaps)
82
{
83
LOG("IDirect3DDevice8::GetDeviceCaps( " << pCaps << " ) [ " << this << " ]\n");
84
return m_pDevice->GetDeviceCaps(pCaps);
85
}
86
87
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDisplayMode(D3D8Base::D3DDISPLAYMODE* pMode)
88
{
89
LOG("IDirect3DDevice8::GetDisplayMode( " << pMode << " ) [ " << this << " ]\n");
90
return m_pDevice->GetDisplayMode(pMode);
91
}
92
93
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetCreationParameters(D3D8Base::D3DDEVICE_CREATION_PARAMETERS *pParameters)
94
{
95
LOG("IDirect3DDevice8::GetCreationParameters( " << pParameters << " ) [ " << this << " ]\n");
96
return m_pDevice->GetCreationParameters(pParameters);
97
}
98
99
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetCursorProperties(UINT XHotSpot,UINT YHotSpot,D3D8Wrapper::IDirect3DSurface8* pCursorBitmap)
100
{
101
LOG("IDirect3DDevice8::SetCursorProperties( " << XHotSpot << " , " << YHotSpot << " , " << pCursorBitmap << " ) [ " << this << " ]\n");
102
if (pCursorBitmap == NULL)
103
{
104
return m_pDevice->SetCursorProperties(XHotSpot,YHotSpot,NULL);
105
}
106
else
107
{
108
return m_pDevice->SetCursorProperties(XHotSpot,YHotSpot,pCursorBitmap->GetSurface());
109
}
110
}
111
112
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::SetCursorPosition(int X,int Y,DWORD Flags)
113
{
114
LOG("IDirect3DDevice8::SetCursorPosition( " << X << " , " << Y << " , " << Flags << " ) [ " << this << " ]\n");
115
m_pDevice->SetCursorPosition(X,Y,Flags);
116
}
117
118
STDMETHODIMP_(BOOL) D3D8Wrapper::IDirect3DDevice8::ShowCursor(BOOL bShow)
119
{
120
LOG("IDirect3DDevice8::ShowCursor( " << bShow << " ) [ " << this << " ]\n");
121
return m_pDevice->ShowCursor(bShow);
122
}
123
124
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateAdditionalSwapChain(D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters,D3D8Wrapper::IDirect3DSwapChain8** pSwapChain)
125
{
126
LOG("IDirect3DDevice8::CreateAdditionalSwapChain( " << pPresentationParameters << " , " << pSwapChain << " ) [ " << this << " ]\n");
127
D3D8Base::IDirect3DSwapChain8* realD3D = NULL;
128
129
HRESULT hr = m_pDevice->CreateAdditionalSwapChain(pPresentationParameters,&realD3D);
130
131
D3D8Wrapper::IDirect3DSwapChain8* wrappedD3D = new D3D8Wrapper::IDirect3DSwapChain8(realD3D);
132
133
*pSwapChain = wrappedD3D;
134
135
return hr;
136
}
137
138
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Reset(D3D8Base::D3DPRESENT_PARAMETERS* pPresentationParameters)
139
{
140
LOG("IDirect3DDevice8::Reset( " << pPresentationParameters << " ) [ " << this << " ]\n");
141
return m_pDevice->Reset(pPresentationParameters);
142
}
143
144
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Present(CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
145
{
146
#ifdef LOGGING
147
LOG("IDirect3DDevice8::Present( " << pSourceRect);
148
if (pSourceRect != NULL)
149
{
150
LOG("{ " << pSourceRect->left << " , " << pSourceRect->top << " , " << pSourceRect->right << " , " << pSourceRect->bottom << " }");
151
}
152
LOG(" , " << pDestRect);
153
if (pSourceRect != NULL)
154
{
155
LOG("{ " << pDestRect->left << " , " << pDestRect->top << " , " << pDestRect->right << " , " << pDestRect->bottom << " }");
156
}
157
LOG(" , " << hDestWindowOverride << " , " << pDirtyRegion << " ) [ " << this << " ]\n");
158
#endif
159
// Force the result to OK
160
HRESULT hr = D3D_OK;
161
162
// Don't call the real present
163
//hr = m_pDevice->Present(pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion);
164
165
// Let bizhawk know the frame is ready
166
rendering_callback(0);
167
168
return hr;
169
}
170
171
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetBackBuffer(UINT BackBuffer,D3D8Base::D3DBACKBUFFER_TYPE Type,D3D8Wrapper::IDirect3DSurface8** ppBackBuffer)
172
{
173
LOG("IDirect3DDevice8::GetBackBuffer( " << BackBuffer << " , " << Type << " , " << ppBackBuffer << " ) [ " << this << " ]\n");
174
175
/*
176
D3D8Base::IDirect3DSurface8* realD3D = NULL;
177
178
HRESULT hr = m_pDevice->GetBackBuffer(BackBuffer,Type,&realD3D);
179
180
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
181
*/
182
183
// Return a pointer to our render surface, not the back buffer
184
*ppBackBuffer = render_surface;// wrappedD3D;
185
render_surface->m_ulRef++;
186
187
return S_OK;
188
}
189
190
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRasterStatus(D3D8Base::D3DRASTER_STATUS* pRasterStatus)
191
{
192
LOG("IDirect3DDevice8::GetRasterStatus( " << pRasterStatus << " ) [ " << this << " ]\n");
193
return m_pDevice->GetRasterStatus(pRasterStatus);
194
}
195
196
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::SetGammaRamp(DWORD Flags,CONST D3D8Base::D3DGAMMARAMP* pRamp)
197
{
198
LOG("IDirect3DDevice8::SetGammaRamp( " << Flags << " , " << pRamp << " ) [ " << this << " ]\n");
199
m_pDevice->SetGammaRamp(Flags,pRamp);
200
}
201
202
STDMETHODIMP_(void) D3D8Wrapper::IDirect3DDevice8::GetGammaRamp(D3D8Base::D3DGAMMARAMP* pRamp)
203
{
204
LOG("IDirect3DDevice8::GetGammaRamp( " << pRamp << " ) [ " << this << " ]\n");
205
m_pDevice->GetGammaRamp(pRamp);
206
}
207
208
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateTexture(UINT Width,UINT Height,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DTexture8** ppTexture)
209
{
210
LOG("IDirect3DDevice8::CreateTexture( " << Width << " , " << Height << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppTexture << " ) [ " << this << " ]\n");
211
212
D3D8Base::IDirect3DTexture8* realD3D = NULL;
213
214
HRESULT hr = m_pDevice->CreateTexture(Width,Height,Levels,Usage,Format,Pool,&realD3D);
215
216
D3D8Wrapper::IDirect3DTexture8* wrappedD3D = D3D8Wrapper::IDirect3DTexture8::GetTexture(realD3D);
217
218
*ppTexture = wrappedD3D;
219
220
return hr;
221
}
222
223
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVolumeTexture(UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVolumeTexture8** ppVolumeTexture)
224
{
225
LOG("IDirect3DDevice8::CreateVolumeTexture( " << Width << " , " << Height << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppVolumeTexture << " ) [ " << this << " ]\n");
226
227
D3D8Base::IDirect3DVolumeTexture8* realD3D = NULL;
228
229
HRESULT hr = m_pDevice->CreateVolumeTexture(Width,Height,Depth,Levels,Usage,Format,Pool,&realD3D);
230
231
D3D8Wrapper::IDirect3DVolumeTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DVolumeTexture8(realD3D);
232
233
*ppVolumeTexture = wrappedD3D;
234
235
return hr;
236
}
237
238
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateCubeTexture(UINT EdgeLength,UINT Levels,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DCubeTexture8** ppCubeTexture)
239
{
240
LOG("IDirect3DDevice8::CreateCubeTexture( " << EdgeLength << " , " << Levels << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppCubeTexture << " ) [ " << this << " ]\n");
241
242
D3D8Base::IDirect3DCubeTexture8* realD3D = NULL;
243
244
HRESULT hr = m_pDevice->CreateCubeTexture(EdgeLength,Levels, Usage,Format,Pool,&realD3D);
245
246
D3D8Wrapper::IDirect3DCubeTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DCubeTexture8(realD3D);
247
248
*ppCubeTexture = wrappedD3D;
249
250
return hr;
251
}
252
253
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVertexBuffer(UINT Length,DWORD Usage,DWORD FVF,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DVertexBuffer8** ppVertexBuffer)
254
{
255
LOG("IDirect3DDevice8::CreateVertexBuffer( " << Length << " , " << Usage << " , " << FVF << " , " << Pool << " , " << ppVertexBuffer << " ) [ " << this << " ]\n");
256
257
D3D8Base::IDirect3DVertexBuffer8* realD3D = NULL;
258
259
HRESULT hr = m_pDevice->CreateVertexBuffer(Length,Usage,FVF,Pool,&realD3D);
260
261
D3D8Wrapper::IDirect3DVertexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DVertexBuffer8(realD3D);
262
263
*ppVertexBuffer = wrappedD3D;
264
265
return hr;
266
}
267
268
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateIndexBuffer(UINT Length,DWORD Usage,D3D8Base::D3DFORMAT Format,D3D8Base::D3DPOOL Pool,D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexBuffer)
269
{
270
LOG("IDirect3DDevice8::CreateIndexBuffer( " << Length << " , " << Usage << " , " << Format << " , " << Pool << " , " << ppIndexBuffer << " ) [ " << this << " ]\n");
271
272
D3D8Base::IDirect3DIndexBuffer8* realD3D = NULL;
273
274
HRESULT hr = m_pDevice->CreateIndexBuffer(Length,Usage,Format,Pool,&realD3D);
275
276
D3D8Wrapper::IDirect3DIndexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DIndexBuffer8(realD3D);
277
278
*ppIndexBuffer = wrappedD3D;
279
280
return hr;
281
}
282
283
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateRenderTarget(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,D3D8Wrapper::IDirect3DSurface8** ppSurface)
284
{
285
LOG("IDirect3DDevice8::CreateRenderTarget( " << Width << " , " << Height << " , " << Format << " , " << MultiSample << " , " << Lockable << " , " << ppSurface << " ) [ " << this << " ]\n");
286
287
D3D8Base::IDirect3DSurface8* realD3D = NULL;
288
289
HRESULT hr = m_pDevice->CreateRenderTarget(Width,Height,Format,MultiSample,Lockable,&realD3D);
290
291
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
292
293
*ppSurface = wrappedD3D;
294
295
return hr;
296
}
297
298
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateDepthStencilSurface(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Base::D3DMULTISAMPLE_TYPE MultiSample,D3D8Wrapper::IDirect3DSurface8** ppSurface)
299
{
300
LOG("IDirect3DDevice8::CreateDepthStencilSurface( " << Width << " , " << Height << " , " << Format << " , " << MultiSample << " , " << ppSurface << " ) [ " << this << " ]\n");
301
302
D3D8Base::IDirect3DSurface8* realD3D = NULL;
303
304
HRESULT hr = m_pDevice->CreateDepthStencilSurface(Width,Height,Format,MultiSample,&realD3D);
305
306
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
307
308
*ppSurface = wrappedD3D;
309
310
return hr;
311
}
312
313
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateImageSurface(UINT Width,UINT Height,D3D8Base::D3DFORMAT Format,D3D8Wrapper::IDirect3DSurface8** ppSurface)
314
{
315
LOG("IDirect3DDevice8::CreateImageSurface( " << Width << " , " << Height << " , " << Format << " , " << ppSurface << " ) [ " << this << " ]\n");
316
317
D3D8Base::IDirect3DSurface8* realD3D = NULL;
318
319
HRESULT hr = m_pDevice->CreateImageSurface(Width,Height,Format,&realD3D);
320
321
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
322
323
*ppSurface = wrappedD3D;
324
325
return hr;
326
}
327
328
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CopyRects(D3D8Wrapper::IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,D3D8Wrapper::IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray)
329
{
330
LOG("IDirect3DDevice8::CopyRects( " << pSourceSurface << " , " << pSourceRectsArray << " , " << cRects << " , " << pDestinationSurface << " , " << pDestPointsArray << " ) [ " << this << " ]\n");
331
332
D3D8Base::IDirect3DSurface8* source;
333
if (pSourceSurface == NULL)
334
{
335
source = NULL;
336
}
337
else
338
{
339
source = pSourceSurface->GetSurface();
340
}
341
342
D3D8Base::IDirect3DSurface8* destination;
343
if (pDestinationSurface == NULL)
344
{
345
destination = NULL;
346
}
347
else
348
{
349
destination = pDestinationSurface->GetSurface();
350
}
351
352
if (pSourceSurface->m_ulRef == 0 || source == destination)
353
{
354
return D3DERR_INVALIDCALL;
355
}
356
357
return m_pDevice->CopyRects(source,pSourceRectsArray,cRects,destination,pDestPointsArray);
358
}
359
360
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::UpdateTexture(D3D8Wrapper::IDirect3DBaseTexture8* pSourceTexture,D3D8Wrapper::IDirect3DBaseTexture8* pDestinationTexture)
361
{
362
LOG("IDirect3DDevice8::UpdateTexture( " << pSourceTexture << " , " << pDestinationTexture << " ) [ " << this << " ]\n");
363
D3D8Base::IDirect3DBaseTexture8* source;
364
if (pSourceTexture == NULL)
365
{
366
source = NULL;
367
}
368
else
369
{
370
source = pSourceTexture->GetBaseTexture();
371
}
372
373
D3D8Base::IDirect3DBaseTexture8* destination;
374
if (pDestinationTexture == NULL)
375
{
376
destination = NULL;
377
}
378
else
379
{
380
destination = pDestinationTexture->GetBaseTexture();
381
}
382
383
return m_pDevice->UpdateTexture(source,destination);
384
}
385
386
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetFrontBuffer(D3D8Wrapper::IDirect3DSurface8* pDestSurface)
387
{
388
LOG("IDirect3DDevice8::GetFrontBuffer( " << pDestSurface << " ) [ " << this << " ]\n");
389
if (pDestSurface == NULL)
390
{
391
return m_pDevice->GetFrontBuffer(NULL);
392
}
393
else
394
{
395
return m_pDevice->GetFrontBuffer(pDestSurface->GetSurface());
396
}
397
}
398
399
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetRenderTarget(D3D8Wrapper::IDirect3DSurface8* pRenderTarget,D3D8Wrapper::IDirect3DSurface8* pNewZStencil)
400
{
401
LOG("IDirect3DDevice8::SetRenderTarget( " << pRenderTarget << " , " << pNewZStencil << " ) [ " << this << " ]\n");
402
403
//HRESULT hr = m_pDevice->SetRenderTarget(pRenderTarget->GetSurface(),pNewZStencil->GetSurface());
404
HRESULT hr = m_pDevice->SetRenderTarget(render_surface->GetSurface(),pNewZStencil->GetSurface());
405
406
pRenderTarget->m_ulRef++;
407
pNewZStencil->m_ulRef++;
408
409
return hr;
410
}
411
412
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRenderTarget(D3D8Wrapper::IDirect3DSurface8** ppRenderTarget)
413
{
414
LOG("IDirect3DDevice8::GetRenderTarget( " << ppRenderTarget << " ) [ " << this << " ]\n");
415
416
D3D8Base::IDirect3DSurface8* realD3D = NULL;
417
418
HRESULT hr = m_pDevice->GetRenderTarget(&realD3D);
419
420
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
421
422
*ppRenderTarget = wrappedD3D;
423
424
return hr;
425
}
426
427
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetDepthStencilSurface(D3D8Wrapper::IDirect3DSurface8** ppZStencilSurface)
428
{
429
LOG("IDirect3DDevice8::GetDepthStencilSurface( " << ppZStencilSurface << " ) [ " << this << " ]\n");
430
431
D3D8Base::IDirect3DSurface8* realD3D = NULL;
432
433
HRESULT hr = m_pDevice->GetDepthStencilSurface(&realD3D);
434
435
D3D8Wrapper::IDirect3DSurface8* wrappedD3D = D3D8Wrapper::IDirect3DSurface8::GetSurface(realD3D);
436
437
*ppZStencilSurface = wrappedD3D;
438
439
return hr;
440
}
441
442
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::BeginScene()
443
{
444
LOG("IDirect3DDevice8::BeginScene() [ " << this << " ]\n");
445
return m_pDevice->BeginScene();
446
}
447
448
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::EndScene()
449
{
450
LOG("IDirect3DDevice8::EndScene() [ " << this << " ]\n");
451
return m_pDevice->EndScene();
452
}
453
454
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::Clear(DWORD Count,CONST D3D8Base::D3DRECT* pRects,DWORD Flags,D3D8Base::D3DCOLOR Color,float Z,DWORD Stencil)
455
{
456
#ifdef LOGGING
457
LOG("IDirect3DDevice8::Clear( " << Count << " , " << pRects);
458
if (pRects != NULL)
459
{
460
LOG("{ " << pRects->x1 << " , " << pRects->y1 << " , " << pRects->x2 << " , " << pRects->y2 << " }")
461
}
462
LOG(" , " << Flags << " , " << Color << " , " << Z << " , " << Stencil << " ) [ " << this << " ]\n");
463
#endif
464
465
return m_pDevice->Clear(Count,pRects,Flags,Color,Z,Stencil);
466
}
467
468
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTransform(D3D8Base::D3DTRANSFORMSTATETYPE State,CONST D3D8Base::D3DMATRIX* pMatrix)
469
{
470
LOG("IDirect3DDevice8::SetTransform( " << State << " , " << pMatrix << " ) [ " << this << " ]\n");
471
return m_pDevice->SetTransform(State,pMatrix);
472
}
473
474
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTransform(D3D8Base::D3DTRANSFORMSTATETYPE State,D3D8Base::D3DMATRIX* pMatrix)
475
{
476
LOG("IDirect3DDevice8::GetTransform( " << State << " , " << pMatrix << " ) [ " << this << " ]\n");
477
return m_pDevice->GetTransform(State,pMatrix);
478
}
479
480
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::MultiplyTransform(D3D8Base::D3DTRANSFORMSTATETYPE foo,CONST D3D8Base::D3DMATRIX* bar)
481
{
482
LOG("IDirect3DDevice8::MultiplyTransform( " << foo << " , " << bar << " ) [ " << this << " ]\n");
483
return m_pDevice->MultiplyTransform(foo, bar);
484
}
485
486
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetViewport(CONST D3D8Base::D3DVIEWPORT8* pViewport)
487
{
488
LOG("IDirect3DDevice8::SetViewport( " << pViewport << " ) [ " << this << " ]\n");
489
return m_pDevice->SetViewport(pViewport);
490
}
491
492
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetViewport(D3D8Base::D3DVIEWPORT8* pViewport)
493
{
494
#ifdef LOGGING
495
LOG("IDirect3DDevice8::GetViewport( " << pViewport);
496
if (pViewport != NULL)
497
{
498
LOG("{ " << pViewport->X << " , " << pViewport->Y << " , " << pViewport->Width << " , " << pViewport->Height << " , " << pViewport->MinZ << " , " << pViewport->MaxZ << " }");
499
}
500
LOG(" ) [ " << this << " ]\n");
501
#endif
502
return m_pDevice->GetViewport(pViewport);
503
}
504
505
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetMaterial(CONST D3D8Base::D3DMATERIAL8* pMaterial)
506
{
507
LOG("IDirect3DDevice8::SetMaterial( " << pMaterial << " ) [ " << this << " ]\n");
508
return m_pDevice->SetMaterial(pMaterial);
509
}
510
511
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetMaterial(D3D8Base::D3DMATERIAL8* pMaterial)
512
{
513
LOG("IDirect3DDevice8::GetMaterial( " << pMaterial << " ) [ " << this << " ]\n");
514
return m_pDevice->GetMaterial(pMaterial);
515
}
516
517
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetLight(DWORD Index,CONST D3D8Base::D3DLIGHT8* foo)
518
{
519
LOG("IDirect3DDevice8::SetLight( " << Index << " , " << foo << " ) [ " << this << " ]\n");
520
return m_pDevice->SetLight(Index,foo);
521
}
522
523
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetLight(DWORD Index,D3D8Base::D3DLIGHT8* foo)
524
{
525
LOG("IDirect3DDevice8::GetLight( " << Index << " , " << foo << " ) [ " << this << " ]\n");
526
return m_pDevice->GetLight(Index,foo);
527
}
528
529
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::LightEnable(DWORD Index,BOOL Enable)
530
{
531
LOG("IDirect3DDevice8::LightEnable( " << Index << " , " << Enable << " ) [ " << this << " ]\n");
532
return m_pDevice->LightEnable(Index,Enable);
533
}
534
535
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetLightEnable(DWORD Index,BOOL* pEnable)
536
{
537
LOG("IDirect3DDevice8::GetLightEnable( " << Index << " , " << pEnable << " ) [ " << this << " ]\n");
538
return m_pDevice->GetLightEnable(Index,pEnable);
539
}
540
541
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetClipPlane(DWORD Index,CONST float* pPlane)
542
{
543
LOG("IDirect3DDevice8::SetClipPlane( " << Index << " , " << pPlane << " ) [ " << this << " ]\n");
544
return m_pDevice->SetClipPlane(Index,pPlane);
545
}
546
547
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetClipPlane(DWORD Index,float* pPlane)
548
{
549
LOG("IDirect3DDevice8::GetClipPlane( " << Index << " , " << pPlane << " ) [ " << this << " ]\n");
550
return m_pDevice->GetClipPlane(Index,pPlane);
551
}
552
553
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetRenderState(D3D8Base::D3DRENDERSTATETYPE State,DWORD Value)
554
{
555
LOG("IDirect3DDevice8::SetRenderState( " << State << " , " << Value << " ) [ " << this << " ]\n");
556
return m_pDevice->SetRenderState(State,Value);
557
}
558
559
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetRenderState(D3D8Base::D3DRENDERSTATETYPE State,DWORD* pValue)
560
{
561
LOG("IDirect3DDevice8::GetRenderState( " << State << " , " << pValue << " ) [ " << this << " ]\n");
562
return m_pDevice->GetRenderState(State,pValue);
563
}
564
565
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::BeginStateBlock()
566
{
567
LOG("IDirect3DDevice8::BeginStateBlock() [ " << this << " ]\n");
568
return m_pDevice->BeginStateBlock();
569
}
570
571
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::EndStateBlock(DWORD* pToken)
572
{
573
LOG("IDirect3DDevice8::EndStateBlock( " << pToken << " ) [ " << this << " ]\n");
574
return m_pDevice->EndStateBlock(pToken);
575
}
576
577
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ApplyStateBlock(DWORD Token)
578
{
579
LOG("IDirect3DDevice8::ApplyStateBlock( " << Token << " ) [ " << this << " ]\n");
580
return m_pDevice->ApplyStateBlock(Token);
581
}
582
583
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CaptureStateBlock(DWORD Token)
584
{
585
LOG("IDirect3DDevice8::CaptureStateBlock( " << Token << " ) [ " << this << " ]\n");
586
return m_pDevice->CaptureStateBlock(Token);
587
}
588
589
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeleteStateBlock(DWORD Token)
590
{
591
LOG("IDirect3DDevice8::DeleteStateBlock( " << Token << " ) [ " << this << " ]\n");
592
return m_pDevice->DeleteStateBlock(Token);
593
}
594
595
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateStateBlock(D3D8Base::D3DSTATEBLOCKTYPE Type,DWORD* pToken)
596
{
597
LOG("IDirect3DDevice8::CreateStateBlock( " << Type << " , " << pToken << " ) [ " << this << " ]\n");
598
return m_pDevice->CreateStateBlock(Type,pToken);
599
}
600
601
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetClipStatus(CONST D3D8Base::D3DCLIPSTATUS8* pClipStatus)
602
{
603
LOG("IDirect3DDevice8::SetClipStatus( " << pClipStatus << " ) [ " << this << " ]\n");
604
return m_pDevice->SetClipStatus(pClipStatus);
605
}
606
607
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetClipStatus(D3D8Base::D3DCLIPSTATUS8* pClipStatus)
608
{
609
LOG("IDirect3DDevice8::GetClipStatus( " << pClipStatus << " ) [ " << this << " ]\n");
610
return m_pDevice->GetClipStatus(pClipStatus);
611
}
612
613
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTexture(DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8** ppTexture)
614
{
615
LOG("IDirect3DDevice8::GetTexture( " << Stage << " , " << ppTexture << " ) [ " << this << " ]\n");
616
617
D3D8Base::IDirect3DBaseTexture8* realD3D = NULL;
618
619
HRESULT hr = m_pDevice->GetTexture(Stage,&realD3D);//ppTexture);
620
621
D3D8Wrapper::IDirect3DBaseTexture8* wrappedD3D = new D3D8Wrapper::IDirect3DBaseTexture8(realD3D);
622
623
*ppTexture = wrappedD3D;
624
625
return hr;
626
}
627
628
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTexture(DWORD Stage,D3D8Wrapper::IDirect3DBaseTexture8* pTexture)
629
{
630
LOG("IDirect3DDevice8::SetTexture( " << Stage << " , " << pTexture << " ) [ " << this << " ]\n");
631
632
if (pTexture == NULL)
633
{
634
return m_pDevice->SetTexture(Stage,NULL);
635
}
636
else
637
{
638
return m_pDevice->SetTexture(Stage,pTexture->GetBaseTexture());
639
}
640
}
641
642
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetTextureStageState(DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue)
643
{
644
LOG("IDirect3DDevice8::GetTextureStageState( " << Stage << " , " << Type << " , " << pValue << " ) [ " << this << " ]\n");
645
return m_pDevice->GetTextureStageState(Stage,Type,pValue);
646
}
647
648
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetTextureStageState(DWORD Stage,D3D8Base::D3DTEXTURESTAGESTATETYPE Type,DWORD Value)
649
{
650
LOG("IDirect3DDevice8::SetTextureStageState( " << Stage << " , " << Type << " , " << Value << " ) [ " << this << " ]\n");
651
return m_pDevice->SetTextureStageState(Stage,Type,Value);
652
}
653
654
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ValidateDevice(DWORD* pNumPasses)
655
{
656
LOG("IDirect3DDevice8::ValidateDevice( " << pNumPasses << " ) [ " << this << " ]\n");
657
return m_pDevice->ValidateDevice(pNumPasses);
658
}
659
660
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetInfo(DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize)
661
{
662
LOG("IDirect3DDevice8::GetInfo( " << DevInfoID << " , " << pDevInfoStruct << " , " << DevInfoStructSize << " ) [ " << this << " ]\n");
663
return m_pDevice->GetInfo(DevInfoID,pDevInfoStruct,DevInfoStructSize);
664
}
665
666
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPaletteEntries(UINT PaletteNumber,CONST PALETTEENTRY* pEntries)
667
{
668
LOG("IDirect3DDevice8::SetPaletteEntries( " << PaletteNumber << " , " << pEntries << " ) [ " << this << " ]\n");
669
return m_pDevice->SetPaletteEntries(PaletteNumber,pEntries);
670
}
671
672
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPaletteEntries(UINT PaletteNumber,PALETTEENTRY* pEntries)
673
{
674
LOG("IDirect3DDevice8::GetPaletteEntries( " << PaletteNumber << " , " << pEntries << " ) [ " << this << " ]\n");
675
return m_pDevice->GetPaletteEntries(PaletteNumber,pEntries);
676
}
677
678
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetCurrentTexturePalette(UINT PaletteNumber)
679
{
680
LOG("IDirect3DDevice8::SetCurrentTexturePalette( " << PaletteNumber << " ) [ " << this << " ]\n");
681
return m_pDevice->SetCurrentTexturePalette(PaletteNumber);
682
}
683
684
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetCurrentTexturePalette(UINT *PaletteNumber)
685
{
686
LOG("IDirect3DDevice8::GetCurrentTexturePalette( " << PaletteNumber << " ) [ " << this << " ]\n");
687
return m_pDevice->GetCurrentTexturePalette(PaletteNumber);
688
}
689
690
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawPrimitive(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount)
691
{
692
LOG("IDirect3DDevice8::DrawPrimitive( " << PrimitiveType << " , " << StartVertex << " , " << PrimitiveCount << " ) [ " << this << " ]\n");
693
return m_pDevice->DrawPrimitive(PrimitiveType,StartVertex,PrimitiveCount);
694
}
695
696
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawIndexedPrimitive(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
697
{
698
LOG("IDirect3DDevice8::DrawIndexedPrimitive( " << PrimitiveType << " , " << minIndex << " , " << NumVertices << " , " << startIndex << " , " << primCount << " ) [ " << this << " ]\n");
699
return m_pDevice->DrawIndexedPrimitive(PrimitiveType,minIndex,NumVertices,startIndex,primCount);
700
}
701
702
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawPrimitiveUP(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
703
{
704
LOG("IDirect3DDevice8::DrawPrimitiveUP( " << PrimitiveType << " , " << PrimitiveCount << " , " << pVertexStreamZeroData << " , " << VertexStreamZeroStride << " ) [ " << this << " ]\n");
705
return m_pDevice->DrawPrimitiveUP(PrimitiveType,PrimitiveCount,pVertexStreamZeroData,VertexStreamZeroStride);
706
}
707
708
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawIndexedPrimitiveUP(D3D8Base::D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3D8Base::D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride)
709
{
710
LOG("IDirect3DDevice8::DrawIndexedPrimitiveUP( " << PrimitiveType << " , " << MinVertexIndex << " , " << NumVertexIndices << " , " << PrimitiveCount << " , " << pIndexData << " , " << IndexDataFormat << " , " << pVertexStreamZeroData << " , " << VertexStreamZeroStride << " ) [ " << this << " ]\n");
711
return m_pDevice->DrawIndexedPrimitiveUP(PrimitiveType,MinVertexIndex,NumVertexIndices,PrimitiveCount,pIndexData,IndexDataFormat,pVertexStreamZeroData,VertexStreamZeroStride);
712
}
713
714
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::ProcessVertices(UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,D3D8Wrapper::IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags)
715
{
716
LOG("IDirect3DDevice8::ProcessVertices( " << SrcStartIndex << " , " << DestIndex << " , " << VertexCount << " , " << pDestBuffer << " , " << Flags << " ) [ " << this << " ]\n");
717
if (pDestBuffer == NULL)
718
{
719
return m_pDevice->ProcessVertices(SrcStartIndex,DestIndex,VertexCount,NULL,Flags);
720
}
721
else
722
{
723
return m_pDevice->ProcessVertices(SrcStartIndex,DestIndex,VertexCount,pDestBuffer->GetVertexBuffer(),Flags);
724
}
725
}
726
727
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreateVertexShader(CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage)
728
{
729
LOG("IDirect3DDevice8::CreateVertexShader( " << pDeclaration << " , " << pFunction << " , " << pHandle << " , " << Usage << " ) [ " << this << " ]\n");
730
return m_pDevice->CreateVertexShader(pDeclaration,pFunction,pHandle,Usage);
731
}
732
733
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetVertexShader(DWORD Handle)
734
{
735
LOG("IDirect3DDevice8::SetVertexShader( " << Handle << " ) [ " << this << " ]\n");
736
return m_pDevice->SetVertexShader(Handle);
737
}
738
739
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShader(DWORD* pHandle)
740
{
741
LOG("IDirect3DDevice8::GetVertexShader( " << pHandle << " ) [ " << this << " ]\n");
742
return m_pDevice->GetVertexShader(pHandle);
743
}
744
745
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeleteVertexShader(DWORD Handle)
746
{
747
LOG("IDirect3DDevice8::DeleteVertexShader( " << Handle << " ) [ " << this << " ]\n");
748
return m_pDevice->DeleteVertexShader(Handle);
749
}
750
751
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetVertexShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
752
{
753
LOG("IDirect3DDevice8::SetVertexShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
754
return m_pDevice->SetVertexShaderConstant(Register,pConstantData,ConstantCount);
755
}
756
757
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
758
{
759
LOG("IDirect3DDevice8::GetVertexShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
760
return m_pDevice->GetVertexShaderConstant(Register,pConstantData,ConstantCount);
761
}
762
763
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderDeclaration(DWORD Handle,void* pData,DWORD* pSizeOfData)
764
{
765
LOG("IDirect3DDevice8::GetVertexShaderDeclaration( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
766
return m_pDevice->GetVertexShaderDeclaration(Handle,pData,pSizeOfData);
767
}
768
769
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetVertexShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
770
{
771
LOG("IDirect3DDevice8::GetVertexShaderFunction( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
772
return m_pDevice->GetVertexShaderFunction(Handle,pData,pSizeOfData);
773
}
774
775
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetStreamSource(UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8* pStreamData,UINT Stride)
776
{
777
LOG("IDirect3DDevice8::SetStreamSource( " << StreamNumber << " , " << pStreamData << " , " << Stride << " ) [ " << this << " ]\n");
778
if (pStreamData == NULL)
779
{
780
return m_pDevice->SetStreamSource(StreamNumber,NULL,Stride);
781
}
782
else
783
{
784
return m_pDevice->SetStreamSource(StreamNumber,pStreamData->GetVertexBuffer(),Stride);
785
}
786
}
787
788
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetStreamSource(UINT StreamNumber,D3D8Wrapper::IDirect3DVertexBuffer8** ppStreamData,UINT* pStride)
789
{
790
LOG("IDirect3DDevice8::GetStreamSource( " << StreamNumber << " , " << ppStreamData << " , " << pStride << " ) [ " << this << " ]\n");
791
792
D3D8Base::IDirect3DVertexBuffer8* realD3D = NULL;
793
794
HRESULT hr = m_pDevice->GetStreamSource(StreamNumber,&realD3D,pStride);
795
796
D3D8Wrapper::IDirect3DVertexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DVertexBuffer8(realD3D);
797
798
*ppStreamData = wrappedD3D;
799
800
return hr;
801
}
802
803
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetIndices(D3D8Wrapper::IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex)
804
{
805
LOG("IDirect3DDevice8::SetIndices( " << pIndexData << " , " << BaseVertexIndex << " ) [ " << this << " ]\n");
806
if (pIndexData == NULL)
807
{
808
return m_pDevice->SetIndices(NULL,BaseVertexIndex);
809
}
810
else
811
{
812
return m_pDevice->SetIndices(pIndexData->GetIndexBuffer(),BaseVertexIndex);
813
}
814
}
815
816
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetIndices(D3D8Wrapper::IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex)
817
{
818
LOG("IDirect3DDevice8::GetIndices( " << ppIndexData << " , " << pBaseVertexIndex << " ) [ " << this << " ]\n");
819
820
D3D8Base::IDirect3DIndexBuffer8* realD3D = NULL;
821
822
HRESULT hr = m_pDevice->GetIndices(&realD3D,pBaseVertexIndex);// ppIndexData,pBaseVertexIndex);
823
824
D3D8Wrapper::IDirect3DIndexBuffer8* wrappedD3D = new D3D8Wrapper::IDirect3DIndexBuffer8(realD3D);
825
826
*ppIndexData = wrappedD3D;
827
828
return hr;
829
}
830
831
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::CreatePixelShader(CONST DWORD* pFunction,DWORD* pHandle)
832
{
833
LOG("IDirect3DDevice8::CreatePixelShader( " << pFunction << " , " << pHandle << " ) [ " << this << " ]\n");
834
return m_pDevice->CreatePixelShader(pFunction,pHandle);
835
}
836
837
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPixelShader(DWORD Handle)
838
{
839
LOG("IDirect3DDevice8::SetPixelShader( " << Handle << " ) [ " << this << " ]\n");
840
return m_pDevice->SetPixelShader(Handle);
841
}
842
843
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShader(DWORD* pHandle)
844
{
845
LOG("IDirect3DDevice8::GetPixelShader( " << pHandle << " ) [ " << this << " ]\n");
846
return m_pDevice->GetPixelShader(pHandle);
847
}
848
849
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeletePixelShader(DWORD Handle)
850
{
851
LOG("IDirect3DDevice8::DeletePixelShader( " << Handle << " ) [ " << this << " ]\n");
852
return m_pDevice->DeletePixelShader(Handle);
853
}
854
855
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::SetPixelShaderConstant(DWORD Register,CONST void* pConstantData,DWORD ConstantCount)
856
{
857
LOG("IDirect3DDevice8::SetPixelShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
858
return m_pDevice->SetPixelShaderConstant(Register,pConstantData,ConstantCount);
859
}
860
861
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShaderConstant(DWORD Register,void* pConstantData,DWORD ConstantCount)
862
{
863
LOG("IDirect3DDevice8::GetPixelShaderConstant( " << Register << " , " << pConstantData << " , " << ConstantCount << " ) [ " << this << " ]\n");
864
return m_pDevice->GetPixelShaderConstant(Register,pConstantData,ConstantCount);
865
}
866
867
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::GetPixelShaderFunction(DWORD Handle,void* pData,DWORD* pSizeOfData)
868
{
869
LOG("IDirect3DDevice8::GetPixelShaderFunction( " << Handle << " , " << pData << " , " << pSizeOfData << " ) [ " << this << " ]\n");
870
return m_pDevice->GetPixelShaderFunction(Handle,pData,pSizeOfData);
871
}
872
873
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawRectPatch(UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DRECTPATCH_INFO* pRectPatchInfo)
874
{
875
LOG("IDirect3DDevice8::DrawRectPatch( " << Handle << " , " << pNumSegs << " , " << pRectPatchInfo << " ) [ " << this << " ]\n");
876
return m_pDevice->DrawRectPatch(Handle,pNumSegs,pRectPatchInfo);
877
}
878
879
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DrawTriPatch(UINT Handle,CONST float* pNumSegs,CONST D3D8Base::D3DTRIPATCH_INFO* pTriPatchInfo)
880
{
881
LOG("IDirect3DDevice8::DrawTriPatch( " << Handle << " , " << pNumSegs << " , " << pTriPatchInfo << " ) [ " << this << " ]\n");
882
return m_pDevice->DrawTriPatch(Handle,pNumSegs,pTriPatchInfo);
883
}
884
885
STDMETHODIMP D3D8Wrapper::IDirect3DDevice8::DeletePatch(UINT Handle)
886
{
887
LOG("IDirect3DDevice8::DeletePatch( " << Handle << " ) [ " << this << " ]\n");
888
return m_pDevice->DeletePatch(Handle);
889
}
890
}
891
}
892