UniShader  1.0.0a
Interface for GPGPU and working with shader programs
 All Classes Functions Typedefs Enumerations Enumerator
Public Member Functions
TextureUnit Class Reference

Texture unit class. More...

#include <TextureUnit.h>

List of all members.

Public Member Functions

void lock ()
 Lock.
bool makeActive ()
 Make texture unit active.
char getIndex () const
 Get texture unit index.
void release ()
 Release.

Detailed Description

Texture unit class.

Texture unit is a part of graphics card architecture. It is a component generally used for mapping texture on 3D geometry. Each graphics card have at least two of texture units.

Because only one texture can be associated with texture unit at a time, texture units have to be managed.


Member Function Documentation

char TextureUnit::getIndex ( ) const

Get texture unit index.

Return index of texture unit. Availible texture units in OpenGL are enumerated as GL_TEXTURE0, GL_TEXTURE1,..

Returns:
Texture unit index.

Lock.

Lock texture unit, making it unavailible.

Make texture unit active.

OpenGL texture modifying calls affect texture associated with active texture unit. Only one texture unit can be active in OpenGL context at a time. Texture unit must be locked before activating, otherwise error is produced.

Returns:
True if texture unit was made active susccessfully.

Release.

Release texture unit, making it availible.


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