BambooIsland: ShaderManager Class Reference

BambooIsland Abgabe 2

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# ShaderManager Class Reference

A class which handles many Shader classes. More...

`#include <ShaderManager.h>`

List of all members.

## Public Member Functions

void | addShader (std::string name, std::string filename_vertex_shader, std::string filename_fragment_shader)
| constructs a Shader-instance with the given filenames and stores the created instance internally.
void | addShader (std::string name, std::string filename_vertex_shader, std::string filename_fragment_shader, std::string filename_geometry_shader)
| constructs a Shader-instance with the given filenames and stores the created instance internally.
bool | activateShader (std::string name)
GLint | getUniform (std::string uniform_name)
| Activates the given shader program.
GLint | getAttribute (std::string attribute_name)
| Returns the location of an uniform variable within the current active shader program.
void | pushActiveShader ()
| Returns the location of an attribute variable within the current active shader program.
void | popActiveShader ()
| pops the top shader from the stack and activates it
void | lockActiveShader ()
| locks the active shader, all activateShader(...) calls are ignored until unlocking
void | unlockActiveShader ()
| unlocks the active shader
bool | isActiveShaderLocked ()
| returns if the currently active shader is locked

## Static Public Member Functions

static ShaderManager * | instance ()

## Detailed Description

A class which handles many Shader classes.

This class supports handling of many shader classes. It provides methods for nested activating of shaders (push the current Shader, activate another and pop (reactivate) the previous one).

Furthermore, it provides methods to lock the active shader (all activateShader(...) calls are ignored), which can be used for things like enforcing a simple shader program when rendering the shadowmap or reflected objects.

Definition at line 27 of file ShaderManager.h.

## Member Function Documentation

void ShaderManager::pushActiveShader | ( |  | ) |

Returns the location of an attribute variable within the current active shader program.

pushs the active shader on the stack

Definition at line 73 of file ShaderManager.cpp.

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

- C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/ShaderManager.h
- C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/ShaderManager.cpp

All Classes Functions Variables Enumerations Enumerator