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...
#include <gl_program.hpp>
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.
Definition at line 1620 of file gl_program.hpp.
◆ SamplerInitializer()
fastuidraw::gl::SamplerInitializer::SamplerInitializer |
( |
c_string |
uniform_name, |
|
|
int |
binding_point |
|
) |
| |
|
inline |
Ctor.
- Parameters
-
uniform_name | name of uniform sampler2D in GLSL to initialize |
binding_point | binding point to initialize the uniform to; 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. |
Definition at line 1633 of file gl_program.hpp.
◆ init_uniform()
virtual void fastuidraw::gl::SamplerInitializer::init_uniform |
( |
GLuint |
program, |
|
|
Program::shader_variable_info |
info, |
|
|
unsigned int |
array_index, |
|
|
bool |
program_bound |
|
) |
| const |
|
protectedvirtual |
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). |
Implements fastuidraw::gl::UniformInitalizerBase.
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/gl_backend/gl_program.hpp