globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
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 
10 namespace globjects
11 {
12 
13 
35 template<typename T>
36 class Uniform : public AbstractUniform
37 {
38 public:
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 
48 protected:
49  virtual ~Uniform();
50 
51  virtual void updateAt(const Program * program, gl::GLint location) const override;
52 
53 protected:
54  T m_value;
55 };
56 
57 
58 } // namespace globjects
59 
60 
61 #include <globjects/Uniform.inl>
virtual void updateAt(const Program *program, gl::GLint location) const override
const T & value() const
Contains all the classes that wrap OpenGL functionality.
Uniform(gl::GLint location)
void set(const T &value)
T m_value
The uniforms value, explictly required when relinking programs.
Definition: Uniform.h:54