GL++  0.1
OpenGL API C++ Wrapper
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
glpp::uniform_block Struct Reference

Active uniform block of a program. More...

#include <uniform_block.hpp>

Inheritance diagram for glpp::uniform_block:
glpp::named_object< GLuint > glpp::noncopyable

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 programowner_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 &)
noncopyableoperator= (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 programmp_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.

Detailed Description

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.

Remarks
non-copyable, non-inheritable, RAII
See Also
program::get_uniform_block()

Member Function Documentation

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

See Also
bind()
const std::string& glpp::uniform_block::block_name ( )
inline
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
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

The documentation for this struct was generated from the following files: