#include <Shader.h>
LayerSceneGraph::Shader::Shader |
( |
const char * |
vertexshaderCode, |
|
|
const char * |
fragmentShaderCode |
|
) |
| |
LayerSceneGraph::Shader::~Shader |
( |
| ) |
|
|
virtual |
Shader destructor Detachs and deletes each shader. Deletes shader program too.
void LayerSceneGraph::Shader::bindAttributes |
( |
| ) |
|
Binds attributes "position" and "textureCoordinates"
void LayerSceneGraph::Shader::enableTexture |
( |
| ) |
|
|
inline |
Some routines necessaries to use textures. It generates a texture and configures texture filters.
GLint LayerSceneGraph::Shader::getLinkStatus |
( |
| ) |
|
Returns the value of "linked" variable for debug purposes.
GLuint LayerSceneGraph::Shader::getProgram |
( |
| ) |
|
GLuint LayerSceneGraph::Shader::loadShader |
( |
GLenum |
type, |
|
|
const char * |
shaderSrc |
|
) |
| |
This method creates, loads and compiles a new shader.
void LayerSceneGraph::Shader::setUpShader |
( |
const char * |
vertexshaderCode, |
|
|
const char * |
fragmentShaderCode |
|
) |
| |
|
inline |
This method attachs both vertex and fragment shaders to a shader program. it also binds default attributes inside the shaders and calls a routine which enable texturing
GLuint LayerSceneGraph::Shader::fragmentShader |
|
private |
GLuint LayerSceneGraph::Shader::gvSamplerHandle |
|
private |
GLint LayerSceneGraph::Shader::linked |
|
private |
GLuint LayerSceneGraph::Shader::program |
|
private |
GLuint LayerSceneGraph::Shader::textureId |
|
private |
GLuint LayerSceneGraph::Shader::vertexShader |
|
private |
The documentation for this class was generated from the following files: