9#include <unordered_map>
13#include <globjects/globjects_api.h>
17#ifdef GLOBJECTS_USE_EIGEN
19#include <Eigen/StdVector>
28template<
typename T>
class Uniform;
29enum class UniformType :
unsigned char;
48 SeparateShaderObjectsARB
53#ifdef GLOBJECTS_USE_EIGEN
56 using EigenStdVector = std::vector<T,Eigen::aligned_allocator<T> >;
65 const std::string &
name()
const;
81 void update(
bool invalidateLocation)
const;
85 virtual void updateAt(gl::GLint location)
const = 0;
89 void setValue(gl::GLint location,
const float & value)
const;
90 void setValue(gl::GLint location,
const int & value)
const;
91 void setValue(gl::GLint location,
const unsigned int & value)
const;
92 void setValue(gl::GLint location,
const bool & value)
const;
94 void setValue(gl::GLint location,
const std::vector<float> & value)
const;
95 void setValue(gl::GLint location,
const std::vector<int> & value)
const;
96 void setValue(gl::GLint location,
const std::vector<unsigned int> & value)
const;
97 void setValue(gl::GLint location,
const std::vector<bool> & value)
const;
99 void setValue(gl::GLint location,
const gl::GLuint64 & value)
const;
102 void setValue(gl::GLint location,
const std::vector<gl::GLuint64> & value)
const;
103 void setValue(gl::GLint location,
const std::vector<TextureHandle> & value)
const;
105 template <
typename T, std::
size_t Count>
106 void setValue(gl::GLint location,
const std::array<T, Count> & value)
const;
109 void setValue(gl::GLint location,
const glm::vec2 & value)
const;
110 void setValue(gl::GLint location,
const glm::vec3 & value)
const;
111 void setValue(gl::GLint location,
const glm::vec4 & value)
const;
113 void setValue(gl::GLint location,
const glm::ivec2 & value)
const;
114 void setValue(gl::GLint location,
const glm::ivec3 & value)
const;
115 void setValue(gl::GLint location,
const glm::ivec4 & value)
const;
117 void setValue(gl::GLint location,
const glm::uvec2 & value)
const;
118 void setValue(gl::GLint location,
const glm::uvec3 & value)
const;
119 void setValue(gl::GLint location,
const glm::uvec4 & value)
const;
121 void setValue(gl::GLint location,
const glm::mat2 & value)
const;
122 void setValue(gl::GLint location,
const glm::mat3 & value)
const;
123 void setValue(gl::GLint location,
const glm::mat4 & value)
const;
125 void setValue(gl::GLint location,
const glm::mat2x3 & value)
const;
126 void setValue(gl::GLint location,
const glm::mat3x2 & value)
const;
127 void setValue(gl::GLint location,
const glm::mat2x4 & value)
const;
128 void setValue(gl::GLint location,
const glm::mat4x2 & value)
const;
129 void setValue(gl::GLint location,
const glm::mat3x4 & value)
const;
130 void setValue(gl::GLint location,
const glm::mat4x3 & value)
const;
132 void setValue(gl::GLint location,
const std::vector<glm::vec2> & value)
const;
133 void setValue(gl::GLint location,
const std::vector<glm::vec3> & value)
const;
134 void setValue(gl::GLint location,
const std::vector<glm::vec4> & value)
const;
136 void setValue(gl::GLint location,
const std::vector<glm::ivec2> & value)
const;
137 void setValue(gl::GLint location,
const std::vector<glm::ivec3> & value)
const;
138 void setValue(gl::GLint location,
const std::vector<glm::ivec4> & value)
const;
140 void setValue(gl::GLint location,
const std::vector<glm::uvec2> & value)
const;
141 void setValue(gl::GLint location,
const std::vector<glm::uvec3> & value)
const;
142 void setValue(gl::GLint location,
const std::vector<glm::uvec4> & value)
const;
144 void setValue(gl::GLint location,
const std::vector<glm::mat2> & value)
const;
145 void setValue(gl::GLint location,
const std::vector<glm::mat3> & value)
const;
146 void setValue(gl::GLint location,
const std::vector<glm::mat4> & value)
const;
148 void setValue(gl::GLint location,
const std::vector<glm::mat2x3> & value)
const;
149 void setValue(gl::GLint location,
const std::vector<glm::mat3x2> & value)
const;
150 void setValue(gl::GLint location,
const std::vector<glm::mat2x4> & value)
const;
151 void setValue(gl::GLint location,
const std::vector<glm::mat4x2> & value)
const;
152 void setValue(gl::GLint location,
const std::vector<glm::mat3x4> & value)
const;
153 void setValue(gl::GLint location,
const std::vector<glm::mat4x3> & value)
const;
157#ifdef GLOBJECTS_USE_EIGEN
159 void setValue(gl::GLint location,
const Eigen::Vector2f & value)
const;
160 void setValue(gl::GLint location,
const Eigen::Vector3f & value)
const;
161 void setValue(gl::GLint location,
const Eigen::Vector4f & value)
const;
163 void setValue(gl::GLint location,
const Eigen::Vector2i &value)
const;
164 void setValue(gl::GLint location,
const Eigen::Vector3i & value)
const;
165 void setValue(gl::GLint location,
const Eigen::Vector4i & value)
const;
168 void setValue(gl::GLint location,
const Eigen::Matrix<unsigned int, 2, 1> &value)
const;
169 void setValue(gl::GLint location,
const Eigen::Matrix<unsigned int, 3, 1> &value)
const;
170 void setValue(gl::GLint location,
const Eigen::Matrix<unsigned int, 4, 1> &value)
const;
172 void setValue(gl::GLint location,
const Eigen::Matrix2f & value)
const;
173 void setValue(gl::GLint location,
const Eigen::Matrix3f & value)
const;
174 void setValue(gl::GLint location,
const Eigen::Matrix4f & value)
const;
176 void setValue(gl::GLint location,
const Eigen::Matrix<float, 2, 3> & value)
const;
177 void setValue(gl::GLint location,
const Eigen::Matrix<float, 3, 2> & value)
const;
178 void setValue(gl::GLint location,
const Eigen::Matrix<float, 2, 4> & value)
const;
179 void setValue(gl::GLint location,
const Eigen::Matrix<float, 4, 2> & value)
const;
180 void setValue(gl::GLint location,
const Eigen::Matrix<float, 3, 4> & value)
const;
181 void setValue(gl::GLint location,
const Eigen::Matrix<float, 4, 3> & value)
const;
223#include <globjects/AbstractUniform.inl>
Definition: LocationIdentity.h:18
Wraps an OpenGL program.
Definition: Program.h:82
Definition: TextureHandle.h:21
Contains all the classes that wrap OpenGL functionality.