ReactOS 0.4.16-dev-338-g34e76ad
d3d9_texture.c File Reference
#include "d3d9_texture.h"
Include dependency graph for d3d9_texture.c:

Go to the source code of this file.

Macros

#define LOCK_D3DDEVICE9()   D3D9BaseObject_LockDevice(&This->BaseResource.BaseObject)
 
#define UNLOCK_D3DDEVICE9()   D3D9BaseObject_UnlockDevice(&This->BaseResource.BaseObject)
 

Functions

Direct3DBaseTexture9_INTIDirect3DBaseTexture9ToImpl (LPDIRECT3DBASETEXTURE9 iface)
 
void InitDirect3DBaseTexture9 (Direct3DBaseTexture9_INT *pBaseTexture, IDirect3DBaseTexture9Vtbl *pVtbl, DWORD Usage, UINT Levels, D3DFORMAT Format, D3DPOOL Pool, struct _Direct3DDevice9_INT *pDevice, enum REF_TYPE RefType)
 
D3DTEXTUREFILTERTYPE WINAPI D3D9Texture_GetAutoGenFilterType (LPDIRECT3DBASETEXTURE9 iface)
 
DWORD WINAPI D3D9Texture_GetLOD (LPDIRECT3DBASETEXTURE9 iface)
 
DWORD WINAPI D3D9Texture_GetLevelCount (LPDIRECT3DBASETEXTURE9 iface)
 

Macro Definition Documentation

◆ LOCK_D3DDEVICE9

#define LOCK_D3DDEVICE9 ( )    D3D9BaseObject_LockDevice(&This->BaseResource.BaseObject)

Definition at line 10 of file d3d9_texture.c.

◆ UNLOCK_D3DDEVICE9

#define UNLOCK_D3DDEVICE9 ( )    D3D9BaseObject_UnlockDevice(&This->BaseResource.BaseObject)

Definition at line 11 of file d3d9_texture.c.

Function Documentation

◆ D3D9Texture_GetAutoGenFilterType()

D3DTEXTUREFILTERTYPE WINAPI D3D9Texture_GetAutoGenFilterType ( LPDIRECT3DBASETEXTURE9  iface)

Definition at line 58 of file d3d9_texture.c.

59{
60 D3DTEXTUREFILTERTYPE FilterType;
63
64 FilterType = This->dwFilterType;
65
67 return FilterType;
68}
enum _D3DTEXTUREFILTERTYPE D3DTEXTUREFILTERTYPE
#define UNLOCK_D3DDEVICE9()
Definition: d3d9_texture.c:11
#define LOCK_D3DDEVICE9()
Definition: d3d9_texture.c:10
Direct3DBaseTexture9_INT * IDirect3DBaseTexture9ToImpl(LPDIRECT3DBASETEXTURE9 iface)
Definition: d3d9_texture.c:14

Referenced by D3D9MipMap_GetAutoGenFilterType().

◆ D3D9Texture_GetLevelCount()

DWORD WINAPI D3D9Texture_GetLevelCount ( LPDIRECT3DBASETEXTURE9  iface)

Definition at line 111 of file d3d9_texture.c.

112{
113 DWORD MipMapLevels;
116
117 MipMapLevels = This->MipMapLevels;
118
120 return MipMapLevels;
121}
unsigned long DWORD
Definition: ntddk_ex.h:95

Referenced by D3D9MipMap_GetLevelCount().

◆ D3D9Texture_GetLOD()

DWORD WINAPI D3D9Texture_GetLOD ( LPDIRECT3DBASETEXTURE9  iface)

Definition at line 84 of file d3d9_texture.c.

85{
86 DWORD MaxLOD = 0;
89
90 if (This->BaseResource.bIsManaged)
91 MaxLOD = This->MaxLOD;
92
94 return MaxLOD;
95}

Referenced by D3D9MipMap_GetLOD().

◆ IDirect3DBaseTexture9ToImpl()

Direct3DBaseTexture9_INT * IDirect3DBaseTexture9ToImpl ( LPDIRECT3DBASETEXTURE9  iface)

Definition at line 14 of file d3d9_texture.c.

15{
16 if (NULL == iface)
17 return NULL;
18
20}
#define NULL
Definition: types.h:112
#define ULONG_PTR
Definition: config.h:101
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Referenced by D3D9Texture_GetAutoGenFilterType(), D3D9Texture_GetLevelCount(), and D3D9Texture_GetLOD().

◆ InitDirect3DBaseTexture9()

void InitDirect3DBaseTexture9 ( Direct3DBaseTexture9_INT pBaseTexture,
IDirect3DBaseTexture9Vtbl *  pVtbl,
DWORD  Usage,
UINT  Levels,
D3DFORMAT  Format,
D3DPOOL  Pool,
struct _Direct3DDevice9_INT pDevice,
enum REF_TYPE  RefType 
)

Definition at line 22 of file d3d9_texture.c.

30{
31 InitDirect3DResource9(&pBaseTexture->BaseResource, Pool, pDevice, RefType);
32
33 pBaseTexture->lpVtbl = pVtbl;
34 pBaseTexture->Format = Format;
35 pBaseTexture->wPaletteIndex = 0xFFFF;
36 pBaseTexture->Usage = Usage;
37 pBaseTexture->MipMapLevels = Levels;
38 pBaseTexture->MipMapLevels2 = Levels;
39
40 pBaseTexture->FilterType = D3DTEXF_LINEAR;
41 pBaseTexture->bIsAutoGenMipMap = (Usage & D3DUSAGE_AUTOGENMIPMAP) != 0;
42}
Definition: bufpool.h:50
@ D3DTEXF_LINEAR
Definition: d3d8types.h:872
void InitDirect3DResource9(Direct3DResource9_INT *pResource, D3DPOOL Pool, LPDIRECT3DDEVICE9_INT pBaseDevice, enum REF_TYPE RefType)
Definition: d3d9_resource.c:11
#define D3DUSAGE_AUTOGENMIPMAP
Definition: d3d9types.h:113
FxDevice * pDevice
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
Direct3DResource9_INT BaseResource
IDirect3DBaseTexture9Vtbl * lpVtbl
D3DTEXTUREFILTERTYPE FilterType

Referenced by CreateD3D9MipMap().