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 | setViewMatrix (const glm::mat4 &matrix) const |
| Set the view matrix for camera transformations. | |
| void | setProjectionMatrix (const glm::mat4 &matrix) const |
| Set the projection matrix for camera perspective. | |
| 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, const char *geometry_shader_file=nullptr) |
| Initialize the shader. | |
Data Fields | |
| uint | shaderID |
| GLint | textureUniform |
| GLint | shadowmapUniform |
| GLint | transformMatrixUniform |
| GLint | viewMatrixUniform |
| GLint | projectionMatrixUniform |
| GLint | depthBiasUniform |
| GLint | lightDirectionUniform |
| GLint | lightingModelUniform |
| GLint | RboundUniform |
| GLint | lightIntensityUniform |
| std::vector< GLuint > | vertex_array_IDs |
| GLint | uvRescaleUniform |
| GLint | colorTextureObjectUniform |
| GLint | normalTextureObjectUniform |
| GLint | textureFlagTextureObjectUniform |
| GLint | textureIDTextureObjectUniform |
| GLint | coordinateFlagTextureObjectUniform |
| GLint | skyGeometryFlagTextureObjectUniform |
| GLint | hiddenFlagTextureObjectUniform |
| bool | initialized = false |
| Indicates whether initialize() has been successfully called. | |
OpenGL Shader data structure.
Definition at line 68 of file Visualizer.h.
| Shader::~Shader | ( | ) |
Definition at line 1806 of file VisualizerRendering.cpp.
| void Shader::disableTextures | ( | ) | const |
Disable texture maps and color fragments by interpolating vertex colors.
Definition at line 1814 of file VisualizerRendering.cpp.
| void Shader::enableTextureMaps | ( | ) | const |
Enable texture maps and color fragments using an RGB texture map.
Definition at line 1819 of file VisualizerRendering.cpp.
| void Shader::enableTextureMasks | ( | ) | const |
Enable texture masks and color fragments by interpolating vertex colors.
Definition at line 1834 of file VisualizerRendering.cpp.
| void Shader::initialize | ( | const char * | vertex_shader_file, |
| const char * | fragment_shader_file, | ||
| Visualizer * | visualizer_ptr, | ||
| const char * | geometry_shader_file = nullptr |
||
| ) |
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 |
| [in] | geometry_shader_file | [optional] Name of geometry shader file to be used by OpenGL in rendering graphics (default is nullptr for no geometry shader) |
Definition at line 1568 of file VisualizerRendering.cpp.
| void Shader::setDepthBiasMatrix | ( | const glm::mat4 & | matrix | ) | const |
Set the depth bias matrix for shadows.
Definition at line 1859 of file VisualizerRendering.cpp.
| void Shader::setLightDirection | ( | const helios::vec3 & | direction | ) | const |
Set the direction of the light (sun)
Definition at line 1863 of file VisualizerRendering.cpp.
| void Shader::setLightingModel | ( | uint | lightingmodel | ) | const |
Set the lighting model.
Definition at line 1867 of file VisualizerRendering.cpp.
| void Shader::setLightIntensity | ( | float | lightintensity | ) | const |
Set the intensity of the light source.
Definition at line 1871 of file VisualizerRendering.cpp.
| void Shader::setProjectionMatrix | ( | const glm::mat4 & | matrix | ) | const |
Set the projection matrix for camera perspective.
Definition at line 1855 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 1847 of file VisualizerRendering.cpp.
| void Shader::setViewMatrix | ( | const glm::mat4 & | matrix | ) | const |
Set the view matrix for camera transformations.
Definition at line 1851 of file VisualizerRendering.cpp.
| void Shader::useShader | ( | ) | const |
Set shader as current.
Definition at line 1875 of file VisualizerRendering.cpp.
| GLint Shader::colorTextureObjectUniform |
Definition at line 130 of file Visualizer.h.
| GLint Shader::coordinateFlagTextureObjectUniform |
Definition at line 134 of file Visualizer.h.
| GLint Shader::depthBiasUniform |
Definition at line 121 of file Visualizer.h.
| GLint Shader::hiddenFlagTextureObjectUniform |
Definition at line 136 of file Visualizer.h.
| bool Shader::initialized = false |
Indicates whether initialize() has been successfully called.
Definition at line 139 of file Visualizer.h.
| GLint Shader::lightDirectionUniform |
Definition at line 122 of file Visualizer.h.
| GLint Shader::lightingModelUniform |
Definition at line 123 of file Visualizer.h.
| GLint Shader::lightIntensityUniform |
Definition at line 125 of file Visualizer.h.
| GLint Shader::normalTextureObjectUniform |
Definition at line 131 of file Visualizer.h.
| GLint Shader::projectionMatrixUniform |
Definition at line 120 of file Visualizer.h.
| GLint Shader::RboundUniform |
Definition at line 124 of file Visualizer.h.
| uint Shader::shaderID |
Definition at line 115 of file Visualizer.h.
| GLint Shader::shadowmapUniform |
Definition at line 117 of file Visualizer.h.
| GLint Shader::skyGeometryFlagTextureObjectUniform |
Definition at line 135 of file Visualizer.h.
| GLint Shader::textureFlagTextureObjectUniform |
Definition at line 132 of file Visualizer.h.
| GLint Shader::textureIDTextureObjectUniform |
Definition at line 133 of file Visualizer.h.
| GLint Shader::textureUniform |
Definition at line 116 of file Visualizer.h.
| GLint Shader::transformMatrixUniform |
Definition at line 118 of file Visualizer.h.
| GLint Shader::uvRescaleUniform |
Definition at line 127 of file Visualizer.h.
| std::vector<GLuint> Shader::vertex_array_IDs |
Definition at line 126 of file Visualizer.h.
| GLint Shader::viewMatrixUniform |
Definition at line 119 of file Visualizer.h.