Pyrogenesis  trunk
Public Member Functions | Private Attributes | Friends | List of all members
CTextureProperties Class Reference

Represents the filename and GL parameters of a texture, for passing to CTextureManager::CreateTexture. More...

#include <TextureManager.h>

Collaboration diagram for CTextureProperties:
Collaboration graph
[legend]

Public Member Functions

 CTextureProperties (const VfsPath &path)
 Use the given texture name, and default GL parameters. More...
 
void SetFilter (GLint filter)
 Set min/mag filter mode (typically GL_LINEAR_MIPMAP_LINEAR, GL_NEAREST, etc). More...
 
void SetWrap (GLint wrap)
 Set wrapping mode (typically GL_REPEAT, GL_CLAMP_TO_EDGE, etc). More...
 
void SetWrap (GLint wrap_s, GLint wrap_t)
 Set wrapping mode (typically GL_REPEAT, GL_CLAMP_TO_EDGE, etc), separately for S and T. More...
 
void SetMaxAnisotropy (float aniso)
 Set maximum anisotropy value. More...
 
void SetFormatOverride (GLenum format)
 Set GL texture upload format, to override the default. More...
 

Private Attributes

VfsPath m_Path
 
GLint m_Filter
 
GLint m_WrapS
 
GLint m_WrapT
 
float m_Aniso
 
GLenum m_Format
 

Friends

class CTextureManagerImpl
 
struct TextureCacheCmp
 
struct TPequal_to
 
struct TPhash
 

Detailed Description

Represents the filename and GL parameters of a texture, for passing to CTextureManager::CreateTexture.

Constructor & Destructor Documentation

CTextureProperties::CTextureProperties ( const VfsPath path)
inlineexplicit

Use the given texture name, and default GL parameters.

Member Function Documentation

void CTextureProperties::SetFilter ( GLint  filter)
inline

Set min/mag filter mode (typically GL_LINEAR_MIPMAP_LINEAR, GL_NEAREST, etc).

void CTextureProperties::SetFormatOverride ( GLenum  format)
inline

Set GL texture upload format, to override the default.

Typically GL_ALPHA or GL_LUMINANCE for 8-bit textures.

void CTextureProperties::SetMaxAnisotropy ( float  aniso)
inline

Set maximum anisotropy value.

Must be >= 1.0. Should be a power of 2.

void CTextureProperties::SetWrap ( GLint  wrap)
inline

Set wrapping mode (typically GL_REPEAT, GL_CLAMP_TO_EDGE, etc).

void CTextureProperties::SetWrap ( GLint  wrap_s,
GLint  wrap_t 
)
inline

Set wrapping mode (typically GL_REPEAT, GL_CLAMP_TO_EDGE, etc), separately for S and T.

Friends And Related Function Documentation

friend class CTextureManagerImpl
friend
friend struct TextureCacheCmp
friend
friend struct TPequal_to
friend
friend struct TPhash
friend

Member Data Documentation

float CTextureProperties::m_Aniso
private
GLint CTextureProperties::m_Filter
private
GLenum CTextureProperties::m_Format
private
VfsPath CTextureProperties::m_Path
private
GLint CTextureProperties::m_WrapS
private
GLint CTextureProperties::m_WrapT
private

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