Base class for OpenGL Texture ID's.
More...
#include </home/werner/origo/vish/ocean/GLvish/TextureID.hpp>
List of all members.
Public Member Functions
-
virtual void bind (int i=0)=0
- Bind the texture with the given ID.
-
virtual void disable () const =0
- Disable texturing using this texture.
-
virtual void enable (int i=0)=0
- Enable this texture, if all is right.
-
virtual MemCore::RefPtr
< TextureBase > generate (const MemCore::WeakPtr< MemCore::Creature > &theCreator) const =0
-
int getTextureUnit () const
- Return the active texture unit selected here.
- bool SelectActiveTextureUnit () const
- Activate the associated texture unit Return false if run with an OpenGL version that does not support multiple texture units (pre 2.0) Calls glActiveTexture.
- bool setActiveTexture (int textureID)
- Associate a texture unit with this texture ID which relates to glActiveTexture(), as to be invoked via activate().
- TextureBase (const MemCore::WeakPtr< MemCore::Creature > &C, int textureID=0) throw ()
- Constructor, specify texture unit (optional, by default 0)
-
virtual ~TextureBase ()
- Virtual Destructor.
Public Attributes
-
struct GLVISH_API Generator
Detailed Description
Base class for OpenGL Texture ID's.
Supports multiple active texture units as specified in OpenGL 2.
Constructor & Destructor Documentation
Constructor, specify texture unit (optional, by default 0)
- Parameters:
-
C | the responsible Creator object |
Member Function Documentation
bool Wizt::TextureBase::SelectActiveTextureUnit |
( |
| ) |
const |
bool Wizt::TextureBase::setActiveTexture |
( |
int |
textureID | ) |
|
Associate a texture unit with this texture ID which relates to glActiveTexture(), as to be invoked via activate().
- Note:
- This is an initialization call and must only be called shortly after construction of the texture object, before any OpenGL texture calls are performed. This function only sets the internal texture ID, and does not require any OpenGL context, like the constructor.
The documentation for this struct was generated from the following files:
- ocean/GLvish/TextureID.hpp
- ocean/GLvish/TextureID.cpp