JeVois
1.22
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/GPU/GPUshader.H>
Simple class to load and compile some OpenGL-ES shader code.
Definition at line 25 of file GPUshader.H.
Public Member Functions | |
GPUshader () | |
Constructor. | |
~GPUshader () | |
Destructor. | |
void | load (char const *filename, GLuint type) |
Load a shader from file. | |
void | set (char const *name, char const *str, GLuint type) |
Load a shader from inlined code in a C-string. | |
GLuint | id () const |
Get the shader's ID. | |
jevois::GPUshader::GPUshader | ( | ) |
Constructor.
Definition at line 21 of file GPUshader.C.
jevois::GPUshader::~GPUshader | ( | ) |
Destructor.
Definition at line 26 of file GPUshader.C.
GLuint jevois::GPUshader::id | ( | ) | const |
Get the shader's ID.
Definition at line 32 of file GPUshader.C.
Referenced by jevois::GPUprogram::GPUprogram().
void jevois::GPUshader::load | ( | char const * | filename, |
GLuint | type | ||
) |
Load a shader from file.
type should be GL_VERTEX_SHADER or GL_FRAGMENT_SHADER
Definition at line 36 of file GPUshader.C.
References LFATAL, PLFATAL, and jevois::warnAndIgnoreException().
Referenced by jevois::GPUprogram::GPUprogram().
void jevois::GPUshader::set | ( | char const * | name, |
char const * | str, | ||
GLuint | type | ||
) |
Load a shader from inlined code in a C-string.
type should be GL_VERTEX_SHADER or GL_FRAGMENT_SHADER. Name is only used for info and error messages, so typically can just be "vertex" or "fragment" or something describing which instantiation of those.
Definition at line 57 of file GPUshader.C.
References GL_CHECK, LDEBUG, and LFATAL.
Referenced by jevois::GPUprogram::GPUprogram().