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

Query object for active uniform variable. More...

#include <uniform.hpp>

Inheritance diagram for glpp::uniform:
glpp::named_object< GLuint > glpp::noncopyable glpp::global_uniform

Public Member Functions

const std::string & var_name () const
 Get GLSL variable name of this uniform.
size_t size () const
 Get in-GPU memory size of uniform variable.
size_t offset () const
 Get in-GPU memory offset from beginning of uniform block.
variable_type type () const
 Get data type of uniform variable.
size_t array_stride () const
 The stride of array for in-GPU storage.
size_t matrix_stride () const
 The stride of matrix for in-GPU storage.
bool is_row_major () const
 Check if matrix is stored in row major layout.
const shared_uniform_block_towner_block () const throw (exception)
 Get shared point to uniform_block owner (if any).
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 (program *pprog, const std::string &name, name_type uniform_index)
 Constructed only by program.

Protected Attributes

programmp_program
 Program that uniform belongs at.
- 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

Query object for active uniform variable.

This interface permits querying information about any type of uniform variable. If you want to set a value of a global uniform variable (not in uniform block) see global_uniform.

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

Member Function Documentation

size_t glpp::uniform::array_stride ( ) const

The stride of array for in-GPU storage.

This is only valid for array uniform variables. http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

bool glpp::uniform::is_row_major ( ) const

Check if matrix is stored in row major layout.

This is only valid for matrix uniform variables. http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

size_t glpp::uniform::matrix_stride ( ) const

The stride of matrix for in-GPU storage.

This is only valid for matrix uniform variables. http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

size_t glpp::uniform::offset ( ) const

Get in-GPU memory offset from beginning of uniform block.

http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

const shared_uniform_block_t & glpp::uniform::owner_block ( ) const throw (exception)

Get shared point to uniform_block owner (if any).

http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

Exceptions
exceptionIf this variable does not belong to a uniform_block.
size_t glpp::uniform::size ( ) const

Get in-GPU memory size of uniform variable.

http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniformsiv.xml

variable_type glpp::uniform::type ( ) const
const std::string& glpp::uniform::var_name ( ) const
inline

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