OpenGP  1.1
Open Geometry Processing Library
List of all members
OpenGP::Shader Class Reference

#include <Shader.h>

Public Member Functions

HEADERONLY_INLINE bool add_vshader_from_source (const char *code)
 shaders compile and link More...
 
HEADERONLY_INLINE bool add_fshader_from_source (const char *code)
 
HEADERONLY_INLINE bool link ()
 
HEADERONLY_INLINE void set_uniform (const char *name, int scalar)
 uniforms setters
 
HEADERONLY_INLINE void set_attribute (const char *name, float value)
 setters for constant vertex attributes
 
HEADERONLY_INLINE void set_attribute (const char *name, ArrayBuffer< float > &buffer)
 
HEADERONLY_INLINE void set_attribute (const char *name, ArrayBuffer< Eigen::Vector2f > &buffer)
 
HEADERONLY_INLINE void set_attribute (const char *name, ArrayBuffer< Eigen::Vector3f > &buffer)
 
bool verbose = false
 

Detailed Description

Note
Inspired by QOpenGLShaderProgram
Important not to use Scalar

Member Function Documentation

bool OpenGP::Shader::add_fshader_from_source ( const char *  code)

Create the Fragment Shader

Compile Fragment Shader

Check Fragment Shader

bool OpenGP::Shader::add_vshader_from_source ( const char *  code)

shaders compile and link

Create the Vertex Shader

Compile Vertex Shader

Check Vertex Shader

bool OpenGP::Shader::link ( )

Check the program

void OpenGP::Shader::set_attribute ( const char *  name,
ArrayBuffer< float > &  buffer 
)

< property to modify

< cached in VAO

< memory the description below refers to

void OpenGP::Shader::set_attribute ( const char *  name,
ArrayBuffer< Eigen::Vector2f > &  buffer 
)

< property to modify

< cached in VAO

< memory the description below refers to

void OpenGP::Shader::set_attribute ( const char *  name,
ArrayBuffer< Eigen::Vector3f > &  buffer 
)

< property to modify

< cached in VAO

< memory the description below refers to

Member Data Documentation

bool OpenGP::Shader::verbose = false

prints messages


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