Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
gte::Texture Class Reference

#include <GteTexture.h>

Inheritance diagram for gte::Texture:
Inheritance graph
[legend]

Classes

struct  Subresource
 

Public Types

enum  { MAX_MIPMAP_LEVELS = 16 }
 

Public Member Functions

void AutogenerateMipmaps ()
 
char const * GetDataFor (unsigned int item, unsigned int level) const
 
char * GetDataFor (unsigned int item, unsigned int level)
 
unsigned int GetDimension (int i) const
 
unsigned int GetDimensionFor (unsigned int level, int i) const
 
template<typename T >
T const * GetFor (unsigned int item, unsigned int level) const
 
template<typename T >
T * GetFor (unsigned int item, unsigned int level)
 
DFType GetFormat () const
 
unsigned int GetIndex (unsigned int item, unsigned int level) const
 
unsigned int GetNumBytesFor (unsigned int level) const
 
unsigned int GetNumDimensions () const
 
unsigned int GetNumElementsFor (unsigned int level) const
 
unsigned int GetNumItems () const
 
unsigned int GetNumLevels () const
 
unsigned int GetNumSubresources () const
 
unsigned int GetOffsetFor (unsigned int item, unsigned int level) const
 
Subresource GetSubresource (unsigned int index) const
 
bool HasMipmaps () const
 
bool WantAutogenerateMipmaps () const
 
- Public Member Functions inherited from gte::Resource
void CreateStorage ()
 
void DestroyStorage ()
 
template<typename T >
T const * Get () const
 
template<typename T >
T * Get ()
 
CopyType GetCopyType () const
 
char const * GetData () const
 
char * GetData ()
 
unsigned int GetElementSize () const
 
unsigned int GetNumActiveBytes () const
 
unsigned int GetNumActiveElements () const
 
unsigned int GetNumBytes () const
 
unsigned int GetNumElements () const
 
unsigned int GetOffset () const
 
Usage GetUsage () const
 
void ResetData ()
 
void SetCopyType (CopyType copyType)
 
void SetData (char *data)
 
void SetNumActiveElements (unsigned int numActiveElements)
 
void SetOffset (unsigned int offset)
 
void SetUsage (Usage usage)
 
virtual ~Resource ()
 
- Public Member Functions inherited from gte::GraphicsObject
std::string const & GetName () const
 
GraphicsObjectType GetType () const
 
bool IsBuffer () const
 
bool IsDrawingState () const
 
bool IsShader () const
 
bool IsTexture () const
 
bool IsTextureArray () const
 
void SetName (std::string const &name)
 
virtual ~GraphicsObject ()
 

Protected Member Functions

 Texture (unsigned int numItems, DFType format, unsigned int numDimensions, unsigned int dim0, unsigned int dim1, unsigned int dim2, bool hasMipmaps, bool createStorage)
 
- Protected Member Functions inherited from gte::Resource
 Resource (unsigned int numElements, size_t elementSize, bool createStorage=true)
 
- Protected Member Functions inherited from gte::GraphicsObject
 GraphicsObject ()
 

Static Protected Member Functions

static unsigned int GetTotalElements (unsigned int numItems, unsigned int dim0, unsigned int dim1, unsigned int dim2, bool hasMipmaps)
 

Protected Attributes

bool mAutogenerateMipmaps
 
DFType mFormat
 
bool mHasMipmaps
 
std::array< std::array< unsigned int, 3 >, MAX_MIPMAP_LEVELSmLDimension
 
std::array< unsigned int, MAX_MIPMAP_LEVELSmLNumBytes
 
std::vector< std::array< unsigned int, MAX_MIPMAP_LEVELS > > mLOffset
 
unsigned int mNumDimensions
 
unsigned int mNumItems
 
unsigned int mNumLevels
 
- Protected Attributes inherited from gte::Resource
CopyType mCopyType
 
char * mData
 
unsigned int mElementSize
 
unsigned int mNumActiveElements
 
unsigned int mNumBytes
 
unsigned int mNumElements
 
unsigned int mOffset
 
std::vector< char > mStorage
 
Usage mUsage
 
- Protected Attributes inherited from gte::GraphicsObject
std::string mName
 
GraphicsObjectType mType
 

Additional Inherited Members

- Static Public Member Functions inherited from gte::GraphicsObject
static void SubscribeForDestruction (std::shared_ptr< ListenerForDestruction > const &listener)
 
static void UnsubscribeForDestruction (std::shared_ptr< ListenerForDestruction > const &listener)
 

Detailed Description

Definition at line 19 of file GteTexture.h.

Member Enumeration Documentation

anonymous enum
Enumerator
MAX_MIPMAP_LEVELS 

Definition at line 46 of file GteTexture.h.

Constructor & Destructor Documentation

Texture::Texture ( unsigned int  numItems,
DFType  format,
unsigned int  numDimensions,
unsigned int  dim0,
unsigned int  dim1,
unsigned int  dim2,
bool  hasMipmaps,
bool  createStorage 
)
protected

Definition at line 15 of file GteTexture.cpp.

Member Function Documentation

void Texture::AutogenerateMipmaps ( )

Definition at line 133 of file GteTexture.cpp.

char const * gte::Texture::GetDataFor ( unsigned int  item,
unsigned int  level 
) const
inline

Definition at line 147 of file GteTexture.h.

char * gte::Texture::GetDataFor ( unsigned int  item,
unsigned int  level 
)
inline

Definition at line 153 of file GteTexture.h.

unsigned int gte::Texture::GetDimension ( int  i) const
inline

Definition at line 110 of file GteTexture.h.

unsigned int gte::Texture::GetDimensionFor ( unsigned int  level,
int  i 
) const
inline

Definition at line 125 of file GteTexture.h.

template<typename T >
T const * gte::Texture::GetFor ( unsigned int  item,
unsigned int  level 
) const
inline

Definition at line 159 of file GteTexture.h.

template<typename T >
T * gte::Texture::GetFor ( unsigned int  item,
unsigned int  level 
)
inline

Definition at line 165 of file GteTexture.h.

DFType gte::Texture::GetFormat ( ) const
inline

Definition at line 100 of file GteTexture.h.

unsigned int Texture::GetIndex ( unsigned int  item,
unsigned int  level 
) const

Definition at line 97 of file GteTexture.cpp.

unsigned int gte::Texture::GetNumBytesFor ( unsigned int  level) const
inline

Definition at line 136 of file GteTexture.h.

unsigned int gte::Texture::GetNumDimensions ( ) const
inline

Definition at line 105 of file GteTexture.h.

unsigned int gte::Texture::GetNumElementsFor ( unsigned int  level) const
inline

Definition at line 131 of file GteTexture.h.

unsigned int gte::Texture::GetNumItems ( ) const
inline

Definition at line 95 of file GteTexture.h.

unsigned int gte::Texture::GetNumLevels ( ) const
inline

Definition at line 120 of file GteTexture.h.

unsigned int gte::Texture::GetNumSubresources ( ) const
inline

Definition at line 170 of file GteTexture.h.

unsigned int gte::Texture::GetOffsetFor ( unsigned int  item,
unsigned int  level 
) const
inline

Definition at line 141 of file GteTexture.h.

Texture::Subresource Texture::GetSubresource ( unsigned int  index) const

Definition at line 110 of file GteTexture.cpp.

unsigned int Texture::GetTotalElements ( unsigned int  numItems,
unsigned int  dim0,
unsigned int  dim1,
unsigned int  dim2,
bool  hasMipmaps 
)
staticprotected

Definition at line 142 of file GteTexture.cpp.

bool gte::Texture::HasMipmaps ( ) const
inline

Definition at line 115 of file GteTexture.h.

bool gte::Texture::WantAutogenerateMipmaps ( ) const
inline

Definition at line 175 of file GteTexture.h.

Member Data Documentation

bool gte::Texture::mAutogenerateMipmaps
protected

Definition at line 89 of file GteTexture.h.

DFType gte::Texture::mFormat
protected

Definition at line 82 of file GteTexture.h.

bool gte::Texture::mHasMipmaps
protected

Definition at line 88 of file GteTexture.h.

std::array<std::array<unsigned int, 3>, MAX_MIPMAP_LEVELS> gte::Texture::mLDimension
protected

Definition at line 85 of file GteTexture.h.

std::array<unsigned int, MAX_MIPMAP_LEVELS> gte::Texture::mLNumBytes
protected

Definition at line 86 of file GteTexture.h.

std::vector<std::array<unsigned int, MAX_MIPMAP_LEVELS> > gte::Texture::mLOffset
protected

Definition at line 87 of file GteTexture.h.

unsigned int gte::Texture::mNumDimensions
protected

Definition at line 83 of file GteTexture.h.

unsigned int gte::Texture::mNumItems
protected

Definition at line 81 of file GteTexture.h.

unsigned int gte::Texture::mNumLevels
protected

Definition at line 84 of file GteTexture.h.


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


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:06