Visual C++ backend for rbuild (for now just a hacked mingw backend) and related compi...
[reactos.git] / dll / directx / d3d9 / d3d9_device.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS ReactX
4 * FILE: dll/directx/d3d9/d3d9_device.c
5 * PURPOSE: d3d9.dll internal device methods
6 * PROGRAMERS: Gregor Brunmar <gregor (dot) brunmar (at) home (dot) se>
7 */
8 #include "d3d9_device.h"
9 #include "d3d9_helpers.h"
10 #include "adapter.h"
11 #include <debug.h>
12 #include "d3d9_create.h"
13 #include "d3d9_mipmap.h"
14
15 #define LOCK_D3DDEVICE9() if (This->bLockDevice) EnterCriticalSection(&This->CriticalSection);
16 #define UNLOCK_D3DDEVICE9() if (This->bLockDevice) LeaveCriticalSection(&This->CriticalSection);
17
18 /* Convert a IDirect3DDevice9 pointer safely to the internal implementation struct */
19 LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface)
20 {
21 if (NULL == iface)
22 return NULL;
23
24 return (LPDIRECT3DDEVICE9_INT)((ULONG_PTR)iface - FIELD_OFFSET(DIRECT3DDEVICE9_INT, lpVtbl));
25 }
26
27 static HRESULT InvalidCall(LPDIRECT3DDEVICE9_INT This, LPSTR ErrorMsg)
28 {
29 DPRINT1(ErrorMsg);
30 UNLOCK_D3DDEVICE9();
31 return D3DERR_INVALIDCALL;
32 }
33
34 /* IDirect3DDevice9: IUnknown implementation */
35 HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void** ppvObject)
36 {
37 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
38
39 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirect3DDevice9))
40 {
41 IUnknown_AddRef(iface);
42 *ppvObject = &This->lpVtbl;
43 return D3D_OK;
44 }
45
46 *ppvObject = NULL;
47 return E_NOINTERFACE;
48 }
49
50 ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface)
51 {
52 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
53 ULONG ref = InterlockedIncrement(&This->lRefCnt);
54
55 return ref;
56 }
57
58 ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface)
59 {
60 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
61 ULONG ref = InterlockedDecrement(&This->lRefCnt);
62
63 if (ref == 0)
64 {
65 DWORD iAdapter;
66
67 EnterCriticalSection(&This->CriticalSection);
68
69 /* TODO: Free resources here */
70 for (iAdapter = 0; iAdapter < This->NumAdaptersInDevice; iAdapter++)
71 {
72 DestroyD3D9DeviceData(&This->DeviceData[iAdapter]);
73 }
74 This->lpVtbl->VirtualDestructor(iface);
75
76 LeaveCriticalSection(&This->CriticalSection);
77 AlignedFree(This);
78 }
79
80 return ref;
81 }
82
83 /* IDirect3DDevice9 public interface */
84 HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface)
85 {
86 UNIMPLEMENTED
87
88 return D3D_OK;
89 }
90
91 /*++
92 * @name IDirect3DDevice9::GetAvailableTextureMem
93 * @implemented
94 *
95 * The function IDirect3DDevice9Base_GetAvailableTextureMem returns a pointer to the IDirect3D9 object
96 * that created this device.
97 *
98 * @param LPDIRECT3D iface
99 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
100 *
101 * @return UINT
102 * The method returns an estimated the currently available texture memory in bytes rounded
103 * to the nearest MB. Applications should NOT use this as an exact number.
104 *
105 */
106 UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface)
107 {
108 UINT AvailableTextureMemory = 0;
109 D3D9_GETAVAILDRIVERMEMORYDATA d3d9GetAvailDriverMemoryData;
110
111 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
112 LOCK_D3DDEVICE9();
113
114 memset(&d3d9GetAvailDriverMemoryData, 0, sizeof(d3d9GetAvailDriverMemoryData));
115 d3d9GetAvailDriverMemoryData.pUnknown6BC = This->DeviceData[0].pUnknown6BC;
116 d3d9GetAvailDriverMemoryData.dwMemoryType = D3D9_GETAVAILDRIVERMEMORY_TYPE_ALL;
117
118 if (TRUE == (*This->DeviceData[0].D3D9Callbacks.DdGetAvailDriverMemory)(&d3d9GetAvailDriverMemoryData))
119 {
120 /* Round it up to the nearest MB */
121 AvailableTextureMemory = (d3d9GetAvailDriverMemoryData.dwFree + 0x80000) & 0xFFF00000;
122 }
123
124 UNLOCK_D3DDEVICE9();
125 return AvailableTextureMemory;
126 }
127
128 HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface)
129 {
130 UNIMPLEMENTED
131
132 return D3D_OK;
133 }
134
135 /*++
136 * @name IDirect3DDevice9::GetDirect3D
137 * @implemented
138 *
139 * The function IDirect3DDevice9Base_GetDirect3D returns a pointer to the IDirect3D9 object
140 * that created this device.
141 *
142 * @param LPDIRECT3D iface
143 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
144 *
145 * @param IDirect3D9** ppD3D9
146 * Pointer to a IDirect3D9* to receive the IDirect3D9 object pointer.
147 *
148 * @return HRESULT
149 * If the method successfully fills the ppD3D9 structure, the return value is D3D_OK.
150 * If ppD3D9 is a bad pointer, the return value will be D3DERR_INVALIDCALL.
151 *
152 */
153 HRESULT WINAPI IDirect3DDevice9Base_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDirect3D9** ppD3D9)
154 {
155 IDirect3D9* pDirect3D9;
156 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
157 LOCK_D3DDEVICE9();
158
159 if (NULL == ppD3D9)
160 {
161 DPRINT1("Invalid ppD3D9 parameter specified");
162 UNLOCK_D3DDEVICE9();
163 return D3DERR_INVALIDCALL;
164 }
165
166 pDirect3D9 = (IDirect3D9*)&This->pDirect3D9->lpVtbl;
167 IDirect3D9_AddRef(pDirect3D9);
168 *ppD3D9 = pDirect3D9;
169
170 UNLOCK_D3DDEVICE9();
171 return D3D_OK;
172 }
173
174 /*++
175 * @name IDirect3DDevice9::GetDeviceCaps
176 * @implemented
177 *
178 * The function IDirect3DDevice9Base_GetDeviceCaps fills the pCaps argument with the
179 * capabilities of the device.
180 *
181 * @param LPDIRECT3D iface
182 * Pointer to the IDirect3D9 object returned from Direct3DCreate9()
183 *
184 * @param D3DCAPS9* pCaps
185 * Pointer to a D3DCAPS9 structure to be filled with the device's capabilities.
186 *
187 * @return HRESULT
188 * If the method successfully fills the pCaps structure, the return value is D3D_OK.
189 * If pCaps is a bad pointer the return value will be D3DERR_INVALIDCALL.
190 *
191 */
192 HRESULT WINAPI IDirect3DDevice9Base_GetDeviceCaps(LPDIRECT3DDEVICE9 iface, D3DCAPS9* pCaps)
193 {
194 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
195 LOCK_D3DDEVICE9();
196
197 if (NULL == pCaps)
198 {
199 DPRINT1("Invalid pCaps parameter specified");
200 UNLOCK_D3DDEVICE9();
201 return D3DERR_INVALIDCALL;
202 }
203
204 GetAdapterCaps(&This->pDirect3D9->DisplayAdapters[0], This->DeviceData[0].DeviceType, pCaps);
205
206 UNLOCK_D3DDEVICE9();
207 return D3D_OK;
208 }
209
210 /*++
211 * @name IDirect3DDevice9::GetDisplayMode
212 * @implemented
213 *
214 * The function IDirect3DDevice9Base_GetDisplayMode fills the pMode argument with the
215 * display mode for the specified swap chain.
216 *
217 * @param LPDIRECT3D iface
218 * Pointer to the IDirect3D9 object returned from Direct3DCreate9()
219 *
220 * @param UINT iSwapChain
221 * Swap chain index to get object for.
222 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
223 *
224 * @param D3DDISPLAYMODE* pMode
225 * Pointer to a D3DDISPLAYMODE structure to be filled with the current swap chain's display mode information.
226 *
227 * @return HRESULT
228 * If the method successfully fills the pMode structure, the return value is D3D_OK.
229 * If iSwapChain is out of range or pMode is a bad pointer, the return value will be D3DERR_INVALIDCALL.
230 *
231 */
232 HRESULT WINAPI IDirect3DDevice9Base_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE* pMode)
233 {
234 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
235 LOCK_D3DDEVICE9();
236
237 if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface))
238 {
239 DPRINT1("Invalid iSwapChain parameter specified");
240 UNLOCK_D3DDEVICE9();
241 return D3DERR_INVALIDCALL;
242 }
243
244 if (NULL == pMode)
245 {
246 DPRINT1("Invalid pMode parameter specified");
247 UNLOCK_D3DDEVICE9();
248 return D3DERR_INVALIDCALL;
249 }
250
251 pMode->Width = This->DeviceData[iSwapChain].DriverCaps.dwDisplayWidth;
252 pMode->Height = This->DeviceData[iSwapChain].DriverCaps.dwDisplayHeight;
253 pMode->Format = This->DeviceData[iSwapChain].DriverCaps.RawDisplayFormat;
254 pMode->RefreshRate = This->DeviceData[iSwapChain].DriverCaps.dwRefreshRate;
255
256 UNLOCK_D3DDEVICE9();
257 return D3D_OK;
258 }
259
260 /*++
261 * @name IDirect3DDevice9::GetCreationParameters
262 * @implemented
263 *
264 * The function IDirect3DDevice9Base_GetCreationParameters fills the pParameters argument with the
265 * parameters the device was created with.
266 *
267 * @param LPDIRECT3D iface
268 * Pointer to the IDirect3D9 object returned from Direct3DCreate9()
269 *
270 * @param D3DDEVICE_CREATION_PARAMETERS* pParameters
271 * Pointer to a D3DDEVICE_CREATION_PARAMETERS structure to be filled with the creation parameter
272 * information for this device.
273 *
274 * @return HRESULT
275 * If the method successfully fills the pParameters structure, the return value is D3D_OK.
276 * If pParameters is a bad pointer, the return value will be D3DERR_INVALIDCALL.
277 *
278 */
279 HRESULT WINAPI IDirect3DDevice9Base_GetCreationParameters(LPDIRECT3DDEVICE9 iface, D3DDEVICE_CREATION_PARAMETERS* pParameters)
280 {
281 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
282 LOCK_D3DDEVICE9();
283
284 if (NULL == pParameters)
285 {
286 DPRINT1("Invalid pParameters parameter specified");
287 UNLOCK_D3DDEVICE9();
288 return D3DERR_INVALIDCALL;
289 }
290
291 pParameters->AdapterOrdinal = This->AdapterIndexInGroup[0];
292 pParameters->DeviceType = This->DeviceType;
293 pParameters->hFocusWindow = This->hWnd;
294 pParameters->BehaviorFlags = This->BehaviourFlags;
295
296 UNLOCK_D3DDEVICE9();
297 return D3D_OK;
298 }
299
300 HRESULT WINAPI IDirect3DDevice9Base_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap)
301 {
302 UNIMPLEMENTED
303
304 return D3D_OK;
305 }
306
307 VOID WINAPI IDirect3DDevice9Base_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X, int Y, DWORD Flags)
308 {
309 UNIMPLEMENTED
310 }
311
312 BOOL WINAPI IDirect3DDevice9Base_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow)
313 {
314 UNIMPLEMENTED
315
316 return TRUE;
317 }
318
319 HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain)
320 {
321 UNIMPLEMENTED
322
323 return D3D_OK;
324 }
325
326 /*++
327 * @name IDirect3DDevice9::GetSwapChain
328 * @implemented
329 *
330 * The function IDirect3DDevice9Base_GetSwapChain returns a pointer to a swap chain object.
331 *
332 * @param LPDIRECT3D iface
333 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
334 *
335 * @param UINT iSwapChain
336 * Swap chain index to get object for.
337 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
338 *
339 * @param IDirect3DSwapChain9** ppSwapChain
340 * Pointer to a IDirect3DSwapChain9* to receive the swap chain object pointer.
341 *
342 * @return HRESULT
343 * If the method successfully fills the ppSwapChain structure, the return value is D3D_OK.
344 * If iSwapChain is out of range or ppSwapChain is a bad pointer, the return value
345 * will be D3DERR_INVALIDCALL.
346 *
347 */
348 HRESULT WINAPI IDirect3DDevice9Base_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9** ppSwapChain)
349 {
350 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
351 LOCK_D3DDEVICE9();
352
353 if (NULL == ppSwapChain)
354 {
355 DPRINT1("Invalid ppSwapChain parameter specified");
356 UNLOCK_D3DDEVICE9();
357 return D3DERR_INVALIDCALL;
358 }
359
360 *ppSwapChain = NULL;
361
362 if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface))
363 {
364 DPRINT1("Invalid iSwapChain parameter specified");
365 UNLOCK_D3DDEVICE9();
366 return D3DERR_INVALIDCALL;
367 }
368
369 if (This->pSwapChains[iSwapChain] != NULL)
370 {
371 IDirect3DSwapChain9* pSwapChain = (IDirect3DSwapChain9*)&This->pSwapChains[iSwapChain]->lpVtbl;
372 IDirect3DSwapChain9_AddRef(pSwapChain);
373 *ppSwapChain = pSwapChain;
374 }
375 else
376 {
377 *ppSwapChain = NULL;
378 }
379
380 UNLOCK_D3DDEVICE9();
381 return D3D_OK;
382 }
383
384 /*++
385 * @name IDirect3DDevice9::GetNumberOfSwapChains
386 * @implemented
387 *
388 * The function IDirect3DDevice9Base_GetNumberOfSwapChains returns the number of swap chains
389 * created by IDirect3D9::CreateDevice().
390 *
391 * @param LPDIRECT3D iface
392 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
393 *
394 * @return UINT
395 * Returns the number of swap chains created by IDirect3D9::CreateDevice().
396 *
397 * NOTE: An application can create additional swap chains using the
398 * IDirect3DDevice9::CreateAdditionalSwapChain() method.
399 *
400 */
401 UINT WINAPI IDirect3DDevice9Base_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface)
402 {
403 UINT NumSwapChains;
404
405 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
406 LOCK_D3DDEVICE9();
407
408 NumSwapChains = This->NumAdaptersInDevice;
409
410 UNLOCK_D3DDEVICE9();
411 return NumSwapChains;
412 }
413
414 HRESULT WINAPI IDirect3DDevice9Base_Reset(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters)
415 {
416 UNIMPLEMENTED
417
418 return D3D_OK;
419 }
420
421 HRESULT WINAPI IDirect3DDevice9Base_Present(LPDIRECT3DDEVICE9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
422 {
423 UNIMPLEMENTED
424
425 return D3D_OK;
426 }
427
428 HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer)
429 {
430 UNIMPLEMENTED
431
432 return D3D_OK;
433 }
434
435 HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus)
436 {
437 UNIMPLEMENTED
438
439 return D3D_OK;
440 }
441
442 HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs)
443 {
444 UNIMPLEMENTED
445
446 return D3D_OK;
447 }
448
449 VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp)
450 {
451 UNIMPLEMENTED
452 }
453
454 VOID WINAPI IDirect3DDevice9Base_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP* pRamp)
455 {
456 UNIMPLEMENTED
457 }
458
459 /*++
460 * @name IDirect3DDevice9::CreateTexture
461 * @implemented
462 *
463 * The function IDirect3DDevice9Base_CreateTexture creates a D3D9 texture.
464 *
465 * @param LPDIRECT3D iface
466 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
467 *
468 * @param UINT Width
469 * Desired width of the texture
470 *
471 * @param UINT Height
472 * Desired height of the texture
473 *
474 * @param UINT Levels
475 * Number of mip-maps. If Levels are zero, mip-maps down to size 1x1 will be generated.
476 *
477 * @param DWORD Usage
478 * Valid combinations of the D3DUSAGE constants.
479 *
480 * @param D3DFORMAT Format
481 * One of the D3DFORMAT enum members for the surface format.
482 *
483 * @param D3DPOOL Pool
484 * One of the D3DPOOL enum members for where the texture should be placed.
485 *
486 * @param IDirect3DTexture9** ppTexture
487 * Return parameter for the created texture
488 *
489 * @param HANDLE* pSharedHandle
490 * Set to NULL, shared resources are not implemented yet
491 *
492 * @return HRESULT
493 * Returns D3D_OK if everything went well.
494 *
495 */
496 HRESULT WINAPI IDirect3DDevice9Base_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle)
497 {
498 HRESULT hResult;
499 LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
500 LOCK_D3DDEVICE9();
501
502 if (NULL == This)
503 return InvalidCall(This, "Invalid 'this' parameter specified");
504
505 if (NULL == ppTexture)
506 return InvalidCall(This, "Invalid ppTexture parameter specified");
507
508 *ppTexture = NULL;
509
510 if (D3DFMT_UNKNOWN == Format)
511 return InvalidCall(This, "Invalid Format parameter specified, D3DFMT_UNKNOWN is not a valid Format");
512
513 if (NULL != pSharedHandle)
514 {
515 UNIMPLEMENTED;
516 return InvalidCall(This, "Invalid pSharedHandle parameter specified, only NULL is supported at the moment");
517 }
518
519 hResult = CreateD3D9MipMap(This, Width, Height, Levels, Usage, Format, Pool, ppTexture);
520 if (FAILED(hResult))
521 DPRINT1("Failed to create texture");
522
523 UNLOCK_D3DDEVICE9();
524 return hResult;
525 }
526
527 HRESULT WINAPI IDirect3DDevice9Base_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle)
528 {
529 UNIMPLEMENTED
530
531 return D3D_OK;
532 }
533
534 HRESULT WINAPI IDirect3DDevice9Base_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle)
535 {
536 UNIMPLEMENTED
537
538 return D3D_OK;
539 }
540
541 HRESULT WINAPI IDirect3DDevice9Base_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle)
542 {
543 UNIMPLEMENTED
544
545 return D3D_OK;
546 }
547
548 HRESULT WINAPI IDirect3DDevice9Base_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9** ppIndexBuffer, HANDLE* pSharedHandle)
549 {
550 UNIMPLEMENTED
551
552 return D3D_OK;
553 }
554
555 HRESULT WINAPI IDirect3DDevice9Base_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
556 {
557 UNIMPLEMENTED
558
559 return D3D_OK;
560 }
561
562 HRESULT WINAPI IDirect3DDevice9Base_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
563 {
564 UNIMPLEMENTED
565
566 return D3D_OK;
567 }
568
569 HRESULT WINAPI IDirect3DDevice9Base_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint)
570 {
571 UNIMPLEMENTED
572
573 return D3D_OK;
574 }
575
576 HRESULT WINAPI IDirect3DDevice9Base_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture)
577 {
578 UNIMPLEMENTED
579
580 return D3D_OK;
581 }
582
583 HRESULT WINAPI IDirect3DDevice9Base_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface)
584 {
585 UNIMPLEMENTED
586
587 return D3D_OK;
588 }
589
590 HRESULT WINAPI IDirect3DDevice9Base_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface)
591 {
592 UNIMPLEMENTED
593
594 return D3D_OK;
595 }
596
597 HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter)
598 {
599 UNIMPLEMENTED
600
601 return D3D_OK;
602 }
603
604 HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSurface, CONST RECT* pRect, D3DCOLOR color)
605 {
606 UNIMPLEMENTED
607
608 return D3D_OK;
609 }
610
611 HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
612 {
613 UNIMPLEMENTED
614
615 return D3D_OK;
616 }
617
618 /* IDirect3DDevice9 private interface */
619 VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface)
620 {
621 UNIMPLEMENTED
622 }
623
624 VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface)
625 {
626 UNIMPLEMENTED
627 }