2024-06-01 15:57:23 -05:00

61 lines
928 B
C++

#include "StdAfx.h"
#include "../eterBase/Stl.h"
#include "GrpTexture.h"
#include "StateManager.h"
void CGraphicTexture::DestroyDeviceObjects()
{
safe_release(m_lpd3dTexture);
}
void CGraphicTexture::Destroy()
{
DestroyDeviceObjects();
Initialize();
}
void CGraphicTexture::Initialize()
{
m_lpd3dTexture = NULL;
m_width = 0;
m_height = 0;
m_bEmpty = true;
}
bool CGraphicTexture::IsEmpty() const
{
return m_bEmpty;
}
void CGraphicTexture::SetTextureStage(int stage) const
{
assert(ms_lpd3dDevice != NULL);
STATEMANAGER.SetTexture(stage, m_lpd3dTexture);
}
LPDIRECT3DTEXTURE8 CGraphicTexture::GetD3DTexture() const
{
return m_lpd3dTexture;
}
int CGraphicTexture::GetWidth() const
{
return m_width;
}
int CGraphicTexture::GetHeight() const
{
return m_height;
}
CGraphicTexture::CGraphicTexture()
{
Initialize();
}
CGraphicTexture::~CGraphicTexture()
{
}
//martysama0134's 2e58d0b8baeb072acdf3afc4a5d1999f