ReactOS  0.4.15-dev-1150-g593bcce
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 }
#define LOCK_D3DDEVICE9()
Definition: d3d9_texture.c:10
Direct3DBaseTexture9_INT * IDirect3DBaseTexture9ToImpl(LPDIRECT3DBASETEXTURE9 iface)
Definition: d3d9_texture.c:14
enum _D3DTEXTUREFILTERTYPE D3DTEXTUREFILTERTYPE
#define UNLOCK_D3DDEVICE9()
Definition: d3d9_texture.c:11

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;
115  LOCK_D3DDEVICE9();
116 
117  MipMapLevels = This->MipMapLevels;
118 
120  return MipMapLevels;
121 }
#define LOCK_D3DDEVICE9()
Definition: d3d9_texture.c:10
unsigned long DWORD
Definition: ntddk_ex.h:95
Direct3DBaseTexture9_INT * IDirect3DBaseTexture9ToImpl(LPDIRECT3DBASETEXTURE9 iface)
Definition: d3d9_texture.c:14
#define UNLOCK_D3DDEVICE9()
Definition: d3d9_texture.c:11

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 }
#define LOCK_D3DDEVICE9()
Definition: d3d9_texture.c:10
unsigned long DWORD
Definition: ntddk_ex.h:95
Direct3DBaseTexture9_INT * IDirect3DBaseTexture9ToImpl(LPDIRECT3DBASETEXTURE9 iface)
Definition: d3d9_texture.c:14
#define UNLOCK_D3DDEVICE9()
Definition: d3d9_texture.c:11

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 }
smooth NULL
Definition: ftsmooth.c:416
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
#define ULONG_PTR
Definition: config.h:101

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 }
IDirect3DBaseTexture9Vtbl * lpVtbl
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
#define D3DUSAGE_AUTOGENMIPMAP
Definition: d3d9types.h:113
D3DTEXTUREFILTERTYPE FilterType
Definition: bufpool.h:50
Direct3DResource9_INT BaseResource
void InitDirect3DResource9(Direct3DResource9_INT *pResource, D3DPOOL Pool, LPDIRECT3DDEVICE9_INT pBaseDevice, enum REF_TYPE RefType)
Definition: d3d9_resource.c:11
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1216

Referenced by CreateD3D9MipMap().