OGLplus (0.45.0) a C++ wrapper for OpenGL

Encapsulates uniform block operations. More...

#include </home/chochlik/devel/oglplus/include/oglplus/uniform_block.hpp>

Inheritance diagram for oglplus::UniformBlock:
Collaboration diagram for oglplus::UniformBlock:

Public Member Functions

 UniformBlock (const Program &program, String identifier)
 Construction from a program and an identifier. More...
 
bool ReferencedBy (ShaderType shader_type)
 Returns true if this uniform block is referenced by shader_type. More...
 
GLuint DataSize (void)
 Returns the size of the uniform block. More...
 

Static Public Member Functions

static GLuint MaxIn (ShaderType shader_type)
 Return the maximum number of uniform blocks for a shader_type.
 

Detailed Description

Encapsulates uniform block operations.

The difference between UniformBlock and LazyUniformBlock is, that UniformBlock tries to get the location of the GLSL uniform block variable in a Program during construction and LazyUniformBlock postpones this initialization until the value is actually needed at the cost of having to internally store the identifer in a String.

See Also
LazyUniformBlock
Uniform

Requires OpenGL 3.1 or the GL_ARB_uniform_buffer_object extension.

Constructor & Destructor Documentation

oglplus::UniformBlock::UniformBlock ( const Program program,
String  identifier 
)

Construction from a program and an identifier.

Related OpenGL symbols:
glGetUniformBlockIndex

Member Function Documentation

GLuint oglplus::UniformBlockTpl< Unspecified >::DataSize ( void  )
inherited

Returns the size of the uniform block.

Related OpenGL symbols:
glGetActiveUniformBlock

References OGLPLUS_VERIFY.

bool oglplus::UniformBlockTpl< Unspecified >::ReferencedBy ( ShaderType  shader_type)
inherited

Returns true if this uniform block is referenced by shader_type.

Related OpenGL symbols:
glGetActiveUniformBlock

References OGLPLUS_VERIFY.


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

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).