globjects
1.0.0.000000000000
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
globjects
include
globjects
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>
7
#include <
globjects/AbstractUniform.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>
AbstractUniform.h
globjects::AbstractUniform
Abstract base class for templated Uniforms.
Definition
AbstractUniform.h:35
globjects::AbstractUniform::location
gl::GLint location() const
globjects::AbstractUniform::name
const std::string & name() const
globjects::Program
Wraps an OpenGL program.
Definition
Program.h:79
globjects::Uniform
Wraps access to typed global GLSL variables.
Definition
Uniform.h:37
globjects::Uniform::Uniform
Uniform(const std::string &name, const T &value)
globjects::Uniform::m_value
T m_value
The uniforms value, explictly required when relinking programs.
Definition
Uniform.h:54
globjects::Uniform::Uniform
Uniform(const std::string &name)
globjects::Uniform::~Uniform
virtual ~Uniform()
globjects::Uniform::Uniform
Uniform(gl::GLint location, const T &value)
globjects::Uniform::updateAt
virtual void updateAt(const Program *program, gl::GLint location) const override
globjects::Uniform::Uniform
Uniform(gl::GLint location)
globjects::Uniform::value
const T & value() const
globjects::Uniform::set
void set(const T &value)
globjects
Contains all the classes that wrap OpenGL functionality.
Generated on Wed Jul 4 2018 08:51:56 for globjects by
1.9.8