Commit 56c5650b authored by Felix Rath's avatar Felix Rath
Browse files

add setUniform for Matrix Arrays.

parent 8d7c9a1f
......@@ -221,6 +221,20 @@ public:
inline void setUniform (GLint _location, const glm::mat2& _v, GLboolean _transpose = GL_FALSE) const { glUniformMatrix2fv (_location, 1, _transpose, glm::value_ptr(_v)); }
inline void setUniform (GLint _location, const glm::mat3& _v, GLboolean _transpose = GL_FALSE) const { glUniformMatrix3fv (_location, 1, _transpose, glm::value_ptr(_v)); }
inline void setUniform (GLint _location, const glm::mat4& _v, GLboolean _transpose = GL_FALSE) const { glUniformMatrix4fv (_location, 1, _transpose, glm::value_ptr(_v)); }
// float matrix array by location
#ifndef ACGL_OPENGLES_VERSION_20
// ES 2 only has square matrices, so omit these:
inline void setUniform (GLint _location, const glm::mat2x3* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix2x3fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat2x4* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix2x4fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat3x2* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix3x2fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat3x4* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix3x4fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat4x2* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix4x2fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat4x3* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix4x3fv(_location, _n, _transpose, glm::value_ptr(*_v)); }
#endif
inline void setUniform (GLint _location, const glm::mat2* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix2fv (_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat3* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix3fv (_location, _n, _transpose, glm::value_ptr(*_v)); }
inline void setUniform (GLint _location, const glm::mat4* _v, GLsizei _n, GLboolean _transpose = GL_FALSE) const { glUniformMatrix4fv (_location, _n, _transpose, glm::value_ptr(*_v)); }
#if (ACGL_OPENGL_VERSION >= 40)
// double matrix by location
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment