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...
#include <gl_program.hpp>
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().
Definition at line 1465 of file gl_program.hpp.
◆ UniformInitalizerBase()
fastuidraw::gl::UniformInitalizerBase::UniformInitalizerBase |
( |
c_string |
uniform_name | ) |
|
Ctor.
- Parameters
-
uniform_name | name of uniform to initialize |
◆ init_uniform()
virtual void fastuidraw::gl::UniformInitalizerBase::init_uniform |
( |
GLuint |
program, |
|
|
Program::shader_variable_info |
info, |
|
|
unsigned int |
array_index, |
|
|
bool |
program_bound |
|
) |
| const |
|
protectedpure virtual |
To be implemented by a derived class to make the GL call to initialize a uniform in a GLSL shader.
- Parameters
-
program | GL program |
info | information on uniform (name, type, location, etc) |
array_index | index into GLSL uniform if it is an array |
program_bound | true if and only if the program named by program is bound (via glUseProgram). If the program is not bound, then one SHOULD not bind the program and instead use the GL API points to set values of the uniform(s) that do not rely on having the program bound. One can also safely assume that those API points are supported in the case it is not bound (in particular the function family ProgramUniform() can be safely used). |
Implemented in fastuidraw::gl::SamplerInitializer, fastuidraw::gl::UniformInitializer< c_array< const T > >, and fastuidraw::gl::UniformInitializer< T >.
◆ perform_initialization()
virtual void fastuidraw::gl::UniformInitalizerBase::perform_initialization |
( |
Program * |
pr, |
|
|
bool |
program_bound |
|
) |
| const |
|
virtual |
To be implemented by a derived class to perform additional one-time actions. Function is called after the GL program object is successfully linked.
- Parameters
-
pr | Program to initialize |
program_bound | GLSL Program is already bound, the program is NOT bound if the GL/GLES API supports seperable program objects. |
Implements fastuidraw::gl::ProgramInitializer.
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/gl_backend/gl_program.hpp