SuzanneIsland: An island of Real-time rendering effects!
Public Member Functions | Data Fields
Shader Class Reference

Shader class. More...

#include <shader.h>

Public Member Functions

 Shader (const std::string &vertexShader, const std::string &fragmentShader)
 
void useShader () const
 Set this as the active shader program. More...
 
GLint getUniformLocation (const std::string &name)
 Return location of shader uniform if value not yet cached it is retrieved via glGetUniformLocation glGetUniformLocation should not be called every frame since it involves expensive string search!
 

Data Fields

GLuint programHandle
 

Detailed Description

Shader class.

This loads and compiles glsl shader files and creates a linked shader program. The program can later be activated when needed.

Member Function Documentation

§ useShader()

void Shader::useShader ( ) const

Set this as the active shader program.

Only one shader program can be active at a time in the current opengl context.


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