JeVois  1.18
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
jevois::GPUshader Class Reference

#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. More...
 
 ~GPUshader ()
 Destructor. More...
 
void load (char const *filename, GLuint type)
 Load a shader from file. More...
 
void set (char const *name, char const *str, GLuint type)
 Load a shader from inlined code in a C-string. More...
 
GLuint id () const
 Get the shader's ID. More...
 

Constructor & Destructor Documentation

◆ GPUshader()

jevois::GPUshader::GPUshader ( )

Constructor.

Definition at line 21 of file GPUshader.C.

◆ ~GPUshader()

jevois::GPUshader::~GPUshader ( )

Destructor.

Definition at line 26 of file GPUshader.C.

Member Function Documentation

◆ id()

GLuint jevois::GPUshader::id ( ) const

Get the shader's ID.

Definition at line 32 of file GPUshader.C.

Referenced by jevois::GPUprogram::GPUprogram().

◆ load()

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().

◆ set()

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().


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