![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cXTextureFile.h>
Public Member Functions | |
cXTextureFile (const FILECHAR_t *pstrTexPath, size_t nTextureFileSize=0, TEXTURELOAD_t dwFlags=TEXTURELOAD_NOP) | |
virtual | ~cXTextureFile (void) |
bool | isResourceLoaded () const noexcept override |
STDMETHOD_ (cString, get_Name)() const | |
virtual HRESULT | InitDeviceObjects (cDXDevice *pDXDev) |
virtual HRESULT | DeleteDeviceObjects () |
virtual bool | UpdateOrigSize () |
![]() | |
cDXTextureBase (PIXELS_t cx=0, PIXELS_t cy=0) | |
virtual | ~cDXTextureBase () |
PIXELS_t | get_OrigSizeX () const noexcept |
PIXELS_t | get_OrigSizeY () const noexcept |
cWinSize | get_OrigSize () |
bool | isLoaded () const noexcept |
ID3DTexture * | get_DXTexture () |
Load on demand? More... | |
HRESULT | UpdateDescSize () |
bool | GetDescSize (SIZE *pSize) |
The allocated size. More... | |
bool | IsFullOpaque () const noexcept |
![]() | |
cDXBase (cDXDevice *pDXDev=nullptr) noexcept | |
virtual | ~cDXBase () |
ID3DDevice * | get_D3DDev () const noexcept |
bool | isInitDevice () const noexcept |
bool | isLostDevice () const noexcept |
virtual HRESULT | OnResetDeviceX () |
virtual HRESULT | OnLostDeviceX () |
UNITTEST_FRIEND (cDXBase) | |
![]() | |
cXResourceFile (const FILECHAR_t *pszFileName) | |
virtual | ~cXResourceFile () |
cStringF | get_FilePath () const |
void | put_FilePath (const FILECHAR_t *pszFileName) |
STDMETHOD_ (cString, get_Name)() const | |
cStringF | get_FullPath () const |
cStringF | MakePeerPath (const FILECHAR_t *pszName) const |
void | put_LoadedState (HRESULT hResLoad) |
virtual HRESULT | LoadResource () |
![]() | |
cRefBase (int iRefCount=0) noexcept | |
virtual | ~cRefBase () |
int | get_RefCount () const noexcept |
HASHCODE_t | get_HashCode () const noexcept |
STDMETHOD_ (HASHCODE_t, get_HashCodeX)() const noexcept | |
virtual void | onFinalRelease () |
bool | isValidObj () const noexcept |
STDMETHOD_ (ULONG, AddRef)(void) override | |
STDMETHOD_ (ULONG, Release)(void) override | |
STDMETHOD() | QueryInterface (const IID &riid, void __RPC_FAR *__RPC_FAR *ppvObject) override |
void | IncRefCount () |
void | DecRefCount () |
bool | isStaticConstruct () const noexcept |
void | StaticConstruct () |
void | StaticDestruct () |
bool | isDestructing () noexcept |
void | SetDestructing () |
Static Public Member Functions | |
static HRESULT | FindTextureFile (cStringF &sFilePath, cFileStatus *pRetStatus=nullptr) |
![]() | |
static HRESULT GRAYCALL | OnFAIL (HRESULT hRes) |
static. so we can trap all errors here. More... | |
Public Attributes | |
const size_t | m_nTextureFileSize |
size of this texture file, for total textures loaded statistics. More... | |
int | m_iBatchGeneration |
USE_ITEM_BATCHMESHMAT. More... | |
cArrayPtr< CObject > | m_aBatchUsers |
cDXMeshMaterialX or CSceneTreeDef type objects in scene using this texture. More... | |
![]() | |
cWinSize | m_SizeOrig |
PIXELS_t size i intended it to be, may not be allocated/aligned size. before TEXTURELOAD_FILTER. More... | |
![]() | |
cDXDevice * | m_pDXDev |
What device is this attached to (or should be)? InitDeviceObjects() was called and DeleteDeviceObjects() was not. More... | |
cIUnkPtr< ID3DDevice > | m_pD3DDev |
Static Public Attributes | |
static ITERATE_t | sm_nAllocs = 0 |
count total textures loaded. More... | |
static size_t | sm_nAllocTotalBytes = 0 |
count total More... | |
static int | sm_iBatchGeneration = 1 |
Protected Attributes | |
const TEXTURELOAD_t | m_dwFlags |
use D3DXCreateTextureFromFile() else use a no Filter version to avoid stretching More... | |
![]() | |
cIUnkPtr< ID3DTexture > | m_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... | |
![]() | |
HRESULT | m_hResLoad |
0=loaded OK, <0 = it failed to load for some reason! OLE_E_BLANK = have not yet tried to load. More... | |
Additional Inherited Members | |
![]() | |
HRESULT | UpdateFullOpaqueHint () |
![]() | |
static cStringF | s_sFileLoading |
name of file loading for debug. More... | |
A texture loaded from a resource file for use with DirectX. Load in system memory and/or video memory. Managed via cXTextureMgr possibly Disposable. retain the ability to reload this if it is disposed/unloaded. .dds .jpg .png .tga .bmp MIME_EXT_bmp
Gray3D::cXTextureFile::cXTextureFile | ( | const FILECHAR_t * | pstrTexPath, |
size_t | nTextureFileSize = 0 , |
||
TEXTURELOAD_t | dwFlags = TEXTURELOAD_NOP |
||
) |
|
virtual |
|
virtual |
Reimplemented from Gray3D::cDXTextureBase.
|
static |
rsFilePath = full path of the file. Don't care if the file exactly does not exist?
Load the texture file on demand. virtual HRESULT LoadResource();
Reimplemented from Gray3D::cDXBase.
|
inlineoverridevirtualnoexcept |
Reimplemented from Gray3D::cXResourceFile.
|
inlinevirtual |
Implements Gray3D::cDXTextureBase.
|
virtual |
read size from the file directly. Not necessarily the same as GetDescSize(). Maybe filtered (Stretched).
Reimplemented from Gray3D::cDXTextureBase.
cDXMeshMaterialX or CSceneTreeDef type objects in scene using this texture.
|
protected |
use D3DXCreateTextureFromFile() else use a no Filter version to avoid stretching
int Gray3D::cXTextureFile::m_iBatchGeneration |
USE_ITEM_BATCHMESHMAT.
const size_t Gray3D::cXTextureFile::m_nTextureFileSize |
size of this texture file, for total textures loaded statistics.
|
static |
|
static |
count total textures loaded.
|
static |
count total