My Project
Loading...
Searching...
No Matches
chai3d::cGenericTexture Class Reference

This class implements a base class for textures. More...

#include <CGenericTexture.h>

Inheritance diagram for chai3d::cGenericTexture:

Public Member Functions

 cGenericTexture ()
 Constructor of cGenericTexture.
 
virtual ~cGenericTexture ()
 Destructor of cGenericTexture.
 
virtual std::string getClassName ()
 This method returns the name of the object class.
 
virtual bool loadFromFile (const std::string &a_fileName)
 This method loads a texture image file.
 
virtual bool saveToFile (const std::string &a_fileName)
 This method saves a texture image file.
 
virtual void renderInitialize (cRenderOptions &a_options)
 This method enables texturing and set this texture as the current texture.
 
virtual void renderFinalize (cRenderOptions &a_options)
 This method disables texturing and should be called after triangles have been rendered.
 
virtual void markForUpdate ()
 This method marks this texture for GPU update.
 
virtual void markForDeleteAndUpdate ()
 This method marks this texture for GPU deletion and reinitialization.
 
void setEnabled (bool a_enabled)
 This method enables or disables texture mapping.
 
bool getEnabled () const
 This method returns true if the texture map is enabled, false otherwise.
 
- Public Member Functions inherited from chai3d::cGenericType
 cGenericType ()
 Constructor of cGenericType.
 
virtual ~cGenericType ()
 Destructor of cGenericType.
 
virtual int getObjectCounter ()
 This method return the value of the object counter.
 

Static Public Member Functions

static cGenericTexturePtr create ()
 Shared cGenericTexture allocator.
 

Protected Attributes

bool m_enabled
 If true, this texture is enabled, false otherwise.
 
std::string m_name
 Texture name.
 
std::string m_filename
 Texture filename.
 

Additional Inherited Members

- Public Attributes inherited from chai3d::cGenericType
std::string m_name
 Object name.
 
std::string m_filename
 Object filename.
 
void * m_userPtr
 This pointer can be used for any user purpose.
 
int m_userIndex
 This integer can be used for any user purpose.
 
- Static Protected Attributes inherited from chai3d::cGenericType
static int s_objectCounter = 0
 Static class counter.
 

Detailed Description

cGenericTexture implements a base class for OpenGL textures.

Constructor & Destructor Documentation

◆ cGenericTexture()

chai3d::cGenericTexture::cGenericTexture ( )
inline

◆ ~cGenericTexture()

virtual chai3d::cGenericTexture::~cGenericTexture ( )
inlinevirtual

Member Function Documentation

◆ create()

static cGenericTexturePtr chai3d::cGenericTexture::create ( )
inlinestatic

◆ getClassName()

virtual std::string chai3d::cGenericTexture::getClassName ( )
inlinevirtual

◆ loadFromFile()

virtual bool chai3d::cGenericTexture::loadFromFile ( const std::string &  a_fileName)
inlinevirtual

Reimplemented in chai3d::cTexture1d, and chai3d::cTextureVideo.

◆ saveToFile()

virtual bool chai3d::cGenericTexture::saveToFile ( const std::string &  a_fileName)
inlinevirtual

Reimplemented in chai3d::cTexture1d.

◆ renderInitialize()

virtual void chai3d::cGenericTexture::renderInitialize ( cRenderOptions &  a_options)
inlinevirtual

◆ renderFinalize()

virtual void chai3d::cGenericTexture::renderFinalize ( cRenderOptions &  a_options)
inlinevirtual

◆ markForUpdate()

virtual void chai3d::cGenericTexture::markForUpdate ( )
inlinevirtual

Reimplemented in chai3d::cTexture1d.

◆ markForDeleteAndUpdate()

virtual void chai3d::cGenericTexture::markForDeleteAndUpdate ( )
inlinevirtual

Reimplemented in chai3d::cTexture1d.

◆ setEnabled()

void chai3d::cGenericTexture::setEnabled ( bool  a_enabled)
inline

◆ getEnabled()

bool chai3d::cGenericTexture::getEnabled ( ) const
inline

Member Data Documentation

◆ m_enabled

bool chai3d::cGenericTexture::m_enabled
protected

◆ m_name

std::string chai3d::cGenericTexture::m_name
protected

◆ m_filename

std::string chai3d::cGenericTexture::m_filename
protected

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