#include <T2Texture_DX8.h>
Definition at line 8 of file T2Texture_DX8.h.
◆ T2Texture()
Definition at line 111 of file T2Texture_DX8.cpp.
112{
113 m_uiDataSize = 0;
115 m_Unk1 = 0;
116 m_Unk2 = 0;
118}
IDirect3DTexture8 * m_pD3DTexture
◆ ~T2Texture()
T2Texture::~T2Texture |
( |
| ) |
|
◆ GetD3DCubeTexture()
IDirect3DCubeTexture8 * T2Texture::GetD3DCubeTexture |
( |
| ) |
|
|
inline |
Definition at line 31 of file T2Texture_DX8.h.
IDirect3DCubeTexture8 * m_pD3DCubeTexture
◆ GetD3DTexture()
IDirect3DTexture8 * T2Texture::GetD3DTexture |
( |
| ) |
|
|
inline |
◆ GetD3DVolumeTexture()
IDirect3DVolumeTexture8 * T2Texture::GetD3DVolumeTexture |
( |
| ) |
|
|
inline |
Definition at line 30 of file T2Texture_DX8.h.
IDirect3DVolumeTexture8 * m_pD3DVolumeTexture
◆ GetData()
void T2Texture::GetData |
( |
const void *& | a_rData, |
|
|
TUINT & | a_rDataSize ) |
|
inline |
Definition at line 15 of file T2Texture_DX8.h.
16 {
17 a_rData = m_pData;
18 a_rDataSize = m_uiDataSize;
19 }
◆ GetHeight()
TUINT T2Texture::GetHeight |
( |
| ) |
const |
◆ GetImageInfo()
const D3DXIMAGE_INFO & T2Texture::GetImageInfo |
( |
| ) |
const |
◆ GetMipLevels()
TUINT T2Texture::GetMipLevels |
( |
| ) |
const |
◆ GetWidth()
TUINT T2Texture::GetWidth |
( |
| ) |
const |
◆ Load()
HRESULT T2Texture::Load |
( |
| ) |
|
Definition at line 15 of file T2Texture_DX8.cpp.
16{
18
20
22 auto pD3DDevice = pRender->GetDirect3DDevice();
23
24 HRESULT hRes = D3DXGetImageInfoFromFileInMemory( m_pData, m_uiDataSize, &m_ImageInfo );
25
26 if ( hRes == S_OK )
27 {
28 if ( m_ImageInfo.ResourceType == D3DRTYPE_TEXTURE )
29 {
30 return D3DXCreateTextureFromFileInMemory(
31 pD3DDevice,
32 m_pData,
33 m_uiDataSize,
35 );
36 }
37 else
38 {
39 if ( m_ImageInfo.ResourceType == D3DRTYPE_VOLUMETEXTURE )
40 {
41 return D3DXCreateVolumeTextureFromFileInMemory(
42 pD3DDevice,
43 m_pData,
44 m_uiDataSize,
46 );
47 }
48 else if ( m_ImageInfo.ResourceType == D3DRTYPE_CUBETEXTURE )
49 {
50 return D3DXCreateCubeTextureFromFileInMemory(
51 pD3DDevice,
52 m_pData,
53 m_uiDataSize,
55 );
56 }
57
58 return D3DERR_WRONGTEXTUREFORMAT;
59 }
60 }
61
62 return hRes;
63}
#define TSTATICCAST(POINTERTYPE, VALUE)
#define TPROFILER_SCOPE()
static TFORCEINLINE TRenderInterface * GetSingleton()
◆ SetData()
void T2Texture::SetData |
( |
const void * | a_pData, |
|
|
TUINT | a_uiDataSize ) |
Definition at line 100 of file T2Texture_DX8.cpp.
101{
102 m_pData = a_pData;
103 m_uiDataSize = a_uiDataSize;
104}
◆ Unload()
void T2Texture::Unload |
( |
| ) |
|
Definition at line 65 of file T2Texture_DX8.cpp.
66{
68 {
71 }
72
73 if ( m_pData )
74 {
75 delete m_pData;
77 }
78}
◆ m_pD3DCubeTexture
IDirect3DCubeTexture8* T2Texture::m_pD3DCubeTexture |
◆ m_pD3DTexture
IDirect3DTexture8* T2Texture::m_pD3DTexture |
◆ m_pD3DVolumeTexture
IDirect3DVolumeTexture8* T2Texture::m_pD3DVolumeTexture |
The documentation for this class was generated from the following files: