1.3.64
 
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 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.
 

Detailed Description

OpenGL Shader data structure.

Definition at line 68 of file Visualizer.h.

Constructor & Destructor Documentation

◆ ~Shader()

Shader::~Shader ( )

Definition at line 1806 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 1814 of file VisualizerRendering.cpp.

◆ enableTextureMaps()

void Shader::enableTextureMaps ( ) const

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

Definition at line 1819 of file VisualizerRendering.cpp.

◆ enableTextureMasks()

void Shader::enableTextureMasks ( ) const

Enable texture masks and color fragments by interpolating vertex colors.

Definition at line 1834 of file VisualizerRendering.cpp.

◆ initialize()

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.

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
[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.

◆ setDepthBiasMatrix()

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

Set the depth bias matrix for shadows.

Definition at line 1859 of file VisualizerRendering.cpp.

◆ setLightDirection()

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

Set the direction of the light (sun)

Definition at line 1863 of file VisualizerRendering.cpp.

◆ setLightingModel()

void Shader::setLightingModel ( uint  lightingmodel) const

Set the lighting model.

Definition at line 1867 of file VisualizerRendering.cpp.

◆ setLightIntensity()

void Shader::setLightIntensity ( float  lightintensity) const

Set the intensity of the light source.

Definition at line 1871 of file VisualizerRendering.cpp.

◆ setProjectionMatrix()

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

Set the projection matrix for camera perspective.

Definition at line 1855 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 1847 of file VisualizerRendering.cpp.

◆ setViewMatrix()

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

Set the view matrix for camera transformations.

Definition at line 1851 of file VisualizerRendering.cpp.

◆ useShader()

void Shader::useShader ( ) const

Set shader as current.

Definition at line 1875 of file VisualizerRendering.cpp.

Field Documentation

◆ colorTextureObjectUniform

GLint Shader::colorTextureObjectUniform

Definition at line 130 of file Visualizer.h.

◆ coordinateFlagTextureObjectUniform

GLint Shader::coordinateFlagTextureObjectUniform

Definition at line 134 of file Visualizer.h.

◆ depthBiasUniform

GLint Shader::depthBiasUniform

Definition at line 121 of file Visualizer.h.

◆ hiddenFlagTextureObjectUniform

GLint Shader::hiddenFlagTextureObjectUniform

Definition at line 136 of file Visualizer.h.

◆ initialized

bool Shader::initialized = false

Indicates whether initialize() has been successfully called.

Definition at line 139 of file Visualizer.h.

◆ lightDirectionUniform

GLint Shader::lightDirectionUniform

Definition at line 122 of file Visualizer.h.

◆ lightingModelUniform

GLint Shader::lightingModelUniform

Definition at line 123 of file Visualizer.h.

◆ lightIntensityUniform

GLint Shader::lightIntensityUniform

Definition at line 125 of file Visualizer.h.

◆ normalTextureObjectUniform

GLint Shader::normalTextureObjectUniform

Definition at line 131 of file Visualizer.h.

◆ projectionMatrixUniform

GLint Shader::projectionMatrixUniform

Definition at line 120 of file Visualizer.h.

◆ RboundUniform

GLint Shader::RboundUniform

Definition at line 124 of file Visualizer.h.

◆ shaderID

uint Shader::shaderID

Definition at line 115 of file Visualizer.h.

◆ shadowmapUniform

GLint Shader::shadowmapUniform

Definition at line 117 of file Visualizer.h.

◆ skyGeometryFlagTextureObjectUniform

GLint Shader::skyGeometryFlagTextureObjectUniform

Definition at line 135 of file Visualizer.h.

◆ textureFlagTextureObjectUniform

GLint Shader::textureFlagTextureObjectUniform

Definition at line 132 of file Visualizer.h.

◆ textureIDTextureObjectUniform

GLint Shader::textureIDTextureObjectUniform

Definition at line 133 of file Visualizer.h.

◆ textureUniform

GLint Shader::textureUniform

Definition at line 116 of file Visualizer.h.

◆ transformMatrixUniform

GLint Shader::transformMatrixUniform

Definition at line 118 of file Visualizer.h.

◆ uvRescaleUniform

GLint Shader::uvRescaleUniform

Definition at line 127 of file Visualizer.h.

◆ vertex_array_IDs

std::vector<GLuint> Shader::vertex_array_IDs

Definition at line 126 of file Visualizer.h.

◆ viewMatrixUniform

GLint Shader::viewMatrixUniform

Definition at line 119 of file Visualizer.h.


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