globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
Uniform.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <glbinding/gl/types.h>
5
6#include <globjects/globjects_api.h>
8
9
10namespace globjects
11{
12
13
35template<typename T>
37{
38public:
39 Uniform(gl::GLint location);
40 Uniform(gl::GLint location, const T & value);
41 Uniform(const std::string & name);
42 Uniform(const std::string & name, const T & value);
43
44 void set(const T & value);
45
46 const T & value() const;
47
48protected:
49 virtual ~Uniform();
50
51 virtual void updateAt(const Program * program, gl::GLint location) const override;
52
53protected:
55};
56
57
58} // namespace globjects
59
60
61#include <globjects/Uniform.inl>
Abstract base class for templated Uniforms.
Definition AbstractUniform.h:35
gl::GLint location() const
const std::string & name() const
Wraps an OpenGL program.
Definition Program.h:79
Wraps access to typed global GLSL variables.
Definition Uniform.h:37
Uniform(const std::string &name, const T &value)
T m_value
The uniforms value, explictly required when relinking programs.
Definition Uniform.h:54
Uniform(const std::string &name)
Uniform(gl::GLint location, const T &value)
virtual void updateAt(const Program *program, gl::GLint location) const override
Uniform(gl::GLint location)
const T & value() const
void set(const T &value)
Contains all the classes that wrap OpenGL functionality.