Removing 'using namespace glm;' and fixing breakages
This commit is contained in:
parent
4cb08135cd
commit
6997746c86
|
@ -236,37 +236,37 @@ void Shader::setUniform(const std::string& name, float x, float y, float z)
|
||||||
glUniform3f(getUniformLocation(name), x, y, z);
|
glUniform3f(getUniformLocation(name), x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const vec3& v)
|
void Shader::setUniform(const std::string& name, const glm::vec3& v)
|
||||||
{
|
{
|
||||||
glUniform3fv(getUniformLocation(name), 1, value_ptr(v));
|
glUniform3fv(getUniformLocation(name), 1, value_ptr(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const dvec3& v)
|
void Shader::setUniform(const std::string& name, const glm::dvec3& v)
|
||||||
{
|
{
|
||||||
glUniform3dv(getUniformLocation(name), 1, value_ptr(v));
|
glUniform3dv(getUniformLocation(name), 1, value_ptr(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const vec4& v)
|
void Shader::setUniform(const std::string& name, const glm::vec4& v)
|
||||||
{
|
{
|
||||||
glUniform4fv(getUniformLocation(name), 1, value_ptr(v));
|
glUniform4fv(getUniformLocation(name), 1, value_ptr(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const dvec4& v)
|
void Shader::setUniform(const std::string& name, const glm::dvec4& v)
|
||||||
{
|
{
|
||||||
glUniform4dv(getUniformLocation(name), 1, value_ptr(v));
|
glUniform4dv(getUniformLocation(name), 1, value_ptr(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const dmat4& m)
|
void Shader::setUniform(const std::string& name, const glm::dmat4& m)
|
||||||
{
|
{
|
||||||
glUniformMatrix4dv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
glUniformMatrix4dv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const mat4& m)
|
void Shader::setUniform(const std::string& name, const glm::mat4& m)
|
||||||
{
|
{
|
||||||
glUniformMatrix4fv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
glUniformMatrix4fv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Shader::setUniform(const std::string& name, const mat3& m)
|
void Shader::setUniform(const std::string& name, const glm::mat3& m)
|
||||||
{
|
{
|
||||||
glUniformMatrix3fv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
glUniformMatrix3fv(getUniformLocation(name), 1, GL_FALSE, value_ptr(m));
|
||||||
}
|
}
|
||||||
|
|
14
src/Shader.h
14
src/Shader.h
|
@ -38,13 +38,13 @@ public:
|
||||||
|
|
||||||
// Set uniforms
|
// Set uniforms
|
||||||
void setUniform(const std::string& name, float x, float y, float z);
|
void setUniform(const std::string& name, float x, float y, float z);
|
||||||
void setUniform(const std::string& name, const vec3& v);
|
void setUniform(const std::string& name, const glm::vec3& v);
|
||||||
void setUniform(const std::string& name, const dvec3& v);
|
void setUniform(const std::string& name, const glm::dvec3& v);
|
||||||
void setUniform(const std::string& name, const vec4& v);
|
void setUniform(const std::string& name, const glm::vec4& v);
|
||||||
void setUniform(const std::string& name, const dvec4& v);
|
void setUniform(const std::string& name, const glm::dvec4& v);
|
||||||
void setUniform(const std::string& name, const dmat4& m);
|
void setUniform(const std::string& name, const glm::dmat4& m);
|
||||||
void setUniform(const std::string& name, const mat4& m);
|
void setUniform(const std::string& name, const glm::mat4& m);
|
||||||
void setUniform(const std::string& name, const mat3& m);
|
void setUniform(const std::string& name, const glm::mat3& m);
|
||||||
void setUniform(const std::string& name, float val);
|
void setUniform(const std::string& name, float val);
|
||||||
void setUniform(const std::string& name, int val);
|
void setUniform(const std::string& name, int val);
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,4 @@
|
||||||
#include <glm/gtc/matrix_transform.hpp>
|
#include <glm/gtc/matrix_transform.hpp>
|
||||||
#include <glm/gtc/type_ptr.hpp>
|
#include <glm/gtc/type_ptr.hpp>
|
||||||
|
|
||||||
using namespace glm;
|
|
||||||
|
|
||||||
#endif // __MATH_H__
|
#endif // __MATH_H__
|
||||||
|
|
Loading…
Reference in New Issue