A block_info represents an object from which one can query the members of a uniform or shader storage block.
More...
#include <gl_program.hpp>
A block_info represents an object from which one can query the members of a uniform or shader storage block.
Definition at line 825 of file gl_program.hpp.
◆ block_info()
fastuidraw::gl::Program::block_info::block_info |
( |
void |
| ) |
|
◆ block_index()
GLint fastuidraw::gl::Program::block_info::block_index |
( |
void |
| ) |
const |
◆ buffer_size()
GLint fastuidraw::gl::Program::block_info::buffer_size |
( |
void |
| ) |
const |
Returns the size in bytes of the block (i.e.the size needed for a buffer object to correctly back the block). The default uniform block will have the size as 0.
◆ initial_buffer_binding()
GLint fastuidraw::gl::Program::block_info::initial_buffer_binding |
( |
void |
| ) |
const |
Returns the buffer binding point of the block when the GLSL program was -FIRST- created. If that binding point has been changed (for instance for UBO's by calling glUniformBlockBinding, or for SSBO's by calling glShaderStorageBlockBinding), then the return value is not suitable to be used to compute the binding point. Note that GLES3 does not allow for the binding point of an SSBO to change (because glShaderStorageBlockBinding is not part of its API).
◆ name()
c_string fastuidraw::gl::Program::block_info::name |
( |
void |
| ) |
const |
Name of the block within the GL API.
◆ number_variables()
unsigned int fastuidraw::gl::Program::block_info::number_variables |
( |
void |
| ) |
const |
Returns the number of active variables of the block. Note that an array of is classified as a single variable.
◆ operator bool()
fastuidraw::gl::Program::block_info::operator bool |
( |
| ) |
const |
|
inline |
◆ operator<()
bool fastuidraw::gl::Program::block_info::operator< |
( |
block_info |
rhs | ) |
const |
|
inline |
Comparison operation for sorting. Comparison is done by internal pointer value of object not the values of the object.
- Parameters
-
Definition at line 943 of file gl_program.hpp.
◆ shader_variable_src()
Returns the backing type of the block.
◆ variable() [1/2]
Returns the ID'd variable. The values are sorted in alphabetical order of shader_variable_info::name(). The variable list is for those variables of this block.
- Parameters
-
◆ variable() [2/2]
shader_variable_info fastuidraw::gl::Program::block_info::variable |
( |
c_string |
name, |
|
|
unsigned int * |
out_array_index = nullptr , |
|
|
unsigned int * |
out_leading_array_index = nullptr |
|
) |
| |
Find a shader variable in the block from the a name. The search handles the case where looking for an element of an array and also, in the case of a shader storage block variable where shader_variable_info::shader_storage_buffer_top_level_array_size() being not negative one, giving the leading index into the top level array as well. The values can be used in the methods shader_variable_info::location() and shader_variable_info::buffer_offset() to get the location and buffer offset of the element of the shader variable.
- Parameters
-
name | variable name to look for |
*out_array_index | location to which to write the array index value; if nullptr, value is not written |
*out_leading_array_index | location to which to write the leading array index value; if nullptr, value is not written |
The documentation for this class was generated from the following file:
- /home/kevin/fastuidraw.krogueintel/inc/fastuidraw/gl_backend/gl_program.hpp