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

#include <cDXTexture.h>

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

Public Member Functions

 cDXTextureBase (PIXELS_t cx=0, PIXELS_t cy=0)
 
virtual ~cDXTextureBase ()
 
 STDMETHOD_ (cString, get_Name)() const =0
 
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...
 
virtual HRESULT DeleteDeviceObjects ()
 
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 InitDeviceObjects (cDXDevice *pDXDev)
 
virtual HRESULT OnResetDeviceX ()
 
virtual HRESULT OnLostDeviceX ()
 
 UNITTEST_FRIEND (cDXBase)
 

Public Attributes

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

HRESULT UpdateFullOpaqueHint ()
 

Protected Attributes

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...
 

Detailed Description

manage a DirectX ID3DTexture/IDirect3DTexture9. (may be file or created internally) A texture can be made of 1 or many MIP Mapped surfaces. cSurfaceBase Can be associated with a model or a sprite set.

Constructor & Destructor Documentation

◆ cDXTextureBase()

Gray3D::cDXTextureBase::cDXTextureBase ( PIXELS_t  cx = 0,
PIXELS_t  cy = 0 
)

◆ ~cDXTextureBase()

Gray3D::cDXTextureBase::~cDXTextureBase ( )
virtual

Member Function Documentation

◆ DeleteDeviceObjects()

HRESULT Gray3D::cDXTextureBase::DeleteDeviceObjects ( )
virtual

Must release this.

Reimplemented from Gray3D::cDXBase.

Reimplemented in Gray3D::cXTextureFile, and Gray3D::cDXTexture.

◆ get_DXTexture()

ID3DTexture * Gray3D::cDXTextureBase::get_DXTexture ( )

Load on demand?

Load on demand ?

◆ get_OrigSize()

cWinSize Gray3D::cDXTextureBase::get_OrigSize ( )
inline

◆ get_OrigSizeX()

PIXELS_t Gray3D::cDXTextureBase::get_OrigSizeX ( ) const
inlinenoexcept

◆ get_OrigSizeY()

PIXELS_t Gray3D::cDXTextureBase::get_OrigSizeY ( ) const
inlinenoexcept

◆ GetDescSize()

bool Gray3D::cDXTextureBase::GetDescSize ( SIZE *  pSize)

The allocated size.

Get the allocated size m_SizeDesc.

Note
This may be a change to a power of 2 ?

◆ IsFullOpaque()

bool Gray3D::cDXTextureBase::IsFullOpaque ( ) const
inlinenoexcept

◆ isLoaded()

bool Gray3D::cDXTextureBase::isLoaded ( ) const
inlinenoexcept

◆ STDMETHOD_()

Gray3D::cDXTextureBase::STDMETHOD_ ( cString  ,
get_Name   
) const
pure virtual

◆ UpdateDescSize()

HRESULT Gray3D::cDXTextureBase::UpdateDescSize ( )

Filtering may change the actual size loaded from m_SizeOrig. ASSUME InitDeviceObjects calls this.

◆ UpdateFullOpaqueHint()

HRESULT Gray3D::cDXTextureBase::UpdateFullOpaqueHint ( )
protected

compute m_IsFullOpaque. its not so costly as it looks, since we've loaded/filtered whole texture already

◆ UpdateOrigSize()

virtual bool Gray3D::cDXTextureBase::UpdateOrigSize ( )
inlinevirtual

We can sometimes read the size before actually loading the image file.

Reimplemented in Gray3D::cXTextureFile.

Member Data Documentation

◆ m_IsFullOpaque

bool Gray3D::cDXTextureBase::m_IsFullOpaque
protected

alpha mask doesn't exist or is all ones. render this faster if assumed to be opaque. D3DFMT_X8R8G8B8 vs D3DFMT_A8R8G8B8

◆ m_pDXTexture

cIUnkPtr<ID3DTexture> Gray3D::cDXTextureBase::m_pDXTexture
protected

◆ m_SizeDesc

cWinSize Gray3D::cDXTextureBase::m_SizeDesc
protected

allocated size for the texture. may be rounded up to power of 2 (if TEXTURELOAD_FILTER)

◆ m_SizeOrig

cWinSize Gray3D::cDXTextureBase::m_SizeOrig

PIXELS_t size i intended it to be, may not be allocated/aligned size. before TEXTURELOAD_FILTER.


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