GL++
0.1
OpenGL API C++ Wrapper
|
Active uniform block of a program. More...
#include <uniform_block.hpp>
Public Member Functions | |
const std::string & | block_name () |
The GLSL name of this block. | |
void | bind_to_point (GLuint point) |
Bind/Link this block to a binding point. | |
GLuint | get_binding_point () const |
Get the point that it is bound to. | |
size_t | data_size () const |
Get in-GPU memory size of this uniform block. | |
size_t | total_active_uniforms () const |
Get total number of active uniforms. | |
bool | is_referenced_by_vertex_shader () const |
Check if block is referenced by vertex shader. | |
bool | is_referenced_by_fragment_shader () const |
Check if block is referenced by fragment shader. | |
bool | is_referenced_by_geometry_shader () const |
Check if block is referenced by geometry shader. | |
const program & | owner_program () const |
Get program that this uniform belongs to. | |
Public Member Functions inherited from glpp::named_object< GLuint > | |
name_type | object_name () const |
Return the name of object (handle) | |
Public Member Functions inherited from glpp::noncopyable | |
noncopyable (noncopyable &) | |
noncopyable & | operator= (noncopyable &) |
Protected Member Functions | |
uniform_block (const program *pprog, const std::string &name, name_type bid) | |
Constructed only be program. | |
void | query_info () |
Actually request uniform block information. |
Protected Attributes | |
std::string | m_block_name |
Block name. | |
const program * | mp_program |
Program that uniform belongs at. | |
bool | m_info_fetched |
Flag if information has been fetched. | |
size_t | m_size |
Variable size. | |
variable_type | m_type |
Variable type;. | |
Protected Attributes inherited from glpp::named_object< GLuint > | |
GLuint | m_gl_name |
Stored object name. |
Friends | |
class | program |
All uniforms belong and are managed by a program object. |
Additional Inherited Members | |
Public Types inherited from glpp::named_object< GLuint > | |
typedef GLuint | name_type |
Type of the name. |
Active uniform block of a program.
Uniforms that do not belong to any uniform_block, belong to global scope. These variable values must be set manually, one by one.
void glpp::uniform_block::bind_to_point | ( | GLuint | point | ) |
Bind/Link this block to a binding point.
The same indexed position should be used by buffer::bind_to_point() http://www.opengl.org/sdk/docs/man4/xhtml/glUniformBlockBinding.xml
|
inline |
The GLSL name of this block.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockName.xml
size_t glpp::uniform_block::data_size | ( | ) | const |
Get in-GPU memory size of this uniform block.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
GLuint glpp::uniform_block::get_binding_point | ( | ) | const |
Get the point that it is bound to.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
bool glpp::uniform_block::is_referenced_by_fragment_shader | ( | ) | const |
Check if block is referenced by fragment shader.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
bool glpp::uniform_block::is_referenced_by_geometry_shader | ( | ) | const |
Check if block is referenced by geometry shader.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
bool glpp::uniform_block::is_referenced_by_vertex_shader | ( | ) | const |
Check if block is referenced by vertex shader.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml
size_t glpp::uniform_block::total_active_uniforms | ( | ) | const |
Get total number of active uniforms.
http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformBlockiv.xml