globjects  2.0.0.690708773bba
Strict OpenGL objects wrapper.

Abstract base class for templated Uniforms. More...

#include <globjects/include/globjects/AbstractUniform.h>

Inheritance diagram for globjects::AbstractUniform:
globjects::Uniform< T >

Public Types

enum  BindlessImplementation { SeparateShaderObjectsARB, Legacy }
 

Public Member Functions

 AbstractUniform (const Program *program, gl::GLint location, UniformType type)
 
 AbstractUniform (const Program *program, const std::string &name, UniformType type)
 
virtual ~AbstractUniform ()
 
const std::string & name () const
 
gl::GLint location () const
 
const LocationIdentityidentity () const
 
UniformType type () const
 

Static Public Member Functions

static void hintBindlessImplementation (const BindlessImplementation impl)
 

Protected Member Functions

void changed ()
 
void update (bool invalidateLocation) const
 
virtual void updateAt (gl::GLint location) const =0
 
void setValue (gl::GLint location, const float &value) const
 
void setValue (gl::GLint location, const int &value) const
 
void setValue (gl::GLint location, const unsigned int &value) const
 
void setValue (gl::GLint location, const bool &value) const
 
void setValue (gl::GLint location, const glm::vec2 &value) const
 
void setValue (gl::GLint location, const glm::vec3 &value) const
 
void setValue (gl::GLint location, const glm::vec4 &value) const
 
void setValue (gl::GLint location, const glm::ivec2 &value) const
 
void setValue (gl::GLint location, const glm::ivec3 &value) const
 
void setValue (gl::GLint location, const glm::ivec4 &value) const
 
void setValue (gl::GLint location, const glm::uvec2 &value) const
 
void setValue (gl::GLint location, const glm::uvec3 &value) const
 
void setValue (gl::GLint location, const glm::uvec4 &value) const
 
void setValue (gl::GLint location, const glm::mat2 &value) const
 
void setValue (gl::GLint location, const glm::mat3 &value) const
 
void setValue (gl::GLint location, const glm::mat4 &value) const
 
void setValue (gl::GLint location, const glm::mat2x3 &value) const
 
void setValue (gl::GLint location, const glm::mat3x2 &value) const
 
void setValue (gl::GLint location, const glm::mat2x4 &value) const
 
void setValue (gl::GLint location, const glm::mat4x2 &value) const
 
void setValue (gl::GLint location, const glm::mat3x4 &value) const
 
void setValue (gl::GLint location, const glm::mat4x3 &value) const
 
void setValue (gl::GLint location, const gl::GLuint64 &value) const
 
void setValue (gl::GLint location, const TextureHandle &value) const
 
void setValue (gl::GLint location, const std::vector< float > &value) const
 
void setValue (gl::GLint location, const std::vector< int > &value) const
 
void setValue (gl::GLint location, const std::vector< unsigned int > &value) const
 
void setValue (gl::GLint location, const std::vector< bool > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::vec2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::vec3 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::vec4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::ivec2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::ivec3 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::ivec4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::uvec2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::uvec3 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::uvec4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat3 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat2x3 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat3x2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat2x4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat4x2 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat3x4 > &value) const
 
void setValue (gl::GLint location, const std::vector< glm::mat4x3 > &value) const
 
void setValue (gl::GLint location, const std::vector< gl::GLuint64 > &value) const
 
void setValue (gl::GLint location, const std::vector< TextureHandle > &value) const
 
template<typename T , std::size_t Count>
void setValue (gl::GLint location, const std::array< T, Count > &value) const
 

Protected Attributes

LocationIdentity m_identity
 
const Programm_program
 
const UniformType m_type
 
gl::GLint m_location
 

Friends

class Program
 Programs (de)register themselves. More...
 

Detailed Description

Abstract base class for templated Uniforms.

Unifies the specialized Uniforms in order to be able to store them in a list or a vector.

See also
Uniform
Program

Member Enumeration Documentation

Enumerator
SeparateShaderObjectsARB 
Legacy 

Constructor & Destructor Documentation

globjects::AbstractUniform::AbstractUniform ( const Program program,
gl::GLint  location,
UniformType  type 
)
globjects::AbstractUniform::AbstractUniform ( const Program program,
const std::string &  name,
UniformType  type 
)
virtual globjects::AbstractUniform::~AbstractUniform ( )
virtual

Member Function Documentation

static void globjects::AbstractUniform::hintBindlessImplementation ( const BindlessImplementation  impl)
static
const std::string& globjects::AbstractUniform::name ( ) const
gl::GLint globjects::AbstractUniform::location ( ) const
const LocationIdentity& globjects::AbstractUniform::identity ( ) const
UniformType globjects::AbstractUniform::type ( ) const
void globjects::AbstractUniform::changed ( )
protected

Iterates over all programs attached to and calls update. Should be called on every value change (i.e., in Uniform).

void globjects::AbstractUniform::update ( bool  invalidateLocation) const
protected

Sets the uniform's value on the program.

virtual void globjects::AbstractUniform::updateAt ( gl::GLint  location) const
protectedpure virtual

This function requires knowledge of the unifom's value.

Implemented in globjects::Uniform< T >.

void globjects::AbstractUniform::setValue ( gl::GLint  location,
const float &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const int &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const unsigned int &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const bool &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::vec2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::vec3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::vec4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::ivec2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::ivec3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::ivec4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::uvec2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::uvec3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::uvec4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat2x3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat3x2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat2x4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat4x2 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat3x4 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const glm::mat4x3 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const gl::GLuint64 &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const TextureHandle value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< float > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< int > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< unsigned int > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< bool > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::vec2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::vec3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::vec4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::ivec2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::ivec3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::ivec4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::uvec2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::uvec3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::uvec4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat2x3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat3x2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat2x4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat4x2 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat3x4 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< glm::mat4x3 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< gl::GLuint64 > &  value 
) const
protected
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::vector< TextureHandle > &  value 
) const
protected
template<typename T , std::size_t Count>
void globjects::AbstractUniform::setValue ( gl::GLint  location,
const std::array< T, Count > &  value 
) const
protected

Friends And Related Function Documentation

friend class Program
friend

Programs (de)register themselves.

Member Data Documentation

LocationIdentity globjects::AbstractUniform::m_identity
protected
const Program* globjects::AbstractUniform::m_program
protected
const UniformType globjects::AbstractUniform::m_type
protected
gl::GLint globjects::AbstractUniform::m_location
mutableprotected

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