Gamp v0.0.8
Gamp: Graphics, Audio, Multimedia and Processing
Loading...
Searching...
No Matches
GraphRenderer Class Reference

#include <GraphRegion.hpp>

Collaboration diagram for GraphRenderer:

Classes

struct  GraphRendererProps
 

Public Member Functions

 GraphRenderer (PMVMat4f &pmvMat, ShaderState &st)
 
 GraphRenderer (ShaderState &st)
 
 GraphRenderer (ShaderState &st)
 
 GraphRenderer (ShaderState &st)
 
constexpr GLsizei arrayCompsPerElement () const noexcept
 
constexpr GLsizei arrayCompsPerElement () const noexcept
 
constexpr GLsizei arrayCompsPerElement () const noexcept
 
constexpr GLsizei arrayCompsPerElement () const noexcept
 
const Vec4fcolor () const noexcept
 
const Vec4fcolor () const noexcept
 
const Vec4fcolor () const noexcept
 
const Vec4fcolor () const noexcept
 
void destroy (GL &gl)
 
void destroy (GL &gl)
 
void destroy (GL &gl)
 
void destroy (GL &gl)
 
bool init (GL &gl, const jau::fraction_timespec &when)
 
bool init (GL &gl, const jau::fraction_timespec &when)
 
bool init (GL &gl, const jau::fraction_timespec &when)
 
bool init (GL &gl, const jau::fraction_timespec &when)
 
constexpr bool initialized () const noexcept
 
constexpr bool initialized () const noexcept
 
constexpr bool initialized () const noexcept
 
constexpr bool initialized () const noexcept
 
const GLUniformVec3flightPosition () const noexcept
 
GLUniformVec3flightPosition () noexcept
 
const PMVMat4fpmv () const noexcept
 
const PMVMat4fpmv () const noexcept
 
const PMVMat4fpmv () const noexcept
 
const PMVMat4fpmv () const noexcept
 
PMVMat4fpmv () noexcept
 
PMVMat4fpmv () noexcept
 
PMVMat4fpmv () noexcept
 
PMVMat4fpmv () noexcept
 
void setColor (const Vec4f &c) noexcept
 
void setColor (const Vec4f &c) noexcept
 
void setColor (const Vec4f &c) noexcept
 
void setColor (const Vec4f &c) noexcept
 
const ShaderStatest () const noexcept
 
const ShaderStatest () const noexcept
 
const ShaderStatest () const noexcept
 
ShaderStatest () noexcept
 
ShaderStatest () noexcept
 
ShaderStatest () noexcept
 
void updateAll (GL &gl)
 
void updateAll (GL &gl)
 
void updateAll (GL &gl)
 
void updateAll (GL &gl)
 
void updateColor (GL &gl)
 
void updateColor (GL &gl)
 
void updateColor (GL &gl)
 
void updateColor (GL &gl)
 
void updatePMV (GL &gl)
 
void updatePMV (GL &gl)
 
void updatePMV (GL &gl)
 
void useProgram (GL &gl, bool on)
 
void useProgram (GL &gl, bool on)
 
void useProgram (GL &gl, bool on)
 
void useProgram (GL &gl, bool on)
 
constexpr bool usesNormal () const noexcept
 
constexpr bool usesNormal () const noexcept
 
constexpr bool usesNormal () const noexcept
 
constexpr bool usesNormal () const noexcept
 

Static Public Attributes

static constexpr std::string_view bin_dir = "impl/graph/glsl/bin"
 
static constexpr std::string_view colTexLookupFuncName = "texture2D"
 
static constexpr std::string_view gcuTexture2D = "gcuTexture2D"
 
static constexpr std::string_view GLSL_CONST_SAMPLE_COUNT = "const float sample_count = "
 
static constexpr std::string_view GLSL_DEF_SAMPLE_COUNT = "#define SAMPLE_COUNT "
 
static constexpr std::string_view GLSL_MAIN_BEGIN = "void main (void)\n{\n"
 
static constexpr std::string_view GLSL_PARAM_COMMENT_END = "// Gamp Graph Parameter End\n\n"
 
static constexpr std::string_view GLSL_PARAM_COMMENT_START = "\n// Gamp Graph Parameter Start\n"
 
static constexpr std::string_view GLSL_USE_COLOR_CHANNEL = "#define USE_COLOR_CHANNEL 1\n"
 
static constexpr std::string_view GLSL_USE_COLOR_TEXTURE = "#define USE_COLOR_TEXTURE 1\n"
 
static constexpr std::string_view GLSL_USE_DISCARD = "#define USE_DISCARD 1\n"
 
static constexpr std::string_view GLSL_USE_FRUSTUM_CLIPPING = "#define USE_FRUSTUM_CLIPPING 1\n"
 
static constexpr std::string_view GLSL_USE_LIGHT0 = "#define USE_LIGHT0 1\n"
 
static constexpr std::string_view GLSL_USE_NORMAL_CHANNEL = "#define USE_NORMAL_CHANNEL 1\n"
 
static constexpr std::string_view shader_basename = "curverenderer01"
 
static constexpr std::string_view source_dir = "impl/graph/glsl"
 

Detailed Description

Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 64 of file GraphShapes01.cpp.

Constructor & Destructor Documentation

◆ GraphRenderer() [1/4]

GraphRenderer::GraphRenderer ( ShaderState & st)
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 108 of file GraphShapes01.cpp.

◆ GraphRenderer() [2/4]

GraphRenderer::GraphRenderer ( ShaderState & st)
inline

Definition at line 109 of file GraphShapes02.cpp.

◆ GraphRenderer() [3/4]

GraphRenderer::GraphRenderer ( ShaderState & st)
inline

Definition at line 153 of file PrimitivesCobraMK3.cpp.

◆ GraphRenderer() [4/4]

GraphRenderer::GraphRenderer ( PMVMat4f & pmvMat,
ShaderState & st )
inline

Definition at line 108 of file GraphRegion.hpp.

Member Function Documentation

◆ usesNormal() [1/4]

bool GraphRenderer::usesNormal ( ) const
inlineconstexprnoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 87 of file GraphShapes01.cpp.

Here is the caller graph for this function:

◆ arrayCompsPerElement() [1/4]

GLsizei GraphRenderer::arrayCompsPerElement ( ) const
inlineconstexprnoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 88 of file GraphShapes01.cpp.

◆ initialized() [1/4]

bool GraphRenderer::initialized ( ) const
inlineconstexprnoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 120 of file GraphShapes01.cpp.

◆ init() [1/4]

bool GraphRenderer::init ( GL & gl,
const jau::fraction_timespec & when )
inline

Definition at line 122 of file GraphShapes01.cpp.

◆ destroy() [1/4]

void GraphRenderer::destroy ( GL & gl)
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 268 of file GraphShapes01.cpp.

◆ useProgram() [1/4]

void GraphRenderer::useProgram ( GL & gl,
bool on )
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 272 of file GraphShapes01.cpp.

◆ updateColor() [1/4]

void GraphRenderer::updateColor ( GL & gl)
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 276 of file GraphShapes01.cpp.

◆ updatePMV() [1/3]

void GraphRenderer::updatePMV ( GL & gl)
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 279 of file GraphShapes01.cpp.

◆ updateAll() [1/4]

void GraphRenderer::updateAll ( GL & gl)
inline
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 282 of file GraphShapes01.cpp.

◆ pmv() [1/8]

PMVMat4f & GraphRenderer::pmv ( )
inlinenoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 286 of file GraphShapes01.cpp.

Here is the caller graph for this function:

◆ pmv() [2/8]

const PMVMat4f & GraphRenderer::pmv ( ) const
inlinenoexcept

Definition at line 287 of file GraphShapes01.cpp.

◆ color() [1/4]

const Vec4f & GraphRenderer::color ( ) const
inlinenoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 288 of file GraphShapes01.cpp.

◆ setColor() [1/4]

void GraphRenderer::setColor ( const Vec4f & c)
inlinenoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 289 of file GraphShapes01.cpp.

◆ usesNormal() [2/4]

bool GraphRenderer::usesNormal ( ) const
inlineconstexprnoexcept

Definition at line 88 of file GraphShapes02.cpp.

◆ arrayCompsPerElement() [2/4]

GLsizei GraphRenderer::arrayCompsPerElement ( ) const
inlineconstexprnoexcept

Definition at line 89 of file GraphShapes02.cpp.

◆ initialized() [2/4]

bool GraphRenderer::initialized ( ) const
inlineconstexprnoexcept

Definition at line 121 of file GraphShapes02.cpp.

◆ init() [2/4]

bool GraphRenderer::init ( GL & gl,
const jau::fraction_timespec & when )
inline

Definition at line 123 of file GraphShapes02.cpp.

◆ destroy() [2/4]

void GraphRenderer::destroy ( GL & gl)
inline

Definition at line 269 of file GraphShapes02.cpp.

◆ useProgram() [2/4]

void GraphRenderer::useProgram ( GL & gl,
bool on )
inline

Definition at line 273 of file GraphShapes02.cpp.

◆ updateColor() [2/4]

void GraphRenderer::updateColor ( GL & gl)
inline

Definition at line 277 of file GraphShapes02.cpp.

◆ updatePMV() [2/3]

void GraphRenderer::updatePMV ( GL & gl)
inline

Definition at line 280 of file GraphShapes02.cpp.

◆ updateAll() [2/4]

void GraphRenderer::updateAll ( GL & gl)
inline

Definition at line 283 of file GraphShapes02.cpp.

◆ pmv() [3/8]

PMVMat4f & GraphRenderer::pmv ( )
inlinenoexcept

Definition at line 287 of file GraphShapes02.cpp.

◆ pmv() [4/8]

const PMVMat4f & GraphRenderer::pmv ( ) const
inlinenoexcept

Definition at line 288 of file GraphShapes02.cpp.

◆ color() [2/4]

const Vec4f & GraphRenderer::color ( ) const
inlinenoexcept

Definition at line 289 of file GraphShapes02.cpp.

◆ setColor() [2/4]

void GraphRenderer::setColor ( const Vec4f & c)
inlinenoexcept

Definition at line 290 of file GraphShapes02.cpp.

◆ st() [1/6]

ShaderState & GraphRenderer::st ( )
inlinenoexcept
Examples
GraphShapes01.cpp, and PrimitivesCobraMK3.cpp.

Definition at line 291 of file GraphShapes02.cpp.

Here is the caller graph for this function:

◆ st() [2/6]

const ShaderState & GraphRenderer::st ( ) const
inlinenoexcept

Definition at line 292 of file GraphShapes02.cpp.

◆ usesNormal() [3/4]

bool GraphRenderer::usesNormal ( ) const
inlineconstexprnoexcept

Definition at line 149 of file PrimitivesCobraMK3.cpp.

◆ arrayCompsPerElement() [3/4]

GLsizei GraphRenderer::arrayCompsPerElement ( ) const
inlineconstexprnoexcept

Definition at line 150 of file PrimitivesCobraMK3.cpp.

◆ initialized() [3/4]

bool GraphRenderer::initialized ( ) const
inlineconstexprnoexcept

Definition at line 165 of file PrimitivesCobraMK3.cpp.

◆ init() [3/4]

bool GraphRenderer::init ( GL & gl,
const jau::fraction_timespec & when )
inline

Definition at line 167 of file PrimitivesCobraMK3.cpp.

◆ destroy() [3/4]

void GraphRenderer::destroy ( GL & gl)
inline

Definition at line 210 of file PrimitivesCobraMK3.cpp.

◆ useProgram() [3/4]

void GraphRenderer::useProgram ( GL & gl,
bool on )
inline

Definition at line 214 of file PrimitivesCobraMK3.cpp.

◆ updateColor() [3/4]

void GraphRenderer::updateColor ( GL & gl)
inline

Definition at line 218 of file PrimitivesCobraMK3.cpp.

◆ updatePMV() [3/3]

void GraphRenderer::updatePMV ( GL & gl)
inline

Definition at line 221 of file PrimitivesCobraMK3.cpp.

◆ updateAll() [3/4]

void GraphRenderer::updateAll ( GL & gl)
inline

Definition at line 224 of file PrimitivesCobraMK3.cpp.

◆ pmv() [5/8]

PMVMat4f & GraphRenderer::pmv ( )
inlinenoexcept

Definition at line 228 of file PrimitivesCobraMK3.cpp.

◆ pmv() [6/8]

const PMVMat4f & GraphRenderer::pmv ( ) const
inlinenoexcept

Definition at line 229 of file PrimitivesCobraMK3.cpp.

◆ color() [3/4]

const Vec4f & GraphRenderer::color ( ) const
inlinenoexcept

Definition at line 230 of file PrimitivesCobraMK3.cpp.

◆ setColor() [3/4]

void GraphRenderer::setColor ( const Vec4f & c)
inlinenoexcept

Definition at line 231 of file PrimitivesCobraMK3.cpp.

◆ st() [3/6]

ShaderState & GraphRenderer::st ( )
inlinenoexcept

Definition at line 232 of file PrimitivesCobraMK3.cpp.

◆ st() [4/6]

const ShaderState & GraphRenderer::st ( ) const
inlinenoexcept

Definition at line 233 of file PrimitivesCobraMK3.cpp.

◆ lightPosition() [1/2]

GLUniformVec3f & GraphRenderer::lightPosition ( )
inlinenoexcept
Examples
PrimitivesCobraMK3.cpp.

Definition at line 234 of file PrimitivesCobraMK3.cpp.

◆ lightPosition() [2/2]

const GLUniformVec3f & GraphRenderer::lightPosition ( ) const
inlinenoexcept

Definition at line 235 of file PrimitivesCobraMK3.cpp.

◆ usesNormal() [4/4]

bool GraphRenderer::usesNormal ( ) const
inlineconstexprnoexcept

Definition at line 87 of file GraphRegion.hpp.

◆ arrayCompsPerElement() [4/4]

GLsizei GraphRenderer::arrayCompsPerElement ( ) const
inlineconstexprnoexcept

Definition at line 88 of file GraphRegion.hpp.

◆ initialized() [4/4]

bool GraphRenderer::initialized ( ) const
inlineconstexprnoexcept

Definition at line 119 of file GraphRegion.hpp.

◆ init() [4/4]

bool GraphRenderer::init ( GL & gl,
const jau::fraction_timespec & when )
inline

Definition at line 121 of file GraphRegion.hpp.

◆ destroy() [4/4]

void GraphRenderer::destroy ( GL & gl)
inline

Definition at line 262 of file GraphRegion.hpp.

◆ useProgram() [4/4]

void GraphRenderer::useProgram ( GL & gl,
bool on )
inline

Definition at line 266 of file GraphRegion.hpp.

◆ updateColor() [4/4]

void GraphRenderer::updateColor ( GL & gl)
inline

Definition at line 270 of file GraphRegion.hpp.

◆ updateAll() [4/4]

void GraphRenderer::updateAll ( GL & gl)
inline

Definition at line 273 of file GraphRegion.hpp.

◆ pmv() [7/8]

PMVMat4f & GraphRenderer::pmv ( )
inlinenoexcept

Definition at line 276 of file GraphRegion.hpp.

◆ pmv() [8/8]

const PMVMat4f & GraphRenderer::pmv ( ) const
inlinenoexcept

Definition at line 277 of file GraphRegion.hpp.

◆ color() [4/4]

const Vec4f & GraphRenderer::color ( ) const
inlinenoexcept

Definition at line 278 of file GraphRegion.hpp.

◆ setColor() [4/4]

void GraphRenderer::setColor ( const Vec4f & c)
inlinenoexcept

Definition at line 279 of file GraphRegion.hpp.

◆ st() [5/6]

ShaderState & GraphRenderer::st ( )
inlinenoexcept

Definition at line 280 of file GraphRegion.hpp.

◆ st() [6/6]

const ShaderState & GraphRenderer::st ( ) const
inlinenoexcept

Definition at line 281 of file GraphRegion.hpp.

Member Data Documentation

◆ GLSL_PARAM_COMMENT_START

static constexpr std::string_view GraphRenderer::GLSL_PARAM_COMMENT_START = "\n// Gamp Graph Parameter Start\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 90 of file GraphShapes01.cpp.

◆ GLSL_PARAM_COMMENT_END

static constexpr std::string_view GraphRenderer::GLSL_PARAM_COMMENT_END = "// Gamp Graph Parameter End\n\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 91 of file GraphShapes01.cpp.

◆ GLSL_USE_COLOR_CHANNEL

static constexpr std::string_view GraphRenderer::GLSL_USE_COLOR_CHANNEL = "#define USE_COLOR_CHANNEL 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 92 of file GraphShapes01.cpp.

◆ GLSL_USE_NORMAL_CHANNEL

static constexpr std::string_view GraphRenderer::GLSL_USE_NORMAL_CHANNEL = "#define USE_NORMAL_CHANNEL 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 93 of file GraphShapes01.cpp.

◆ GLSL_USE_LIGHT0

static constexpr std::string_view GraphRenderer::GLSL_USE_LIGHT0 = "#define USE_LIGHT0 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 94 of file GraphShapes01.cpp.

◆ GLSL_USE_COLOR_TEXTURE

static constexpr std::string_view GraphRenderer::GLSL_USE_COLOR_TEXTURE = "#define USE_COLOR_TEXTURE 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 95 of file GraphShapes01.cpp.

◆ GLSL_USE_FRUSTUM_CLIPPING

static constexpr std::string_view GraphRenderer::GLSL_USE_FRUSTUM_CLIPPING = "#define USE_FRUSTUM_CLIPPING 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 96 of file GraphShapes01.cpp.

◆ GLSL_USE_DISCARD

static constexpr std::string_view GraphRenderer::GLSL_USE_DISCARD = "#define USE_DISCARD 1\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 97 of file GraphShapes01.cpp.

◆ GLSL_DEF_SAMPLE_COUNT

static constexpr std::string_view GraphRenderer::GLSL_DEF_SAMPLE_COUNT = "#define SAMPLE_COUNT "
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 98 of file GraphShapes01.cpp.

◆ GLSL_CONST_SAMPLE_COUNT

static constexpr std::string_view GraphRenderer::GLSL_CONST_SAMPLE_COUNT = "const float sample_count = "
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 99 of file GraphShapes01.cpp.

◆ GLSL_MAIN_BEGIN

static constexpr std::string_view GraphRenderer::GLSL_MAIN_BEGIN = "void main (void)\n{\n"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 100 of file GraphShapes01.cpp.

◆ gcuTexture2D

static constexpr std::string_view GraphRenderer::gcuTexture2D = "gcuTexture2D"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 101 of file GraphShapes01.cpp.

◆ colTexLookupFuncName

static constexpr std::string_view GraphRenderer::colTexLookupFuncName = "texture2D"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 102 of file GraphShapes01.cpp.

◆ shader_basename

static constexpr std::string_view GraphRenderer::shader_basename = "curverenderer01"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 103 of file GraphShapes01.cpp.

◆ source_dir

static constexpr std::string_view GraphRenderer::source_dir = "impl/graph/glsl"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 104 of file GraphShapes01.cpp.

◆ bin_dir

static constexpr std::string_view GraphRenderer::bin_dir = "impl/graph/glsl/bin"
staticconstexpr
Examples
GraphShapes01.cpp.

Definition at line 105 of file GraphShapes01.cpp.


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