OpenGL Shader data structure. More...
#include <Visualizer.h>
Public Member Functions | |
void | disableTextures () const |
Disable texture maps and color fragments by interpolating vertex colors. | |
void | enableTextureMaps () const |
Enable texture maps and color fragments using an RGB texture map. | |
void | enableTextureMasks () const |
Enable texture masks and color fragments by interpolating vertex colors. | |
void | setTransformationMatrix (const glm::mat4 &matrix) const |
Set the shader transformation matrix, i.e., the Affine transformation applied to all vertices. | |
void | setDepthBiasMatrix (const glm::mat4 &matrix) const |
Set the depth bias matrix for shadows. | |
void | setLightDirection (const helios::vec3 &direction) const |
Set the direction of the light (sun) | |
void | setLightingModel (uint lightingmodel) const |
Set the lighting model. | |
void | setLightIntensity (float lightintensity) const |
Set the intensity of the light source. | |
void | useShader () const |
Set shader as current. | |
void | initialize (const char *vertex_shader_file, const char *fragment_shader_file, Visualizer *visualizer_ptr) |
Initialize the shader. | |
Data Fields | |
uint | shaderID |
GLint | textureUniform |
GLint | shadowmapUniform |
GLint | transformMatrixUniform |
GLint | depthBiasUniform |
GLint | lightDirectionUniform |
GLint | lightingModelUniform |
GLint | RboundUniform |
GLint | lightIntensityUniform |
std::vector< GLuint > | vertex_array_IDs |
GLint | uvRescaleUniform |
bool | initialized = false |
Indicates whether initialize() has been successfully called. | |
OpenGL Shader data structure.
Definition at line 69 of file Visualizer.h.
Shader::~Shader | ( | ) |
Definition at line 1337 of file VisualizerRendering.cpp.
void Shader::disableTextures | ( | ) | const |
Disable texture maps and color fragments by interpolating vertex colors.
Definition at line 1345 of file VisualizerRendering.cpp.
void Shader::enableTextureMaps | ( | ) | const |
Enable texture maps and color fragments using an RGB texture map.
Definition at line 1350 of file VisualizerRendering.cpp.
void Shader::enableTextureMasks | ( | ) | const |
Enable texture masks and color fragments by interpolating vertex colors.
Definition at line 1365 of file VisualizerRendering.cpp.
void Shader::initialize | ( | const char * | vertex_shader_file, |
const char * | fragment_shader_file, | ||
Visualizer * | visualizer_ptr | ||
) |
Initialize the shader.
[in] | vertex_shader_file | Name of vertex shader file to be used by OpenGL in rendering graphics |
[in] | fragment_shader_file | Name of fragment shader file to be used by OpenGL in rendering graphics |
[in] | visualizer_ptr | Pointer to the Visualizer class |
Definition at line 1170 of file VisualizerRendering.cpp.
void Shader::setDepthBiasMatrix | ( | const glm::mat4 & | matrix | ) | const |
Set the depth bias matrix for shadows.
Definition at line 1382 of file VisualizerRendering.cpp.
void Shader::setLightDirection | ( | const helios::vec3 & | direction | ) | const |
Set the direction of the light (sun)
Definition at line 1386 of file VisualizerRendering.cpp.
void Shader::setLightingModel | ( | uint | lightingmodel | ) | const |
Set the lighting model.
Definition at line 1390 of file VisualizerRendering.cpp.
void Shader::setLightIntensity | ( | float | lightintensity | ) | const |
Set the intensity of the light source.
Definition at line 1394 of file VisualizerRendering.cpp.
void Shader::setTransformationMatrix | ( | const glm::mat4 & | matrix | ) | const |
Set the shader transformation matrix, i.e., the Affine transformation applied to all vertices.
Definition at line 1378 of file VisualizerRendering.cpp.
void Shader::useShader | ( | ) | const |
Set shader as current.
Definition at line 1398 of file VisualizerRendering.cpp.
GLint Shader::depthBiasUniform |
Definition at line 113 of file Visualizer.h.
bool Shader::initialized = false |
Indicates whether initialize() has been successfully called.
Definition at line 122 of file Visualizer.h.
GLint Shader::lightDirectionUniform |
Definition at line 114 of file Visualizer.h.
GLint Shader::lightingModelUniform |
Definition at line 115 of file Visualizer.h.
GLint Shader::lightIntensityUniform |
Definition at line 117 of file Visualizer.h.
GLint Shader::RboundUniform |
Definition at line 116 of file Visualizer.h.
uint Shader::shaderID |
Definition at line 109 of file Visualizer.h.
GLint Shader::shadowmapUniform |
Definition at line 111 of file Visualizer.h.
GLint Shader::textureUniform |
Definition at line 110 of file Visualizer.h.
GLint Shader::transformMatrixUniform |
Definition at line 112 of file Visualizer.h.
GLint Shader::uvRescaleUniform |
Definition at line 119 of file Visualizer.h.
std::vector<GLuint> Shader::vertex_array_IDs |
Definition at line 118 of file Visualizer.h.