ReactOS 0.4.15-dev-5672-gf73ac17
d3d9_callbacks.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _D3D9_GETAVAILDRIVERMEMORYDATA
 

Macros

#define D3D9_TEXTURETYPE_HALSURFACE   1
 
#define D3D9_TEXTURETYPE_BACKBUFFER   2
 

Typedefs

typedef enum _D3D9_GETAVAILDRIVERMEMORY_TYPE D3D9_GETAVAILDRIVERMEMORY_TYPE
 
typedef struct _D3D9_GETAVAILDRIVERMEMORYDATA D3D9_GETAVAILDRIVERMEMORYDATA
 
typedef struct _D3D9_GETAVAILDRIVERMEMORYDATALPD3D9_GETAVAILDRIVERMEMORYDATA
 

Enumerations

enum  _D3D9_GETAVAILDRIVERMEMORY_TYPE { D3D9_GETAVAILDRIVERMEMORY_TYPE_ALL = 0 , D3D9_GETAVAILDRIVERMEMORY_TYPE_LOCAL = 4 , D3D9_GETAVAILDRIVERMEMORY_TYPE_NONLOCAL = 5 }
 

Functions

typedef DWORD (WINAPI FAR *LPD3D9_GETAVAILDRIVERMEMORY)(LPD3D9_GETAVAILDRIVERMEMORYDATA)
 
DWORD WINAPI D3d9GetAvailDriverMemory (LPD3D9_GETAVAILDRIVERMEMORYDATA pData)
 

Macro Definition Documentation

◆ D3D9_TEXTURETYPE_BACKBUFFER

#define D3D9_TEXTURETYPE_BACKBUFFER   2

Definition at line 19 of file d3d9_callbacks.h.

◆ D3D9_TEXTURETYPE_HALSURFACE

#define D3D9_TEXTURETYPE_HALSURFACE   1

Definition at line 18 of file d3d9_callbacks.h.

Typedef Documentation

◆ D3D9_GETAVAILDRIVERMEMORY_TYPE

◆ D3D9_GETAVAILDRIVERMEMORYDATA

◆ LPD3D9_GETAVAILDRIVERMEMORYDATA

Enumeration Type Documentation

◆ _D3D9_GETAVAILDRIVERMEMORY_TYPE

Enumerator
D3D9_GETAVAILDRIVERMEMORY_TYPE_ALL 
D3D9_GETAVAILDRIVERMEMORY_TYPE_LOCAL 
D3D9_GETAVAILDRIVERMEMORY_TYPE_NONLOCAL 

Definition at line 11 of file d3d9_callbacks.h.

12{
@ D3D9_GETAVAILDRIVERMEMORY_TYPE_LOCAL
@ D3D9_GETAVAILDRIVERMEMORY_TYPE_NONLOCAL
@ D3D9_GETAVAILDRIVERMEMORY_TYPE_ALL
enum _D3D9_GETAVAILDRIVERMEMORY_TYPE D3D9_GETAVAILDRIVERMEMORY_TYPE

Function Documentation

◆ D3d9GetAvailDriverMemory()

DWORD WINAPI D3d9GetAvailDriverMemory ( LPD3D9_GETAVAILDRIVERMEMORYDATA  pData)

Definition at line 15 of file d3d9_callbacks.c.

16{
17 DWORD Ret = FALSE;
19 ZeroMemory(&Data, sizeof(Data));
20
21 if (D3D9_GETAVAILDRIVERMEMORY_TYPE_ALL == pData->dwMemoryType)
22 {
23 Data.DDSCaps.dwCaps = DDSCAPS_VIDEOMEMORY;
24 }
25 else if (D3D9_GETAVAILDRIVERMEMORY_TYPE_LOCAL == pData->dwMemoryType)
26 {
28 }
29 else if (D3D9_GETAVAILDRIVERMEMORY_TYPE_NONLOCAL == pData->dwMemoryType)
30 {
32 }
33
34 if (Data.DDSCaps.dwCaps != 0)
35 {
36 if (0 == pData->dwTextureType)
37 Data.DDSCaps.dwCaps |= DDSCAPS_TEXTURE;
38
39 if (pData->dwTextureType & D3D9_TEXTURETYPE_HALSURFACE)
40 Data.DDSCaps.dwCaps |= DDSCAPS_TEXTURE | DDSCAPS_3DDEVICE;
41
42 if (pData->dwTextureType & D3D9_TEXTURETYPE_BACKBUFFER)
43 Data.DDSCaps.dwCaps |= DDSCAPS_ZBUFFER;
44
45 Ret = OsThunkDdGetAvailDriverMemory(pData->pUnknown6BC->hDirectDrawLocal, (DD_GETAVAILDRIVERMEMORYDATA*)&Data);
46 pData->dwFree = Data.dwFree;
47 }
48
49 return Ret;
50}
DWORD WINAPI OsThunkDdGetAvailDriverMemory(HANDLE hDirectDraw, PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData)
#define D3D9_TEXTURETYPE_BACKBUFFER
#define D3D9_TEXTURETYPE_HALSURFACE
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DDSCAPS_ZBUFFER
Definition: ddraw.h:267
#define DDSCAPS_NONLOCALVIDMEM
Definition: ddraw.h:277
#define DDSCAPS_3DDEVICE
Definition: ddraw.h:263
#define DDSCAPS_TEXTURE
Definition: ddraw.h:262
#define DDSCAPS_VIDEOMEMORY
Definition: ddraw.h:264
#define DDSCAPS_LOCALVIDMEM
Definition: ddraw.h:276
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
#define ZeroMemory
Definition: winbase.h:1670

Referenced by GetD3D9DriverInfo().

◆ DWORD()

typedef DWORD ( WINAPI FAR LPD3D9_GETAVAILDRIVERMEMORY)