ReactOS  0.4.13-dev-563-g0561610
d3d9_device.c
Go to the documentation of this file.
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 */
20 {
21  if (NULL == iface)
22  return NULL;
23 
25 }
26 
28 {
29  DPRINT1("%s",ErrorMsg);
31  return D3DERR_INVALIDCALL;
32 }
33 
34 /* IDirect3DDevice9: IUnknown implementation */
36 {
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 
51 {
53  ULONG ref = InterlockedIncrement(&This->lRefCnt);
54 
55  return ref;
56 }
57 
59 {
61  ULONG ref = InterlockedDecrement(&This->lRefCnt);
62 
63  if (ref == 0)
64  {
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);
78  }
79 
80  return ref;
81 }
82 
83 /* IDirect3DDevice9 public interface */
85 {
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 */
107 {
108  UINT AvailableTextureMemory = 0;
109  D3D9_GETAVAILDRIVERMEMORYDATA d3d9GetAvailDriverMemoryData;
110 
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 
125  return AvailableTextureMemory;
126 }
127 
129 {
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 */
154 {
155  IDirect3D9* pDirect3D9;
157  LOCK_D3DDEVICE9();
158 
159  if (NULL == ppD3D9)
160  {
161  DPRINT1("Invalid ppD3D9 parameter specified");
163  return D3DERR_INVALIDCALL;
164  }
165 
166  pDirect3D9 = (IDirect3D9*)&This->pDirect3D9->lpVtbl;
167  IDirect3D9_AddRef(pDirect3D9);
168  *ppD3D9 = pDirect3D9;
169 
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 */
193 {
195  LOCK_D3DDEVICE9();
196 
197  if (NULL == pCaps)
198  {
199  DPRINT1("Invalid pCaps parameter specified");
201  return D3DERR_INVALIDCALL;
202  }
203 
204  GetAdapterCaps(&This->pDirect3D9->DisplayAdapters[0], This->DeviceData[0].DeviceType, pCaps);
205 
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 */
233 {
235  LOCK_D3DDEVICE9();
236 
237  if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface))
238  {
239  DPRINT1("Invalid iSwapChain parameter specified");
241  return D3DERR_INVALIDCALL;
242  }
243 
244  if (NULL == pMode)
245  {
246  DPRINT1("Invalid pMode parameter specified");
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 
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 */
280 {
282  LOCK_D3DDEVICE9();
283 
284  if (NULL == pParameters)
285  {
286  DPRINT1("Invalid pParameters parameter specified");
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 
297  return D3D_OK;
298 }
299 
300 HRESULT WINAPI IDirect3DDevice9Base_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9* pCursorBitmap)
301 {
303 
304  return D3D_OK;
305 }
306 
308 {
310 }
311 
313 {
315 
316  return TRUE;
317 }
318 
319 /*++
320 * @name IDirect3DDevice9::CreateAdditionalSwapChain
321 * @implemented
322 *
323 * The function IDirect3DDevice9Base_CreateAdditionalSwapChain creates a swap chain object,
324 * useful when rendering multiple views.
325 *
326 * @param LPDIRECT3D iface
327 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
328 *
329 * @param D3DPRESENT_PARAMETERS* pPresentationParameters
330 * Pointer to a D3DPRESENT_PARAMETERS structure describing the parameters for the swap chain
331 * to be created.
332 *
333 * @param IDirect3DSwapChain9** ppSwapChain
334 * Pointer to a IDirect3DSwapChain9* to receive the swap chain object pointer.
335 *
336 * @return HRESULT
337 * If the method successfully fills the ppSwapChain structure, the return value is D3D_OK.
338 * If iSwapChain is out of range or ppSwapChain is a bad pointer, the return value
339 * will be D3DERR_INVALIDCALL. Also D3DERR_OUTOFVIDEOMEMORY can be returned if allocation
340 * of the new swap chain object failed.
341 *
342 */
343 HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain)
344 {
345  UINT iSwapChain;
346  IDirect3DSwapChain9* pSwapChain;
347  Direct3DSwapChain9_INT* pSwapChain_INT;
349  LOCK_D3DDEVICE9();
350 
351  if (NULL == ppSwapChain)
352  {
353  DPRINT1("Invalid ppSwapChain parameter specified");
355  return D3DERR_INVALIDCALL;
356  }
357 
358  *ppSwapChain = NULL;
359  iSwapChain = IDirect3DDevice9_GetNumberOfSwapChains(iface) + 1;
360 
361  pSwapChain_INT = CreateDirect3DSwapChain9(RT_EXTERNAL, This, iSwapChain);
362  if (NULL == pSwapChain_INT)
363  {
364  DPRINT1("Out of memory");
367  }
368 
369  Direct3DSwapChain9_Init(pSwapChain_INT, pPresentationParameters);
370 
371  This->pSwapChains[iSwapChain] = pSwapChain_INT;
372  pSwapChain = (IDirect3DSwapChain9*)&pSwapChain_INT->lpVtbl;
373  IDirect3DSwapChain9_AddRef(pSwapChain);
374  *ppSwapChain = pSwapChain;
375 
377  return D3D_OK;
378 }
379 
380 /*++
381 * @name IDirect3DDevice9::GetSwapChain
382 * @implemented
383 *
384 * The function IDirect3DDevice9Base_GetSwapChain returns a pointer to a swap chain object.
385 *
386 * @param LPDIRECT3D iface
387 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
388 *
389 * @param UINT iSwapChain
390 * Swap chain index to get object for.
391 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
392 *
393 * @param IDirect3DSwapChain9** ppSwapChain
394 * Pointer to a IDirect3DSwapChain9* to receive the swap chain object pointer.
395 *
396 * @return HRESULT
397 * If the method successfully fills the ppSwapChain structure, the return value is D3D_OK.
398 * If iSwapChain is out of range or ppSwapChain is a bad pointer, the return value
399 * will be D3DERR_INVALIDCALL.
400 *
401 */
402 HRESULT WINAPI IDirect3DDevice9Base_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9** ppSwapChain)
403 {
405  LOCK_D3DDEVICE9();
406 
407  if (NULL == ppSwapChain)
408  {
409  DPRINT1("Invalid ppSwapChain parameter specified");
411  return D3DERR_INVALIDCALL;
412  }
413 
414  *ppSwapChain = NULL;
415 
416  if (iSwapChain >= IDirect3DDevice9_GetNumberOfSwapChains(iface))
417  {
418  DPRINT1("Invalid iSwapChain parameter specified");
420  return D3DERR_INVALIDCALL;
421  }
422 
423  if (This->pSwapChains[iSwapChain] != NULL)
424  {
425  IDirect3DSwapChain9* pSwapChain = (IDirect3DSwapChain9*)&This->pSwapChains[iSwapChain]->lpVtbl;
426  IDirect3DSwapChain9_AddRef(pSwapChain);
427  *ppSwapChain = pSwapChain;
428  }
429  else
430  {
431  *ppSwapChain = NULL;
432  }
433 
435  return D3D_OK;
436 }
437 
438 /*++
439 * @name IDirect3DDevice9::GetNumberOfSwapChains
440 * @implemented
441 *
442 * The function IDirect3DDevice9Base_GetNumberOfSwapChains returns the number of swap chains
443 * created by IDirect3D9::CreateDevice().
444 *
445 * @param LPDIRECT3D iface
446 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
447 *
448 * @return UINT
449 * Returns the number of swap chains created by IDirect3D9::CreateDevice().
450 *
451 * NOTE: An application can create additional swap chains using the
452 * IDirect3DDevice9::CreateAdditionalSwapChain() method.
453 *
454 */
456 {
457  UINT NumSwapChains;
458 
460  LOCK_D3DDEVICE9();
461 
462  NumSwapChains = This->NumAdaptersInDevice;
463 
465  return NumSwapChains;
466 }
467 
469 {
471 
472  return D3D_OK;
473 }
474 
475 /*++
476 * @name IDirect3DDevice9::Present
477 * @implemented
478 *
479 * The function IDirect3DDevice9Base_Present displays the content of the next
480 * back buffer in sequence for the device.
481 *
482 * @param LPDIRECT3D iface
483 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
484 *
485 * @param CONST RECT* pSourceRect
486 * A pointer to a RECT structure representing an area of the back buffer to display where
487 * NULL means the whole back buffer. This parameter MUST be NULL unless the back buffer
488 * was created with the D3DSWAPEFFECT_COPY flag.
489 *
490 * @param CONST RECT* pDestRect
491 * A pointer to a RECT structure representing an area of the back buffer where the content
492 * will be displayed where NULL means the whole back buffer starting at (0,0).
493 * This parameter MUST be NULL unless the back buffer was created with the D3DSWAPEFFECT_COPY flag.
494 *
495 * @param HWND hDestWindowOverride
496 * A destination window where NULL means the window specified in the hWndDeviceWindow of the
497 * D3DPRESENT_PARAMETERS structure.
498 *
499 * @param CONST RGNDATA* pDirtyRegion
500 * A pointer to a RGNDATA structure representing an area of the back buffer to display where
501 * NULL means the whole back buffer. This parameter MUST be NULL unless the back buffer
502 * was created with the D3DSWAPEFFECT_COPY flag. This is an optimization region only.
503 *
504 * @return HRESULT
505 * If the method successfully displays the back buffer content, the return value is D3D_OK.
506 * If no swap chains are available, the return value will be D3DERR_INVALIDCALL.
507 */
508 HRESULT WINAPI IDirect3DDevice9Base_Present(LPDIRECT3DDEVICE9 iface, CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion)
509 {
510  UINT i;
511  UINT iNumSwapChains;
513  LOCK_D3DDEVICE9();
514 
515  iNumSwapChains = IDirect3DDevice9Base_GetNumberOfSwapChains(iface);
516  if (0 == iNumSwapChains)
517  {
518  DPRINT1("Not enough swap chains, Present() fails");
520  return D3DERR_INVALIDCALL;
521  }
522 
523  for (i = 0; i < iNumSwapChains; i++)
524  {
526  IDirect3DSwapChain9* pSwapChain;
527 
528  IDirect3DDevice9Base_GetSwapChain(iface, i, &pSwapChain);
529  hResult = IDirect3DSwapChain9_Present(pSwapChain, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion, 0);
530 
531  if (FAILED(hResult))
532  {
534  return hResult;
535  }
536  }
537 
539  return D3D_OK;
540 }
541 
542 /*++
543 * @name IDirect3DDevice9::GetBackBuffer
544 * @implemented
545 *
546 * The function IDirect3DDevice9Base_GetBackBuffer retrieves the back buffer
547 * for the specified swap chain.
548 *
549 * @param LPDIRECT3D iface
550 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
551 *
552 * @param UINT iSwapChain
553 * Swap chain index to get object for.
554 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
555 *
556 * @param UINT iBackBuffer
557 * Back buffer index to get object for.
558 * The maximum value for this is the the total number of back buffers - 1, as indexing starts at 0.
559 *
560 * @param IDirect3DSurface9** ppBackBuffer
561 * Pointer to a IDirect3DSurface9* to receive the back buffer object
562 *
563 * @return HRESULT
564 * If the method successfully sets the ppBackBuffer pointer, the return value is D3D_OK.
565 * If iSwapChain or iBackBuffer is out of range, Type is invalid or ppBackBuffer is a bad pointer,
566 * the return value will be D3DERR_INVALIDCALL.
567 */
568 HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9** ppBackBuffer)
569 {
571  IDirect3DSwapChain9* pSwapChain = NULL;
573  LOCK_D3DDEVICE9();
574 
575  IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
576  if (NULL == pSwapChain)
577  {
578  DPRINT1("Invalid iSwapChain parameter specified");
580  return D3DERR_INVALIDCALL;
581  }
582 
583  if (NULL == ppBackBuffer)
584  {
585  DPRINT1("Invalid ppBackBuffer parameter specified");
587  return D3DERR_INVALIDCALL;
588  }
589 
590  hResult = IDirect3DSwapChain9_GetBackBuffer(pSwapChain, iBackBuffer, Type, ppBackBuffer);
591 
593  return hResult;
594 }
595 
596 /*++
597 * @name IDirect3DDevice9::GetRasterStatus
598 * @implemented
599 *
600 * The function IDirect3DDevice9Base_GetRasterStatus retrieves raster information
601 * of the monitor for the specified swap chain.
602 *
603 * @param LPDIRECT3D iface
604 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
605 *
606 * @param UINT iSwapChain
607 * Swap chain index to get object for.
608 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
609 *
610 * @param D3DRASTER_STATUS* pRasterStatus
611 * Pointer to a D3DRASTER_STATUS to receive the raster information
612 *
613 * @return HRESULT
614 * If the method successfully fills the pRasterStatus structure, the return value is D3D_OK.
615 * If iSwapChain is out of range or pRasterStatus is a bad pointer, the return value
616 * will be D3DERR_INVALIDCALL.
617 */
619 {
621  IDirect3DSwapChain9* pSwapChain = NULL;
623  LOCK_D3DDEVICE9();
624 
625  IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
626  if (NULL == pSwapChain)
627  {
628  DPRINT1("Invalid iSwapChain parameter specified");
630  return D3DERR_INVALIDCALL;
631  }
632 
633  if (NULL == pRasterStatus)
634  {
635  DPRINT1("Invalid pRasterStatus parameter specified");
637  return D3DERR_INVALIDCALL;
638  }
639 
640  hResult = IDirect3DSwapChain9_GetRasterStatus(pSwapChain, pRasterStatus);
641 
643  return hResult;
644 }
645 
647 {
649 
650  return D3D_OK;
651 }
652 
653 /*++
654 * @name IDirect3DDevice9::SetGammaRamp
655 * @implemented
656 *
657 * The function IDirect3DDevice9Base_SetGammaRamp sets the gamma correction ramp values
658 * for the specified swap chain.
659 *
660 * @param LPDIRECT3D iface
661 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
662 *
663 * @param UINT iSwapChain
664 * Swap chain index to get object for.
665 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
666 *
667 * @param UINT Flags
668 * Can be on of the following:
669 * D3DSGR_CALIBRATE - Detects if a gamma calibrator is installed and if so modifies the values to correspond to
670 * the monitor and system settings before sending them to the display device.
671 * D3DSGR_NO_CALIBRATION - The gamma calibrations values are sent directly to the display device without
672 * any modification.
673 *
674 * @param CONST D3DGAMMARAMP* pRamp
675 * Pointer to a D3DGAMMARAMP representing the gamma correction ramp values to be set.
676 *
677 */
679 {
680  IDirect3DSwapChain9* pSwapChain = NULL;
681  Direct3DSwapChain9_INT* pSwapChain_INT;
683  LOCK_D3DDEVICE9();
684 
685  IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
686  if (NULL == pSwapChain)
687  {
688  DPRINT1("Invalid iSwapChain parameter specified");
690  return;
691  }
692 
693  if (NULL == pRamp)
694  {
695  DPRINT1("Invalid pRamp parameter specified");
697  return;
698  }
699 
700  pSwapChain_INT = IDirect3DSwapChain9ToImpl(pSwapChain);
701  Direct3DSwapChain9_SetGammaRamp(pSwapChain_INT, Flags, pRamp);
702 
704 }
705 
706 /*++
707 * @name IDirect3DDevice9::GetGammaRamp
708 * @implemented
709 *
710 * The function IDirect3DDevice9Base_GetGammaRamp retrieves the gamma correction ramp values
711 * for the specified swap chain.
712 *
713 * @param LPDIRECT3D iface
714 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
715 *
716 * @param UINT iSwapChain
717 * Swap chain index to get object for.
718 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
719 *
720 * @param D3DGAMMARAMP* pRamp
721 * Pointer to a D3DGAMMARAMP to receive the gamma correction ramp values.
722 *
723 */
725 {
726  IDirect3DSwapChain9* pSwapChain = NULL;
727  Direct3DSwapChain9_INT* pSwapChain_INT;
729  LOCK_D3DDEVICE9();
730 
731  IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
732  if (NULL == pSwapChain)
733  {
734  DPRINT1("Invalid iSwapChain parameter specified");
736  return;
737  }
738 
739  if (NULL == pRamp)
740  {
741  DPRINT1("Invalid pRamp parameter specified");
743  return;
744  }
745 
746  pSwapChain_INT = IDirect3DSwapChain9ToImpl(pSwapChain);
747  Direct3DSwapChain9_GetGammaRamp(pSwapChain_INT, pRamp);
748 
750 }
751 
752 /*++
753 * @name IDirect3DDevice9::CreateTexture
754 * @implemented
755 *
756 * The function IDirect3DDevice9Base_CreateTexture creates a D3D9 texture.
757 *
758 * @param LPDIRECT3D iface
759 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
760 *
761 * @param UINT Width
762 * Desired width of the texture
763 *
764 * @param UINT Height
765 * Desired height of the texture
766 *
767 * @param UINT Levels
768 * Number of mip-maps. If Levels are zero, mip-maps down to size 1x1 will be generated.
769 *
770 * @param DWORD Usage
771 * Valid combinations of the D3DUSAGE constants.
772 *
773 * @param D3DFORMAT Format
774 * One of the D3DFORMAT enum members for the surface format.
775 *
776 * @param D3DPOOL Pool
777 * One of the D3DPOOL enum members for where the texture should be placed.
778 *
779 * @param IDirect3DTexture9** ppTexture
780 * Return parameter for the created texture
781 *
782 * @param HANDLE* pSharedHandle
783 * Set to NULL, shared resources are not implemented yet
784 *
785 * @return HRESULT
786 * Returns D3D_OK if everything went well.
787 *
788 */
789 HRESULT WINAPI IDirect3DDevice9Base_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9** ppTexture, HANDLE* pSharedHandle)
790 {
793  LOCK_D3DDEVICE9();
794 
795  if (NULL == This)
796  return InvalidCall(This, "Invalid 'this' parameter specified");
797 
798  if (NULL == ppTexture)
799  return InvalidCall(This, "Invalid ppTexture parameter specified");
800 
801  *ppTexture = NULL;
802 
803  if (D3DFMT_UNKNOWN == Format)
804  return InvalidCall(This, "Invalid Format parameter specified, D3DFMT_UNKNOWN is not a valid Format");
805 
806  if (NULL != pSharedHandle)
807  {
809  return InvalidCall(This, "Invalid pSharedHandle parameter specified, only NULL is supported at the moment");
810  }
811 
812  hResult = CreateD3D9MipMap(This, Width, Height, Levels, Usage, Format, Pool, ppTexture);
813  if (FAILED(hResult))
814  DPRINT1("Failed to create texture");
815 
817  return hResult;
818 }
819 
820 HRESULT WINAPI IDirect3DDevice9Base_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9** ppVolumeTexture, HANDLE* pSharedHandle)
821 {
823 
824  return D3D_OK;
825 }
826 
827 HRESULT WINAPI IDirect3DDevice9Base_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9** ppCubeTexture, HANDLE* pSharedHandle)
828 {
830 
831  return D3D_OK;
832 }
833 
834 HRESULT WINAPI IDirect3DDevice9Base_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9** ppVertexBuffer, HANDLE* pSharedHandle)
835 {
837 
838  return D3D_OK;
839 }
840 
842 {
844 
845  return D3D_OK;
846 }
847 
848 HRESULT WINAPI IDirect3DDevice9Base_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
849 {
851 
852  return D3D_OK;
853 }
854 
855 HRESULT WINAPI IDirect3DDevice9Base_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
856 {
858 
859  return D3D_OK;
860 }
861 
862 HRESULT WINAPI IDirect3DDevice9Base_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestinationSurface, CONST POINT* pDestPoint)
863 {
865 
866  return D3D_OK;
867 }
868 
869 HRESULT WINAPI IDirect3DDevice9Base_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9* pSourceTexture, IDirect3DBaseTexture9* pDestinationTexture)
870 {
872 
873  return D3D_OK;
874 }
875 
876 HRESULT WINAPI IDirect3DDevice9Base_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pRenderTarget, IDirect3DSurface9* pDestSurface)
877 {
879 
880  return D3D_OK;
881 }
882 
883 /*++
884 * @name IDirect3DDevice9::GetFrontBufferData
885 * @implemented
886 *
887 * The function IDirect3DDevice9Base_GetFrontBufferData copies the content of
888 * the display device's front buffer in a system memory surface buffer.
889 *
890 * @param LPDIRECT3D iface
891 * Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
892 *
893 * @param UINT iSwapChain
894 * Swap chain index to get object for.
895 * The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
896 *
897 * @param IDirect3DSurface9* pDestSurface
898 * Pointer to a IDirect3DSurface9 to receive front buffer content
899 *
900 * @return HRESULT
901 * If the method successfully fills the pDestSurface buffer, the return value is D3D_OK.
902 * If iSwapChain is out of range or pDestSurface is a bad pointer, the return value
903 * will be D3DERR_INVALIDCALL.
904 */
905 HRESULT WINAPI IDirect3DDevice9Base_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9* pDestSurface)
906 {
908  IDirect3DSwapChain9* pSwapChain = NULL;
910  LOCK_D3DDEVICE9();
911 
912  IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
913  if (NULL == pSwapChain)
914  {
915  DPRINT1("Invalid iSwapChain parameter specified");
917  return D3DERR_INVALIDCALL;
918  }
919 
920  if (NULL == pDestSurface)
921  {
922  DPRINT1("Invalid pDestSurface parameter specified");
924  return D3DERR_INVALIDCALL;
925  }
926 
927  hResult = IDirect3DSwapChain9_GetFrontBufferData(pSwapChain, pDestSurface);
928 
930  return hResult;
931 }
932 
933 HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9* pSourceSurface, CONST RECT* pSourceRect, IDirect3DSurface9* pDestSurface, CONST RECT* pDestRect, D3DTEXTUREFILTERTYPE Filter)
934 {
936 
937  return D3D_OK;
938 }
939 
941 {
943 
944  return D3D_OK;
945 }
946 
947 HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9** ppSurface, HANDLE* pSharedHandle)
948 {
950 
951  return D3D_OK;
952 }
953 
954 /* IDirect3DDevice9 private interface */
956 {
958 }
959 
961 {
963 }
UINT WINAPI IDirect3DDevice9Base_GetNumberOfSwapChains(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:455
VOID AlignedFree(IN OUT LPVOID pObject)
Definition: d3d9_helpers.c:130
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:656
HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT *pThisSwapChain, D3DPRESENT_PARAMETERS *pPresentationParameters)
#define REFIID
Definition: guiddef.h:113
#define TRUE
Definition: types.h:120
#define E_NOINTERFACE
Definition: winerror.h:2364
#define IDirect3DSwapChain9_GetRasterStatus(p, a)
Definition: d3d9.h:444
struct IDirect3DDevice9 * LPDIRECT3DDEVICE9
Definition: d3d9.h:130
Type
Definition: Type.h:6
LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface)
#define Y(I)
HRESULT WINAPI IDirect3DDevice9Base_CreateTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9 **ppTexture, HANDLE *pSharedHandle)
Definition: d3d9_device.c:789
HRESULT WINAPI IDirect3DDevice9Base_CreateIndexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DIndexBuffer9 **ppIndexBuffer, HANDLE *pSharedHandle)
Definition: d3d9_device.c:841
HRESULT WINAPI IDirect3DDevice9Base_GetFrontBufferData(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSurface9 *pDestSurface)
Definition: d3d9_device.c:905
REFIID riid
Definition: precomp.h:44
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, DWORD Flags, CONST D3DGAMMARAMP *pRamp)
Definition: d3d9_device.c:678
static HRESULT InvalidCall(LPDIRECT3DDEVICE9_INT This, LPSTR ErrorMsg)
Definition: d3d9_device.c:27
ULONG WINAPI IDirect3DDevice9Base_AddRef(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:50
HRESULT WINAPI IDirect3DDevice9Base_Reset(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS *pPresentationParameters)
Definition: d3d9_device.c:468
HRESULT WINAPI IDirect3DDevice9Base_GetRenderTargetData(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9 *pRenderTarget, IDirect3DSurface9 *pDestSurface)
Definition: d3d9_device.c:876
enum _D3DPOOL D3DPOOL
#define D3DERR_INVALIDCALL
HRESULT WINAPI IDirect3DDevice9Base_GetSwapChain(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, IDirect3DSwapChain9 **ppSwapChain)
Definition: d3d9_device.c:402
HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, UINT iBackBuffer, D3DBACKBUFFER_TYPE Type, IDirect3DSurface9 **ppBackBuffer)
Definition: d3d9_device.c:568
HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs)
Definition: d3d9_device.c:646
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
char * LPSTR
Definition: xmlstorage.h:182
HRESULT WINAPI IDirect3DDevice9Base_UpdateSurface(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9 *pSourceSurface, CONST RECT *pSourceRect, IDirect3DSurface9 *pDestinationSurface, CONST POINT *pDestPoint)
Definition: d3d9_device.c:862
#define IDirect3DDevice9_GetNumberOfSwapChains(p)
Definition: d3d9.h:1522
Definition: send.c:47
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS *pRasterStatus)
Definition: d3d9_device.c:618
unsigned int BOOL
Definition: ntddk_ex.h:94
GLuint color
Definition: glext.h:6243
HRESULT WINAPI IDirect3DDevice9Base_SetCursorProperties(LPDIRECT3DDEVICE9 iface, UINT XHotSpot, UINT YHotSpot, IDirect3DSurface9 *pCursorBitmap)
Definition: d3d9_device.c:300
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
GLenum GLint ref
Definition: glext.h:6028
#define IDirect3DSwapChain9_GetFrontBufferData(p, a)
Definition: d3d9.h:442
#define IDirect3DSwapChain9_GetBackBuffer(p, a, b, c)
Definition: d3d9.h:443
smooth NULL
Definition: ftsmooth.c:416
D3D9_GETAVAILDRIVERMEMORY_TYPE dwMemoryType
enum _D3DFORMAT D3DFORMAT
HRESULT WINAPI IDirect3DDevice9Base_GetDisplayMode(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DDISPLAYMODE *pMode)
Definition: d3d9_device.c:232
#define UNLOCK_D3DDEVICE9()
Definition: d3d9_device.c:16
HRESULT CreateD3D9MipMap(DIRECT3DDEVICE9_INT *pDevice, UINT Width, UINT Height, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DTexture9 **ppTexture)
Definition: d3d9_mipmap.c:287
VOID WINAPI IDirect3DDevice9Base_Destroy(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:955
BOOL WINAPI IDirect3DDevice9Base_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow)
Definition: d3d9_device.c:312
HRESULT WINAPI IDirect3DDevice9Base_CreateVertexBuffer(LPDIRECT3DDEVICE9 iface, UINT Length, DWORD Usage, DWORD FVF, D3DPOOL Pool, IDirect3DVertexBuffer9 **ppVertexBuffer, HANDLE *pSharedHandle)
Definition: d3d9_device.c:834
HRESULT WINAPI IDirect3DDevice9Base_CreateDepthStencilSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Discard, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle)
Definition: d3d9_device.c:855
HRESULT WINAPI IDirect3DDevice9Base_GetDirect3D(LPDIRECT3DDEVICE9 iface, IDirect3D9 **ppD3D9)
Definition: d3d9_device.c:153
VOID WINAPI IDirect3DDevice9Base_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP *pRamp)
Definition: d3d9_device.c:724
_In_ DD_SURFACE_LOCAL * pSurface
Definition: winddi.h:3481
LONG HRESULT
Definition: typedefs.h:77
VOID DestroyD3D9DeviceData(IN LPD3D9_DEVICEDATA pDeviceData)
Definition: d3d9_create.c:150
const GUID IID_IUnknown
HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS *pPresentationParameters, IDirect3DSwapChain9 **ppSwapChain)
Definition: d3d9_device.c:343
#define WINAPI
Definition: msvc.h:8
LPDIRECT3DDEVICE9_INT IDirect3DDevice9ToImpl(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:19
Definition: bufpool.h:50
unsigned long DWORD
Definition: ntddk_ex.h:95
HRESULT WINAPI IDirect3DDevice9Base_QueryInterface(LPDIRECT3DDEVICE9 iface, REFIID riid, void **ppvObject)
Definition: d3d9_device.c:35
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
VOID WINAPI IDirect3DDevice9Base_SetCursorPosition(LPDIRECT3DDEVICE9 iface, int X, int Y, DWORD Flags)
Definition: d3d9_device.c:307
HRESULT WINAPI IDirect3DDevice9Base_GetCreationParameters(LPDIRECT3DDEVICE9 iface, D3DDEVICE_CREATION_PARAMETERS *pParameters)
Definition: d3d9_device.c:279
#define InterlockedDecrement
Definition: armddk.h:52
HRESULT WINAPI IDirect3DDevice9Base_Present(LPDIRECT3DDEVICE9 iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion)
Definition: d3d9_device.c:508
HRESULT WINAPI IDirect3DDevice9Base_CreateVolumeTexture(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, UINT Depth, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DVolumeTexture9 **ppVolumeTexture, HANDLE *pSharedHandle)
Definition: d3d9_device.c:820
REFIID LPVOID * ppvObject
Definition: precomp.h:44
HRESULT WINAPI IDirect3DDevice9Base_ColorFill(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9 *pSurface, CONST RECT *pRect, D3DCOLOR color)
Definition: d3d9_device.c:940
HRESULT WINAPI IDirect3DDevice9Base_TestCooperativeLevel(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:84
VOID Direct3DSwapChain9_GetGammaRamp(Direct3DSwapChain9_INT *pThisSwapChain, D3DGAMMARAMP *pRamp)
#define IDirect3DSwapChain9_AddRef(p)
Definition: d3d9.h:438
#define IDirect3D9_AddRef(p)
Definition: d3d9.h:219
#define D3DERR_OUTOFVIDEOMEMORY
Definition: d3d8.h:85
D3DFORMAT Format
Definition: d3d8types.h:1042
ULONG WINAPI IDirect3DDevice9Base_Release(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:58
#define D3D_OK
Definition: d3d.h:106
#define InterlockedIncrement
Definition: armddk.h:53
enum _D3DMULTISAMPLE_TYPE D3DMULTISAMPLE_TYPE
HRESULT GetAdapterCaps(const LPDIRECT3D9_DISPLAYADAPTER pDisplayAdapter, D3DDEVTYPE DeviceType, D3DCAPS9 *pDstCaps)
Definition: adapter.c:240
struct IDirect3DSwapChain9Vtbl * lpVtbl
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
VOID Direct3DSwapChain9_SetGammaRamp(Direct3DSwapChain9_INT *pThisSwapChain, DWORD Flags, CONST D3DGAMMARAMP *pRamp)
unsigned int UINT
Definition: ndis.h:50
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
#define DPRINT1
Definition: precomp.h:8
HRESULT WINAPI IDirect3DDevice9Base_CreateRenderTarget(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample, DWORD MultisampleQuality, BOOL Lockable, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle)
Definition: d3d9_device.c:848
enum _D3DTEXTUREFILTERTYPE D3DTEXTUREFILTERTYPE
Direct3DSwapChain9_INT * CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT *pBaseDevice, DWORD ChainIndex)
HRESULT WINAPI IDirect3DDevice9Base_UpdateTexture(LPDIRECT3DDEVICE9 iface, IDirect3DBaseTexture9 *pSourceTexture, IDirect3DBaseTexture9 *pDestinationTexture)
Definition: d3d9_device.c:869
UINT WINAPI IDirect3DDevice9Base_GetAvailableTextureMem(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:106
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:114
#define ULONG_PTR
Definition: config.h:101
VOID WINAPI IDirect3DDevice9Base_VirtualDestructor(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:960
enum _D3DBACKBUFFER_TYPE D3DBACKBUFFER_TYPE
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static const WCHAR iAdapter[]
Definition: provider.c:97
HRESULT WINAPI IDirect3DDevice9Base_CreateOffscreenPlainSurface(LPDIRECT3DDEVICE9 iface, UINT Width, UINT Height, D3DFORMAT Format, D3DPOOL Pool, IDirect3DSurface9 **ppSurface, HANDLE *pSharedHandle)
Definition: d3d9_device.c:947
HRESULT WINAPI IDirect3DDevice9Base_EvictManagedResources(LPDIRECT3DDEVICE9 iface)
Definition: d3d9_device.c:128
HRESULT WINAPI IDirect3DDevice9Base_GetDeviceCaps(LPDIRECT3DDEVICE9 iface, D3DCAPS9 *pCaps)
Definition: d3d9_device.c:192
#define IDirect3DSwapChain9_Present(p, a, b, c, d, e)
Definition: d3d9.h:441
#define memset(x, y, z)
Definition: compat.h:39
#define LOCK_D3DDEVICE9()
Definition: d3d9_device.c:15
struct _D3D9_Unknown6BC * pUnknown6BC
HRESULT WINAPI IDirect3DDevice9Base_CreateCubeTexture(LPDIRECT3DDEVICE9 iface, UINT EdgeLength, UINT Levels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, IDirect3DCubeTexture9 **ppCubeTexture, HANDLE *pSharedHandle)
Definition: d3d9_device.c:827
#define CONST
Definition: pedump.c:81
HRESULT WINAPI IDirect3DDevice9Base_StretchRect(LPDIRECT3DDEVICE9 iface, IDirect3DSurface9 *pSourceSurface, CONST RECT *pSourceRect, IDirect3DSurface9 *pDestSurface, CONST RECT *pDestRect, D3DTEXTUREFILTERTYPE Filter)
Definition: d3d9_device.c:933