Vp::ColorShader 
Basic shader to display unlit colored primitives.
#include "Viewport/shader/ColorShader.h"
Inherits from Vp::ObjectShader, Vp::WorldShader, Vp::Shader
Inherited by Vp::FrustumShader
Public Functions 
| Name | |
|---|---|
| ColorShader(GLuint id) | |
| virtual void | init(bool initSuperclass) override | 
| virtual void | setUniforms() override<br>Set uniforms before rendering. | 
Public Attributes 
| Name | |
|---|---|
| glm::vec3 | m_singleColor | 
| bool | m_useSingleColor | 
Protected Attributes 
| Name | |
|---|---|
| GLint | singleColorId | 
| GLint | useSingleColorId | 
Additional inherited members 
Public Functions inherited from Vp::ObjectShader
| Name | |
|---|---|
| ObjectShader(GLuint id) | 
Public Attributes inherited from Vp::ObjectShader
| Name | |
|---|---|
| float | m_opacity | 
Protected Attributes inherited from Vp::ObjectShader
| Name | |
|---|---|
| GLint | opacityId | 
Public Functions inherited from Vp::WorldShader
| Name | |
|---|---|
| WorldShader(GLuint id) | |
| void | setWorldTransform(const glm::mat4 & model, const glm::mat4 & view, const glm::mat4 & projection)<br>Updates MVP matrices. | 
Public Attributes inherited from Vp::WorldShader
| Name | |
|---|---|
| glm::mat4 | m_model | 
| glm::mat4 | m_projection | 
| glm::mat4 | m_view | 
| GLint | m_wboitFarId | 
| GLint | m_wboitNearId | 
| GLint | modelMatrixId | 
| GLint | normalMatrixId | 
| GLint | projectionMatrixId | 
| GLint | pvmMatrixId | 
| GLint | viewMatrixId | 
Public Functions inherited from Vp::Shader
| Name | |
|---|---|
| Shader(GLuint id) | |
| virtual | ~Shader() =default | 
| void | bindTexture2D(GLuint textureUnit, GLuint textureID, GLint samplerLocation) | 
| void | bindTexture2DMS(GLuint textureUnit, GLuint textureID, GLint samplerLocation) | 
| bool | hasUniform(GLint location) | 
| virtual void | setUniformsPerMeshPart(Core::Mesh::MeshPart & meshPart)<br>Set uniforms before rendering individual mesh parts. | 
| bool | supportsWboit() | 
| virtual void | use() const | 
Public Attributes inherited from Vp::Shader
| Name | |
|---|---|
| GLuint | m_id | 
| bool | m_wboit <br>Whether to use weighted blended transparency for output if supported. | 
| int | m_wboitFunc | 
Protected Attributes inherited from Vp::Shader
| Name | |
|---|---|
| GLint | m_wboitFlagId <br>Uniform id of the wboit enable/disable flag. | 
| GLint | m_wboitFuncId | 
Public Functions Documentation 
function ColorShader 
explicit ColorShader(
    GLuint id
)explicit ColorShader(
    GLuint id
)function init 
virtual void init(
    bool initSuperclass
) overridevirtual void init(
    bool initSuperclass
) overrideReimplements: Vp::Shader::init
Reimplemented by: Vp::FrustumShader::init
function setUniforms 
virtual void setUniforms() overridevirtual void setUniforms() overrideSet uniforms before rendering.
Reimplements: Vp::Shader::setUniforms
Reimplemented by: Vp::FrustumShader::setUniforms
Public Attributes Documentation 
variable m_singleColor 
glm::vec3 m_singleColor {1.0f, 0.0f, 1.0f};glm::vec3 m_singleColor {1.0f, 0.0f, 1.0f};variable m_useSingleColor 
bool m_useSingleColor {false};bool m_useSingleColor {false};Protected Attributes Documentation 
variable singleColorId 
GLint singleColorId;GLint singleColorId;variable useSingleColorId 
GLint useSingleColorId;GLint useSingleColorId;Updated on 2025-09-07 at 16:13:51 +0000