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

Active uniform variable of global scope. More...

#include <global_uniform.hpp>

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

Public Types

typedef GLint location_type
 Type of uniform location.

Public Member Functions

location_type location () const
 Get unique location of this variable in global uniform block.
glUniform like functions
void set1f (GLfloat v1)
void set2f (GLfloat v1, GLfloat v2)
void set2f (const GLfloat *pv, size_t count=1)
void set3f (GLfloat v1, GLfloat v2, GLfloat v3)
void set3f (const GLfloat *pv, size_t count=1)
void set4f (GLfloat v1, GLfloat v2, GLfloat v3, GLfloat v4)
void set4f (const GLfloat *pv, size_t count=1)
void set1d (GLdouble v1)
void set2d (GLdouble v1, GLdouble v2)
void set2d (const GLdouble *pv, size_t count=1)
void set3d (GLdouble v1, GLdouble v2, GLdouble v3)
void set3d (const GLdouble *pv, size_t count=1)
void set4d (GLdouble v1, GLdouble v2, GLdouble v3, GLdouble v4)
void set4d (const GLdouble *pv, size_t count=1)
void set1i (GLint v1)
void set2i (GLint v1, GLint v2)
void set2i (const GLint *pv, size_t count=1)
void set3i (GLint v1, GLint v2, GLint v3)
void set3i (const GLint *pv, size_t count=1)
void set4i (GLint v1, GLint v2, GLint v3, GLint v4)
void set4i (const GLint *pv, size_t count=1)
void set1ui (GLuint v1)
void set2ui (GLuint v1, GLuint v2)
void set2ui (const GLuint *pv, size_t count=1)
void set3ui (GLuint v1, GLuint v2, GLuint v3)
void set3ui (const GLuint *pv, size_t count=1)
void set4ui (GLuint v1, GLuint v2, GLuint v3, GLuint v4)
void set4ui (const GLuint *pv, size_t count=1)
void setmat2f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat3f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat4f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat2x3f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat2x4f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat3x2f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat3x4f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat4x2f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat4x3f (const GLfloat *pm, bool transpose=false, size_t count=1)
void setmat2d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat3d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat4d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat2x3d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat2x4d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat3x2d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat3x4d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat4x2d (const GLdouble *pm, bool transpose=false, size_t count=1)
void setmat4x3d (const GLdouble *pm, bool transpose=false, size_t count=1)
- Public Member Functions inherited from glpp::uniform
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

 global_uniform (program *pprog, const std::string &name, name_type uni_index, location_type location)
 Constructed only by program.
- Protected Member Functions inherited from glpp::uniform
 uniform (program *pprog, const std::string &name, name_type uniform_index)
 Constructed only by program.

Protected Attributes

location_type m_gl_location
 Location of uniform variable in global block.
- Protected Attributes inherited from glpp::uniform
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.

Detailed Description

Active uniform variable of global scope.

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(), program::get_global_uniform()

Member Function Documentation

location_type glpp::global_uniform::location ( ) const
inline

Get unique location of this variable in global uniform block.

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


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