FastUIDraw
|
Collection of utility interfaces used by GL Backend that an application may wish to use as well. More...
Namespaces | |
fastuidraw::gl_binding | |
Provides interface for application to use GL where function pointers are auto-resolved transparently and under debug provides error checking. Built as a part of a seperate library; for GL it is libNGL; for GLES it is NGLES. The header defines for each GL/GLES function, glFoo, the macro fastuidraw_glFoo. | |
Classes | |
class | fastuidraw::gl::BindAttribute |
A BindAttribute inherits from PreLinkAction, it's purpose is to bind named attributes to named locations, i.e. it calls glBindAttributeLocation(). More... | |
class | fastuidraw::gl::BindFragDataLocation |
A BindFragDataLocation inherits from PreLinkAction, its purpose is to bind a fragment shader out to a named location and index. Using a BindFragDataLocation requires: More... | |
class | fastuidraw::gl::ContextProperties |
A ContextProperties provides an interface to query GL/GLES version and extensions. More... | |
class | fastuidraw::gl::PreLinkAction |
A PreLinkAction is an action to apply to a Program after attaching shaders but before linking. More... | |
class | fastuidraw::gl::PreLinkActionArray |
A PreLinkActionArray is a conveniance class wrapper over an array of PreLinkAction handles. More... | |
class | fastuidraw::gl::Program |
Class for creating and using GLSL programs. More... | |
class | fastuidraw::gl::ProgramInitializer |
A ProgramInitializer is a functor object called the first time a Program is bound (i.e. the first time Program::use_program() is called). It's main purpose is to facilitate initializing uniform values. More... | |
class | fastuidraw::gl::ProgramInitializerArray |
Conveniance class to hold an array of handles of ProgramInitializer objects. More... | |
class | fastuidraw::gl::ProgramSeparable |
A ProgramSeparable inherits from PreLinkAction, its purpose is to set a GLSL program as separable, so that it can be used by a GLSL pipeline. Using a ProgramSeparable requires: More... | |
class | fastuidraw::gl::SamplerInitializer |
Class to intialize the binding points of samplers. If the uniform is an array, the first element will be given the specified binding point and successive elements in the array will be given successive binding points. More... | |
class | fastuidraw::gl::Shader |
Simple Shader utility class providing a simple interface to build GL shader objects using a glsl::ShaderSouce as its source code. More... | |
class | fastuidraw::gl::ShaderStorageBlockInitializer |
A ShaderStorageBlockInitializer is used to initalize the binding point used by a shader storage block (see the GL spec on glShaderStorageBlockBinding). Initializer is not supported in OpenGL ES. More... | |
class | fastuidraw::gl::TransformFeedbackVarying |
A TransformFeedbackVarying encapsulates a call to glTransformFeedbackVarying. Note that if there are multiple TransformFeedbackVarying objects on a single PreLinkActionArray, then only the last one added has effect. More... | |
class | fastuidraw::gl::UniformBlockInitializer |
A UniformBlockInitializer is used to initalize the binding point used by a bindable uniform (aka Uniform buffer object, see the GL spec on glGetUniformBlockIndex and glUniformBlockBinding. More... | |
class | fastuidraw::gl::UniformInitalizerBase |
A UniformInitalizerBase is a base class for initializing a uniform, the actual GL call to set the uniform value is to be implemented by a derived class in init_uniform(). More... | |
class | fastuidraw::gl::UniformInitializer< T > |
Initialize a uniform via the templated overloaded function fastuidraw::gl::Uniform(). More... | |
class | fastuidraw::gl::UniformInitializer< c_array< const T > > |
Specialization for type c_array<const T> for UniformInitializer so that data behind the c_array is copied. More... | |
Macros | |
#define | FASTUIDRAW_GL_MESSAGE(X) gl_binding::message(X, __FILE__, __LINE__) |
Functions | |
ProgramInitializerArray & | fastuidraw::gl::ProgramInitializerArray::add_sampler_initializer (c_string uniform_name, int value) |
ProgramInitializerArray & | fastuidraw::gl::ProgramInitializerArray::add_uniform_block_binding (c_string uniform_name, int value) |
template<typename T > | |
ProgramInitializerArray & | fastuidraw::gl::ProgramInitializerArray::add_uniform_initializer (c_string uniform_name, const T &value) |
void | fastuidraw::gl::context_get (GLenum v, GLint *ptr) |
void | fastuidraw::gl::context_get (GLenum v, GLboolean *ptr) |
void | fastuidraw::gl::context_get (GLenum v, bool *ptr) |
void | fastuidraw::gl::context_get (GLenum v, GLfloat *ptr) |
template<typename T , size_t N> | |
void | fastuidraw::gl::context_get (GLenum v, vecN< T, N > *p) |
template<typename T > | |
T | fastuidraw::gl::context_get (GLenum value) |
template<typename T , size_t N> | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, const vecN< T, N > &v) |
Template version for setting array of uniforms,. More... | |
template<typename T , size_t N> | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, const vecN< T, N > &v, bool transposed) |
template<typename T > | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, c_array< const T > v) |
Template version for setting array of uniforms,. More... | |
template<typename T > | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, c_array< const T > v, bool transposed) |
Template version for setting array of uniforms. More... | |
template<typename T > | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, c_array< const T > v) |
Template version for setting array of uniforms,. More... | |
template<typename T > | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, const T *v) |
Template version for setting an of uniform values. More... | |
template<typename T , size_t N, size_t M> | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, GLsizei count, const matrixNxM< T, N, M > *v, bool transposed=false) |
Template version for setting an array of matrix uniform values. More... | |
template<typename T , size_t N> | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, const vecN< T, N > &v) |
Template version for setting a single uniform value. More... | |
template<typename T , size_t N, size_t M> | |
void | fastuidraw::gl::ProgramUniform (GLuint program, int location, const matrixNxM< T, N, M > &v, bool transposed=false) |
Template version for setting a single matrix uniform value. More... | |
template<typename T , size_t N> | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, const vecN< T, N > &v) |
Template version for setting array of uniforms. More... | |
template<typename T , size_t N> | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, const vecN< T, N > &v, bool transposed) |
Template version for setting array of uniform matrices. More... | |
template<typename T > | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, c_array< const T > v) |
Template version for setting array of uniforms. More... | |
template<typename T > | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, c_array< const T > v, bool transposed) |
Template version for setting array of uniforms. More... | |
template<typename T > | |
void | fastuidraw::gl::Uniform (int location, c_array< const T > v) |
Template version for setting array of uniforms,. More... | |
template<typename T > | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, const T *v) |
Template version for setting an of uniform values. More... | |
template<typename T , size_t N, size_t M> | |
void | fastuidraw::gl::Uniform (int location, GLsizei count, const matrixNxM< T, N, M > *v, bool transposed=false) |
Template version for setting an array of matrix uniform values. More... | |
template<typename T , size_t N> | |
void | fastuidraw::gl::Uniform (int location, const vecN< T, N > &v) |
Template version for setting a single uniform value. More... | |
template<typename T , size_t N, size_t M> | |
void | fastuidraw::gl::Uniform (int location, const matrixNxM< T, N, M > &v, bool transposed=false) |
Template version for setting a single matrix uniform value. More... | |
Collection of utility interfaces used by GL Backend that an application may wish to use as well.
#define FASTUIDRAW_GL_MESSAGE | ( | X | ) | gl_binding::message(X, __FILE__, __LINE__) |
Use this macro to emit a string to each of the gl_binding::CallbackGL objects that are active.
Definition at line 139 of file gl_binding.hpp.
|
inline |
Provided as a conveniance, creates a SamplerInitializer object and adds that via add().
uniform_name | name of uniform in GLSL to initialize |
value | value with which to set the uniform, in this case specifies the texture unit as follows: a value of n means to use GL_TEXTUREn texture unit. |
Definition at line 1688 of file gl_program.hpp.
|
inline |
Provided as a conveniance, creates a UniformBlockInitializer object and adds that via add().
uniform_name | name of uniform in GLSL to initialize |
value | value with which to set the uniform, in this case specifies the binding point index to pass to glBindBufferBase or glBindBufferRange. |
Definition at line 1696 of file gl_program.hpp.
ProgramInitializerArray & fastuidraw::gl::ProgramInitializerArray::add_uniform_initializer | ( | c_string | uniform_name, |
const T & | value | ||
) |
Provided as a conveniance, creates a UniformInitializer object and adds that via add().
uniform_name | name of uniform in GLSL to initialize |
value | value with which to set the uniform |
Definition at line 1680 of file gl_program.hpp.
void fastuidraw::gl::context_get | ( | GLenum | v, |
GLint * | ptr | ||
) |
Overloaded C++ version of glGet* family of functions in GL. Equivalent to glGetInteger(v, ptr).
v | GL enumeration to fetch |
ptr | address to which to write values |
void fastuidraw::gl::context_get | ( | GLenum | v, |
GLboolean * | ptr | ||
) |
Overloaded C++ version of glGet* family of functions in GL. Equivalent to glGetBooleanv(v, ptr).
v | GL enumeration to fetch |
ptr | address to which to write values |
void fastuidraw::gl::context_get | ( | GLenum | v, |
bool * | ptr | ||
) |
Overloaded C++ version of glGet* family of functions in GL. Equivalent to glGetBooleanv(v, ptr).
v | GL enumeration to fetch |
ptr | address to which to write values |
void fastuidraw::gl::context_get | ( | GLenum | v, |
GLfloat * | ptr | ||
) |
Overloaded C++ version of glGet* family of functions in GL. Equivalent to glGetFloatv(v, ptr).
v | GL enumeration to fetch |
ptr | address to which to write values |
void fastuidraw::gl::context_get | ( | GLenum | v, |
vecN< T, N > * | p | ||
) |
Overloaded C++ version of glGet* family of functions in GL, accepting the address of a vecN, by rules of template recursion, can take vecN's of other types.
v | GL enumeration to fetch |
p | address to which to write values |
Definition at line 86 of file gl_get.hpp.
T fastuidraw::gl::context_get | ( | GLenum | value | ) |
Overloaded C++ version of glGet* family of functions in GL. The template parameter determines what glGet function is called. The return value is initialized as 0 before calling glGet(), thus if the GL implementation does not support that enum, the return value is 0.
value | GL enumeration to fetch |
Definition at line 102 of file gl_get.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
const vecN< T, N > & | v | ||
) |
Template version for setting array of uniforms,.
Equivalent to
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
Definition at line 204 of file gluniform.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
const vecN< T, N > & | v, | ||
bool | transposed | ||
) |
Template version for setting array of uniform matrices, equivalent to
This call is for when v is an array of matrices.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use |
transposed | flag to indicate if the matrices are to be transposed |
Definition at line 225 of file gluniform.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
c_array< const T > | v | ||
) |
Template version for setting array of uniforms,.
Equivalent to
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
Definition at line 247 of file gluniform.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
c_array< const T > | v, | ||
bool | transposed | ||
) |
Template version for setting array of uniforms.
Equivalent to
This call is for when v is an array of matrices.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use |
transposed | flag to indicate if the matrices are to be transposed |
Definition at line 297 of file gluniform.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
c_array< const T > | v | ||
) |
Template version for setting array of uniforms,.
Equivalent to
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
Definition at line 320 of file gluniform.hpp.
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
const T * | v | ||
) |
Template version for setting an of uniform values.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
GLsizei | count, | ||
const matrixNxM< T, N, M > * | v, | ||
bool | transposed = false |
||
) |
Template version for setting an array of matrix uniform values.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
count | number of elements from the array v to use. |
transposed | set to tue true if GL should interpret the matrices as transposed |
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
const vecN< T, N > & | v | ||
) |
Template version for setting a single uniform value.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
void fastuidraw::gl::ProgramUniform | ( | GLuint | program, |
int | location, | ||
const matrixNxM< T, N, M > & | v, | ||
bool | transposed = false |
||
) |
Template version for setting a single matrix uniform value.
program | GL name of program to which uniform(s) belong |
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
transposed | set to tue true if GL should interpret the matrices as transposed |
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
const vecN< T, N > & | v | ||
) |
Template version for setting array of uniforms.
Equivalent to
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
Definition at line 65 of file gluniform.hpp.
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
const vecN< T, N > & | v, | ||
bool | transposed | ||
) |
Template version for setting array of uniform matrices.
Equivalent to
This call is for when v is an array of matrices.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use |
transposed | flag to indicate if the matrices are to be transposed |
Definition at line 87 of file gluniform.hpp.
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
c_array< const T > | v | ||
) |
Template version for setting array of uniforms.
Equivalent to
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
Definition at line 108 of file gluniform.hpp.
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
c_array< const T > | v, | ||
bool | transposed | ||
) |
Template version for setting array of uniforms.
Equivalent to
This call is for when v is an array of matrices.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use |
transposed | flag to indicate if the matrices are to be transposed |
Definition at line 156 of file gluniform.hpp.
void fastuidraw::gl::Uniform | ( | int | location, |
c_array< const T > | v | ||
) |
Template version for setting array of uniforms,.
Equivalent to
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
Definition at line 178 of file gluniform.hpp.
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
const T * | v | ||
) |
Template version for setting an of uniform values.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | array of values |
count | number of elements from the array v to use. |
void fastuidraw::gl::Uniform | ( | int | location, |
GLsizei | count, | ||
const matrixNxM< T, N, M > * | v, | ||
bool | transposed = false |
||
) |
Template version for setting an array of matrix uniform values.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
count | number of elements from the array v to use. |
transposed | set to tue true if GL should interpret the matrices as transposed |
void fastuidraw::gl::Uniform | ( | int | location, |
const vecN< T, N > & | v | ||
) |
Template version for setting a single uniform value.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
void fastuidraw::gl::Uniform | ( | int | location, |
const matrixNxM< T, N, M > & | v, | ||
bool | transposed = false |
||
) |
Template version for setting a single matrix uniform value.
location | location of uniform, i.e. return value of glGetUniformLocation |
v | value |
transposed | set to tue true if GL should interpret the matrices as transposed |