Skip to content

Vp::GridShaderGeneric

Shader for a generic infinite grid representing an affine space with any basis.

#include "Viewport/shader/GridShader.h"

Inherits from Vp::GridShader, Vp::ObjectShader, Vp::WorldShader, Vp::Shader

Public Functions

Name
GridShaderGeneric(GLuint id)
virtual voidinit(bool initSuperclass) override
virtual voidsetUniforms() override<br>Set uniforms before rendering.

Additional inherited members

Public Functions inherited from Vp::GridShader

Name
GridShader(GLuint id)

Public Attributes inherited from Vp::GridShader

Name
const float *m_axisXColor
const float *m_axisYColor
const float *m_axisZColor
floatm_grid1FadeEnd
floatm_grid1FadeStart
floatm_grid2FadeEnd
floatm_grid2FadeStart
const float *m_gridColor
floatm_gridSize
floatm_gridStrength
floatm_lineWidth
glm::mat4m_modelInv
boolm_showGrid
boolm_showXAxis
boolm_showYAxis
boolm_showZAxis

Protected Attributes inherited from Vp::GridShader

Name
GLintm_axisXColorId
GLintm_axisYColorId
GLintm_axisZColorId
GLintm_farId
GLintm_grid1FadeEndId
GLintm_grid1FadeStartId
GLintm_grid2FadeEndId
GLintm_grid2FadeStartId
GLintm_gridColorId
GLintm_gridSizeId
GLintm_gridStrengthId
GLintm_lineWidthId
GLintm_nearId
GLintm_showGridId
GLintm_showXAxisId
GLintm_showYAxisId
GLintm_showZAxisId
GLintmodelMatrixInvId

Public Functions inherited from Vp::ObjectShader

Name
ObjectShader(GLuint id)

Public Attributes inherited from Vp::ObjectShader

Name
floatm_opacity

Protected Attributes inherited from Vp::ObjectShader

Name
GLintopacityId

Public Functions inherited from Vp::WorldShader

Name
WorldShader(GLuint id)
voidsetWorldTransform(const glm::mat4 & model, const glm::mat4 & view, const glm::mat4 & projection)<br>Updates MVP matrices.

Public Attributes inherited from Vp::WorldShader

Name
glm::mat4m_model
boolm_normal <br>Whether to provide normal matrix uniform.
glm::mat4m_projection
boolm_pvm <br>Whether to provide precalculated PVM matrix uniform.
boolm_pvmSeparate <br>Whether to provide individual pvm matrices.
glm::mat4m_view
GLintm_wboitFarId
GLintm_wboitNearId
GLintmodelMatrixId
GLintnormalMatrixId
GLintprojectionMatrixId
GLintpvmMatrixId
GLintviewMatrixId

Public Functions inherited from Vp::Shader

Name
Shader(GLuint id)
virtual~Shader() =default
voidbindTexture2D(GLuint textureUnit, GLuint textureID, GLint samplerLocation)
voidbindTexture2DArray(GLuint textureUnit, GLuint textureID, GLint samplerLocation)
voidbindTexture2DMS(GLuint textureUnit, GLuint textureID, GLint samplerLocation)
boolhasUniform(GLint location) const
virtual voidsetUniformsPerMeshPart(Core::Mesh::MeshPart & meshPart)<br>Set uniforms before rendering individual mesh parts.
boolsupportsUserClipping() const
boolsupportsWboit() const
virtual voiduse() const

Public Attributes inherited from Vp::Shader

Name
const std::array< glm::vec4, 6 > *m_clippingPlanes
std::stringm_fragSource
std::stringm_geoSource
GLuintm_id
std::stringm_injectedSource
std::stringm_vertSource
boolm_wboit <br>Whether to use weighted blended transparency for output if supported.
intm_wboitFunc

Protected Attributes inherited from Vp::Shader

Name
std::array< GLint, 6 >m_clippingPlanesId
GLintm_wboitFlagId <br>Uniform id of the wboit enable/disable flag.
GLintm_wboitFuncId

Public Functions Documentation

function GridShaderGeneric

cpp
inline explicit GridShaderGeneric(
    GLuint id
)
inline explicit GridShaderGeneric(
    GLuint id
)

function init

cpp
virtual void init(
    bool initSuperclass
) override
virtual void init(
    bool initSuperclass
) override

Reimplements: Vp::GridShader::init

function setUniforms

cpp
virtual void setUniforms() override
virtual void setUniforms() override

Set uniforms before rendering.

Reimplements: Vp::GridShader::setUniforms


Updated on 2025-05-31 at 12:55:31 +0000