1.3.49
 
Loading...
Searching...
No Matches
Shader Struct Reference

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.
 

Detailed Description

OpenGL Shader data structure.

Definition at line 69 of file Visualizer.h.

Constructor & Destructor Documentation

◆ ~Shader()

Shader::~Shader ( )

Definition at line 1337 of file VisualizerRendering.cpp.

Member Function Documentation

◆ disableTextures()

void Shader::disableTextures ( ) const

Disable texture maps and color fragments by interpolating vertex colors.

Definition at line 1345 of file VisualizerRendering.cpp.

◆ enableTextureMaps()

void Shader::enableTextureMaps ( ) const

Enable texture maps and color fragments using an RGB texture map.

Definition at line 1350 of file VisualizerRendering.cpp.

◆ enableTextureMasks()

void Shader::enableTextureMasks ( ) const

Enable texture masks and color fragments by interpolating vertex colors.

Definition at line 1365 of file VisualizerRendering.cpp.

◆ initialize()

void Shader::initialize ( const char *  vertex_shader_file,
const char *  fragment_shader_file,
Visualizer visualizer_ptr 
)

Initialize the shader.

Parameters
[in]vertex_shader_fileName of vertex shader file to be used by OpenGL in rendering graphics
[in]fragment_shader_fileName of fragment shader file to be used by OpenGL in rendering graphics
[in]visualizer_ptrPointer to the Visualizer class

Definition at line 1170 of file VisualizerRendering.cpp.

◆ setDepthBiasMatrix()

void Shader::setDepthBiasMatrix ( const glm::mat4 &  matrix) const

Set the depth bias matrix for shadows.

Definition at line 1382 of file VisualizerRendering.cpp.

◆ setLightDirection()

void Shader::setLightDirection ( const helios::vec3 direction) const

Set the direction of the light (sun)

Definition at line 1386 of file VisualizerRendering.cpp.

◆ setLightingModel()

void Shader::setLightingModel ( uint  lightingmodel) const

Set the lighting model.

Definition at line 1390 of file VisualizerRendering.cpp.

◆ setLightIntensity()

void Shader::setLightIntensity ( float  lightintensity) const

Set the intensity of the light source.

Definition at line 1394 of file VisualizerRendering.cpp.

◆ setTransformationMatrix()

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.

◆ useShader()

void Shader::useShader ( ) const

Set shader as current.

Definition at line 1398 of file VisualizerRendering.cpp.

Field Documentation

◆ depthBiasUniform

GLint Shader::depthBiasUniform

Definition at line 113 of file Visualizer.h.

◆ initialized

bool Shader::initialized = false

Indicates whether initialize() has been successfully called.

Definition at line 122 of file Visualizer.h.

◆ lightDirectionUniform

GLint Shader::lightDirectionUniform

Definition at line 114 of file Visualizer.h.

◆ lightingModelUniform

GLint Shader::lightingModelUniform

Definition at line 115 of file Visualizer.h.

◆ lightIntensityUniform

GLint Shader::lightIntensityUniform

Definition at line 117 of file Visualizer.h.

◆ RboundUniform

GLint Shader::RboundUniform

Definition at line 116 of file Visualizer.h.

◆ shaderID

uint Shader::shaderID

Definition at line 109 of file Visualizer.h.

◆ shadowmapUniform

GLint Shader::shadowmapUniform

Definition at line 111 of file Visualizer.h.

◆ textureUniform

GLint Shader::textureUniform

Definition at line 110 of file Visualizer.h.

◆ transformMatrixUniform

GLint Shader::transformMatrixUniform

Definition at line 112 of file Visualizer.h.

◆ uvRescaleUniform

GLint Shader::uvRescaleUniform

Definition at line 119 of file Visualizer.h.

◆ vertex_array_IDs

std::vector<GLuint> Shader::vertex_array_IDs

Definition at line 118 of file Visualizer.h.


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