Shader Class Reference

Shader to be used with OpenGL. More...

#include <Shader.h>

List of all members.

Public Member Functions

 Shader ()
 Standard Constructor.
 Shader (const string &filename)
 Constructor.
 Shader (const Shader &source)
 Copy-constructor.
 ~Shader ()
 Destructor.
void bind ()
 Bind shader in OpenGL.
void disable ()
 Dis shader in OpenGL.
const string & getFilename () const
 Gets shader base filename (without suffix).
GLuint getGlName ()
 Gets OpenGL shader name.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.
Shader operator= (const Shader &shader)
 Operator =.

Private Attributes

struct shaderEntrydata
 data of the shader


Detailed Description

Shader to be used with OpenGL.

Provides shader loading and binding.


Constructor & Destructor Documentation

Shader::Shader (  ) 

Standard Constructor.

Shader::Shader ( const string &  filename  ) 

Constructor.

If an invalid filename was choosen, we got a problem

Parameters:
filename The base filename of the shader to be loaded (without .frag or .vert suffix)

Shader::Shader ( const Shader source  ) 

Copy-constructor.

Duplicates a shader

Shader::~Shader (  ) 

Destructor.

Destroys the Shader.


Member Function Documentation

void Shader::bind (  ) 

Bind shader in OpenGL.

Signals OpenGL to use this one as active shader

void Shader::disable (  ) 

Dis shader in OpenGL.

const string & Shader::getFilename (  )  const

Gets shader base filename (without suffix).

Returns:
The shaders's base filename (without .vert or .frag suffix)

GLuint Shader::getGlName (  ) 

Gets OpenGL shader name.

Returns:
The internal name (id) OpenGL has assigned this shader

string Shader::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

string Shader::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

enum classId Shader::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Shader Shader::operator= ( const Shader shader  )  [inline]

Operator =.


Member Data Documentation

struct shaderEntry* Shader::data [read, private]

data of the shader


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

Generated on Mon Jul 7 13:30:35 2008 for Firefly by  doxygen 1.5.6