Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Gray3D::cDXTexture Class Reference

#include <cDXTexture.h>

Inheritance diagram for Gray3D::cDXTexture:
Gray3D::cDXTextureBase Gray3D::cDXBase

Public Member Functions

 cDXTexture (PIXELS_t nWidth, PIXELS_t nHeight, UINT nMipLevels, D3DFORMAT eFormat, DWORD dwUsage, D3DPOOL ePool=D3DPOOL_DEFAULT)
 
virtual ~cDXTexture ()
 
 STDMETHOD_ (cString, get_Name)() const override
 
virtual HRESULT InitDeviceObjects (cDXDevice *pDXDev)
 
virtual HRESULT DeleteDeviceObjects ()
 
- Public Member Functions inherited from Gray3D::cDXTextureBase
 cDXTextureBase (PIXELS_t cx=0, PIXELS_t cy=0)
 
virtual ~cDXTextureBase ()
 
virtual bool UpdateOrigSize ()
 
PIXELS_t get_OrigSizeX () const noexcept
 
PIXELS_t get_OrigSizeY () const noexcept
 
cWinSize get_OrigSize ()
 
bool isLoaded () const noexcept
 
ID3DTextureget_DXTexture ()
 Load on demand? More...
 
HRESULT UpdateDescSize ()
 
bool GetDescSize (SIZE *pSize)
 The allocated size. More...
 
bool IsFullOpaque () const noexcept
 
- Public Member Functions inherited from Gray3D::cDXBase
 cDXBase (cDXDevice *pDXDev=nullptr) noexcept
 
virtual ~cDXBase ()
 
ID3DDeviceget_D3DDev () const noexcept
 
bool isInitDevice () const noexcept
 
bool isLostDevice () const noexcept
 
virtual HRESULT OnResetDeviceX ()
 
virtual HRESULT OnLostDeviceX ()
 
 UNITTEST_FRIEND (cDXBase)
 

Protected Attributes

UINT m_nMipLevels
 0 if D3DUSAGE_AUTOGENMIPMAP More...
 
D3DFORMAT m_eFormat
 D3DFMT_X8R8G8B8. More...
 
DWORD m_dwUsage
 D3DXCreateTexture D3DUSAGE_RENDERTARGET , mask. More...
 
D3DPOOL m_ePool
 D3DPOOL_DEFAULT, D3DPOOL_SYSTEMMEM. More...
 
- Protected Attributes inherited from Gray3D::cDXTextureBase
cIUnkPtr< ID3DTexturem_pDXTexture
 
cWinSize m_SizeDesc
 allocated size for the texture. may be rounded up to power of 2 (if TEXTURELOAD_FILTER) More...
 
bool m_IsFullOpaque
 alpha mask doesn't exist or is all ones. render this faster if assumed to be opaque. D3DFMT_X8R8G8B8 vs D3DFMT_A8R8G8B8 More...
 

Friends

class cDXSurface
 

Additional Inherited Members

- Public Attributes inherited from Gray3D::cDXTextureBase
cWinSize m_SizeOrig
 PIXELS_t size i intended it to be, may not be allocated/aligned size. before TEXTURELOAD_FILTER. More...
 
- Public Attributes inherited from Gray3D::cDXBase
cDXDevicem_pDXDev
 What device is this attached to (or should be)? InitDeviceObjects() was called and DeleteDeviceObjects() was not. More...
 
cIUnkPtr< ID3DDevicem_pD3DDev
 
- Protected Member Functions inherited from Gray3D::cDXTextureBase
HRESULT UpdateFullOpaqueHint ()
 

Detailed Description

DX texture not (normally) loaded from a file. (or cached by the texture manager?) Used for: Terrain Patch composite textures.

Constructor & Destructor Documentation

◆ cDXTexture()

Gray3D::cDXTexture::cDXTexture ( PIXELS_t  nWidth,
PIXELS_t  nHeight,
UINT  nMipLevels,
D3DFORMAT  eFormat,
DWORD  dwUsage,
D3DPOOL  ePool = D3DPOOL_DEFAULT 
)

◆ ~cDXTexture()

Gray3D::cDXTexture::~cDXTexture ( )
virtual

Member Function Documentation

◆ DeleteDeviceObjects()

HRESULT Gray3D::cDXTexture::DeleteDeviceObjects ( )
virtual

Reimplemented from Gray3D::cDXTextureBase.

◆ InitDeviceObjects()

HRESULT Gray3D::cDXTexture::InitDeviceObjects ( cDXDevice pDXDev)
virtual

Reimplemented from Gray3D::cDXBase.

◆ STDMETHOD_()

Gray3D::cDXTexture::STDMETHOD_ ( cString  ,
get_Name   
) const
inlineoverridevirtual

Friends And Related Function Documentation

◆ cDXSurface

friend class cDXSurface
friend

Member Data Documentation

◆ m_dwUsage

DWORD Gray3D::cDXTexture::m_dwUsage
protected

D3DXCreateTexture D3DUSAGE_RENDERTARGET , mask.

◆ m_eFormat

D3DFORMAT Gray3D::cDXTexture::m_eFormat
protected

D3DFMT_X8R8G8B8.

◆ m_ePool

D3DPOOL Gray3D::cDXTexture::m_ePool
protected

D3DPOOL_DEFAULT, D3DPOOL_SYSTEMMEM.

◆ m_nMipLevels

UINT Gray3D::cDXTexture::m_nMipLevels
protected

0 if D3DUSAGE_AUTOGENMIPMAP


The documentation for this class was generated from the following files: