Browse Source

Added support for uniform arrays.

Also not including Math/Matrix.h in AbstractShaderProgram.cpp and using
just RectangularMatrix everywhere.
pull/278/head
Vladimír Vondruš 13 years ago
parent
commit
8923f2debb
  1. 290
      src/AbstractShaderProgram.cpp
  2. 448
      src/AbstractShaderProgram.h

290
src/AbstractShaderProgram.cpp

@ -27,7 +27,7 @@
#include <fstream>
#include <type_traits>
#include "Math/Matrix.h"
#include "Math/RectangularMatrix.h"
#include "Shader.h"
#include "Implementation/State.h"
#include "Implementation/ShaderProgramState.h"
@ -37,22 +37,22 @@
namespace Magnum {
AbstractShaderProgram::Uniform1fImplementation AbstractShaderProgram::uniform1fImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform1fvImplementation AbstractShaderProgram::uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform2fvImplementation AbstractShaderProgram::uniform2fvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform3fvImplementation AbstractShaderProgram::uniform3fvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform4fvImplementation AbstractShaderProgram::uniform4fvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform1iImplementation AbstractShaderProgram::uniform1iImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform1ivImplementation AbstractShaderProgram::uniform1ivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform2ivImplementation AbstractShaderProgram::uniform2ivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform3ivImplementation AbstractShaderProgram::uniform3ivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform4ivImplementation AbstractShaderProgram::uniform4ivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
#ifndef MAGNUM_TARGET_GLES2
AbstractShaderProgram::Uniform1uiImplementation AbstractShaderProgram::uniform1uiImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform1uivImplementation AbstractShaderProgram::uniform1uivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform2uivImplementation AbstractShaderProgram::uniform2uivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform3uivImplementation AbstractShaderProgram::uniform3uivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform4uivImplementation AbstractShaderProgram::uniform4uivImplementation = &AbstractShaderProgram::uniformImplementationDefault;
#endif
#ifndef MAGNUM_TARGET_GLES
AbstractShaderProgram::Uniform1dImplementation AbstractShaderProgram::uniform1dImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform1dvImplementation AbstractShaderProgram::uniform1dvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform2dvImplementation AbstractShaderProgram::uniform2dvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform3dvImplementation AbstractShaderProgram::uniform3dvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
AbstractShaderProgram::Uniform4dvImplementation AbstractShaderProgram::uniform4dvImplementation = &AbstractShaderProgram::uniformImplementationDefault;
@ -181,19 +181,19 @@ void AbstractShaderProgram::initializeContextBasedFunctionality(Context* context
context->isExtensionSupported<Extensions::GL::EXT::direct_state_access>()) {
Debug() << "AbstractShaderProgram: using" << (context->isExtensionSupported<Extensions::GL::ARB::separate_shader_objects>() ?
Extensions::GL::ARB::separate_shader_objects::string() : Extensions::GL::EXT::direct_state_access::string()) << "features";
uniform1fImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1fvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform2fvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform3fvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform4fvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1iImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1ivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform2ivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform3ivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform4ivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1uiImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1uivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform2uivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform3uivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform4uivImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1dImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform1dvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform2dvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform3dvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
uniform4dvImplementation = &AbstractShaderProgram::uniformImplementationDSA;
@ -222,359 +222,359 @@ void AbstractShaderProgram::initializeContextBasedFunctionality(Context* context
#endif
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, GLfloat value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const GLfloat* const values) {
use();
glUniform1f(location, value);
glUniform1fv(location, count, values);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, GLfloat value) {
glProgramUniform1f(_id, location, value);
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLfloat* const values) {
glProgramUniform1fv(_id, location, count, values);
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<2, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<2, GLfloat>* const values) {
use();
glUniform2fv(location, 1, value.data());
glUniform2fv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<2, GLfloat>& value) {
glProgramUniform2fv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLfloat>* const values) {
glProgramUniform2fv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<3, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<3, GLfloat>* const values) {
use();
glUniform3fv(location, 1, value.data());
glUniform3fv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<3, GLfloat>& value) {
glProgramUniform3fv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLfloat>* const values) {
glProgramUniform3fv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<4, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<4, GLfloat>* const values) {
use();
glUniform4fv(location, 1, value.data());
glUniform4fv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<4, GLfloat>& value) {
glProgramUniform4fv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLfloat>* const values) {
glProgramUniform4fv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, GLint value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const GLint* const values) {
use();
glUniform1i(location, value);
glUniform1iv(location, count, values);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, GLint value) {
glProgramUniform1i(_id, location, value);
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLint* const values) {
glProgramUniform1iv(_id, location, count, values);
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<2, GLint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<2, GLint>* const values) {
use();
glUniform2iv(location, 1, value.data());
glUniform2iv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<2, GLint>& value) {
glProgramUniform2iv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLint>* const values) {
glProgramUniform2iv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<3, GLint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<3, GLint>* const values) {
use();
glUniform3iv(location, 1, value.data());
glUniform3iv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<3, GLint>& value) {
glProgramUniform3iv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLint>* const values) {
glProgramUniform3iv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<4, GLint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<4, GLint>* const values) {
use();
glUniform4iv(location, 1, value.data());
glUniform4iv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<4, GLint>& value) {
glProgramUniform4iv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLint>* const values) {
glProgramUniform4iv(_id, location, count, values[0].data());
}
#endif
#ifndef MAGNUM_TARGET_GLES2
void AbstractShaderProgram::uniformImplementationDefault(GLint location, GLuint value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const GLuint* const values) {
use();
glUniform1ui(location, value);
glUniform1uiv(location, count, values);
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, GLuint value) {
glProgramUniform1ui(_id, location, value);
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLuint* const values) {
glProgramUniform1uiv(_id, location, count, values);
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<2, GLuint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<2, GLuint>* const values) {
use();
glUniform2uiv(location, 1, value.data());
glUniform2uiv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<2, GLuint>& value) {
glProgramUniform2uiv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLuint>* const values) {
glProgramUniform2uiv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<3, GLuint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<3, GLuint>* const values) {
use();
glUniform3uiv(location, 1, value.data());
glUniform3uiv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<3, GLuint>& value) {
glProgramUniform3uiv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLuint>* const values) {
glProgramUniform3uiv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<4, GLuint>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<4, GLuint>* const values) {
use();
glUniform4uiv(location, 1, value.data());
glUniform4uiv(location, count, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<4, GLuint>& value) {
glProgramUniform4uiv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLuint>* const values) {
glProgramUniform4uiv(_id, location, count, values[0].data());
}
#endif
#endif
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDefault(GLint location, GLdouble value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const GLdouble* const values) {
use();
glUniform1d(location, value);
glUniform1dv(location, count, values);
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, GLdouble value) {
glProgramUniform1d(_id, location, value);
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const GLdouble* const values) {
glProgramUniform1dv(_id, location, count, values);
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<2, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<2, GLdouble>* const values) {
use();
glUniform2dv(location, 1, value.data());
glUniform2dv(location, count, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<2, GLdouble>& value) {
glProgramUniform2dv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<2, GLdouble>* const values) {
glProgramUniform2dv(_id, location, count, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<3, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<3, GLdouble>* const values) {
use();
glUniform3dv(location, 1, value.data());
glUniform3dv(location, count, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<3, GLdouble>& value) {
glProgramUniform3dv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<3, GLdouble>* const values) {
glProgramUniform3dv(_id, location, count, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Vector<4, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::Vector<4, GLdouble>* const values) {
use();
glUniform4dv(location, 1, value.data());
glUniform4dv(location, count, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Vector<4, GLdouble>& value) {
glProgramUniform4dv(_id, location, 1, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::Vector<4, GLdouble>* const values) {
glProgramUniform4dv(_id, location, count, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<2, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* const values) {
use();
glUniformMatrix2fv(location, 1, GL_FALSE, value.data());
glUniformMatrix2fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<2, GLfloat>& value) {
glProgramUniformMatrix2fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* const values) {
glProgramUniformMatrix2fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<3, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* const values) {
use();
glUniformMatrix3fv(location, 1, GL_FALSE, value.data());
glUniformMatrix3fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<3, GLfloat>& value) {
glProgramUniformMatrix3fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* const values) {
glProgramUniformMatrix3fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<4, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* const values) {
use();
glUniformMatrix4fv(location, 1, GL_FALSE, value.data());
glUniformMatrix4fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<4, GLfloat>& value) {
glProgramUniformMatrix4fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* const values) {
glProgramUniformMatrix4fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
#ifndef MAGNUM_TARGET_GLES2
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 3, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* const values) {
use();
glUniformMatrix2x3fv(location, 1, GL_FALSE, value.data());
glUniformMatrix2x3fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 3, GLfloat>& value) {
glProgramUniformMatrix2x3fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* const values) {
glProgramUniformMatrix2x3fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 2, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* const values) {
use();
glUniformMatrix3x2fv(location, 1, GL_FALSE, value.data());
glUniformMatrix3x2fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 2, GLfloat>& value) {
glProgramUniformMatrix3x2fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* const values) {
glProgramUniformMatrix3x2fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 4, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* const values) {
use();
glUniformMatrix2x4fv(location, 1, GL_FALSE, value.data());
glUniformMatrix2x4fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 4, GLfloat>& value) {
glProgramUniformMatrix2x4fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* const values) {
glProgramUniformMatrix2x4fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 2, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* const values) {
use();
glUniformMatrix4x2fv(location, 1, GL_FALSE, value.data());
glUniformMatrix4x2fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 2, GLfloat>& value) {
glProgramUniformMatrix4x2fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* const values) {
glProgramUniformMatrix4x2fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 4, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* const values) {
use();
glUniformMatrix3x4fv(location, 1, GL_FALSE, value.data());
glUniformMatrix3x4fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 4, GLfloat>& value) {
glProgramUniformMatrix3x4fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* const values) {
glProgramUniformMatrix3x4fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 3, GLfloat>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* const values) {
use();
glUniformMatrix4x3fv(location, 1, GL_FALSE, value.data());
glUniformMatrix4x3fv(location, count, GL_FALSE, values[0].data());
}
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 3, GLfloat>& value) {
glProgramUniformMatrix4x3fv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* const values) {
glProgramUniformMatrix4x3fv(_id, location, count, GL_FALSE, values[0].data());
}
#endif
#endif
#ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<2, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* const values) {
use();
glUniformMatrix2dv(location, 1, GL_FALSE, value.data());
glUniformMatrix2dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<2, GLdouble>& value) {
glProgramUniformMatrix2dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* const values) {
glProgramUniformMatrix2dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<3, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* const values) {
use();
glUniformMatrix3dv(location, 1, GL_FALSE, value.data());
glUniformMatrix3dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<3, GLdouble>& value) {
glProgramUniformMatrix3dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* const values) {
glProgramUniformMatrix3dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::Matrix<4, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* const values) {
use();
glUniformMatrix4dv(location, 1, GL_FALSE, value.data());
glUniformMatrix4dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::Matrix<4, GLdouble>& value) {
glProgramUniformMatrix4dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* const values) {
glProgramUniformMatrix4dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 3, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* const values) {
use();
glUniformMatrix2x3dv(location, 1, GL_FALSE, value.data());
glUniformMatrix2x3dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 3, GLdouble>& value) {
glProgramUniformMatrix2x3dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* const values) {
glProgramUniformMatrix2x3dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 2, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* const values) {
use();
glUniformMatrix3x2dv(location, 1, GL_FALSE, value.data());
glUniformMatrix3x2dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 2, GLdouble>& value) {
glProgramUniformMatrix3x2dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* const values) {
glProgramUniformMatrix3x2dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 4, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* const values) {
use();
glUniformMatrix2x4dv(location, 1, GL_FALSE, value.data());
glUniformMatrix2x4dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 4, GLdouble>& value) {
glProgramUniformMatrix2x4dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* const values) {
glProgramUniformMatrix2x4dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 2, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* const values) {
use();
glUniformMatrix4x2dv(location, 1, GL_FALSE, value.data());
glUniformMatrix4x2dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 2, GLdouble>& value) {
glProgramUniformMatrix4x2dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* const values) {
glProgramUniformMatrix4x2dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 4, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* const values) {
use();
glUniformMatrix3x4dv(location, 1, GL_FALSE, value.data());
glUniformMatrix3x4dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 4, GLdouble>& value) {
glProgramUniformMatrix3x4dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* const values) {
glProgramUniformMatrix3x4dv(_id, location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 3, GLdouble>& value) {
void AbstractShaderProgram::uniformImplementationDefault(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* const values) {
use();
glUniformMatrix4x3dv(location, 1, GL_FALSE, value.data());
glUniformMatrix4x3dv(location, count, GL_FALSE, values[0].data());
}
void AbstractShaderProgram::uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 3, GLdouble>& value) {
glProgramUniformMatrix4x3dv(_id, location, 1, GL_FALSE, value.data());
void AbstractShaderProgram::uniformImplementationDSA(const GLint location, const GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* const values) {
glProgramUniformMatrix4x3dv(_id, location, count, GL_FALSE, values[0].data());
}
#endif

448
src/AbstractShaderProgram.h

@ -42,6 +42,18 @@ namespace Magnum {
#ifndef DOXYGEN_GENERATING_OUTPUT
namespace Implementation {
template<class> struct Attribute;
/* Used in setUniform(Int, const T&), otherwise it would not be possible to
pass enum values as uniforms */
struct NonEnumType {
template<class T> inline static typename std::enable_if<std::is_enum<T>::value, const typename std::conditional<std::is_convertible<T, UnsignedInt>::value, UnsignedInt, Int>::type&>::type cast(const T& value) {
return static_cast<const typename std::conditional<std::is_convertible<T, UnsignedInt>::value, UnsignedInt, Int>::type&>(value);
}
template<class T> inline static typename std::enable_if<!std::is_enum<T>::value, const T&>::type cast(const T& value) {
return value;
}
};
}
#endif
@ -279,8 +291,6 @@ setUniform() documentation for more information.
To achieve least state changes, set all uniforms in one run -- method chaining
comes in handy.
@todo Uniform arrays support
*/
class MAGNUM_EXPORT AbstractShaderProgram {
friend class Context;
@ -678,275 +688,289 @@ class MAGNUM_EXPORT AbstractShaderProgram {
/**
* @brief Set uniform value
* @param location Uniform location (see uniformLocation())
* @param location Uniform location
* @param value Value
*
* Convenience alternative for setting one value, see
* setUniform(Int, UnsignedInt, const Float*) for more information.
*/
template<class T> inline void setUniform(Int location, const T& value) {
setUniform(location, 1, &Implementation::NonEnumType::cast(value));
}
/**
* @brief Set uniform values
* @param location Uniform location
* @param count Value count
* @param values Values
*
* If neither @extension{ARB,separate_shader_objects} nor
* @extension{EXT,direct_state_access} is available, the shader is
* marked for use before the operation.
* @see @fn_gl{UseProgram}, @fn_gl{Uniform} or `glProgramUniform()`
* from @extension{ARB,separate_shader_objects}/@extension{EXT,direct_state_access}.
* @see setUniform(Int, const T&), @fn_gl{UseProgram}, @fn_gl{Uniform}
* or `glProgramUniform()` from
* @extension{ARB,separate_shader_objects}/@extension{EXT,direct_state_access}.
*/
inline void setUniform(Int location, Float value) {
(this->*uniform1fImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Float* values) {
(this->*uniform1fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<2, Float>& value) {
(this->*uniform2fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<2, Float>* values) {
(this->*uniform2fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<3, Float>& value) {
(this->*uniform3fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<3, Float>* values) {
(this->*uniform3fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<4, Float>& value) {
(this->*uniform4fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<4, Float>* values) {
(this->*uniform4fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, Int value) {
(this->*uniform1iImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Int* values) {
(this->*uniform1ivImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<2, Int>& value) {
(this->*uniform2ivImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<2, Int>* values) {
(this->*uniform2ivImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<3, Int>& value) {
(this->*uniform3ivImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<3, Int>* values) {
(this->*uniform3ivImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Vector<4, Int>& value) {
(this->*uniform4ivImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<4, Int>* values) {
(this->*uniform4ivImplementation)(location, count, values);
}
#ifndef MAGNUM_TARGET_GLES2
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl30 %Extension @extension{EXT,gpu_shader4}
* @requires_gles30 Only signed integers are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, UnsignedInt value) {
(this->*uniform1uiImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const UnsignedInt* values) {
(this->*uniform1uivImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl30 %Extension @extension{EXT,gpu_shader4}
* @requires_gles30 Only signed integers are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::Vector<2, UnsignedInt>& value) {
(this->*uniform2uivImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<2, UnsignedInt>* values) {
(this->*uniform2uivImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl30 %Extension @extension{EXT,gpu_shader4}
* @requires_gles30 Only signed integers are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::Vector<3, UnsignedInt>& value) {
(this->*uniform3uivImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<3, UnsignedInt>* values) {
(this->*uniform3uivImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl30 %Extension @extension{EXT,gpu_shader4}
* @requires_gles30 Only signed integers are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::Vector<4, UnsignedInt>& value) {
(this->*uniform4uivImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<4, UnsignedInt>* values) {
(this->*uniform4uivImplementation)(location, count, values);
}
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, Double value) {
(this->*uniform1dImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Double* values) {
(this->*uniform1dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Vector<2, Double>& value) {
(this->*uniform2dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<2, Double>* values) {
(this->*uniform2dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Vector<3, Double>& value) {
(this->*uniform3dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<3, Double>* values) {
(this->*uniform3dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Vector<4, Double>& value) {
(this->*uniform4dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::Vector<4, Double>* values) {
(this->*uniform4dvImplementation)(location, count, values);
}
#endif
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Matrix<2, Float>& value) {
(this->*uniformMatrix2fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 2, Float>* values) {
(this->*uniformMatrix2fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Matrix<3, Float>& value) {
(this->*uniformMatrix3fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 3, Float>* values) {
(this->*uniformMatrix3fvImplementation)(location, count, values);
}
/** @copydoc setUniform(Int, Float) */
inline void setUniform(Int location, const Math::Matrix<4, Float>& value) {
(this->*uniformMatrix4fvImplementation)(location, value);
/** @copydoc setUniform(Int, UnsignedInt, const Float*) */
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 4, Float>* values) {
(this->*uniformMatrix4fvImplementation)(location, count, values);
}
#ifndef MAGNUM_TARGET_GLES2
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<2, 3, Float>& value) {
(this->*uniformMatrix2x3fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 3, Float>* values) {
(this->*uniformMatrix2x3fvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<3, 2, Float>& value) {
(this->*uniformMatrix3x2fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 2, Float>* values) {
(this->*uniformMatrix3x2fvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<2, 4, Float>& value) {
(this->*uniformMatrix2x4fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 4, Float>* values) {
(this->*uniformMatrix2x4fvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<4, 2, Float>& value) {
(this->*uniformMatrix4x2fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 2, Float>* values) {
(this->*uniformMatrix4x2fvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<3, 4, Float>& value) {
(this->*uniformMatrix3x4fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 4, Float>* values) {
(this->*uniformMatrix3x4fvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gles30 Only square matrices are available in OpenGL ES 2.0.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<4, 3, Float>& value) {
(this->*uniformMatrix4x3fvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 3, Float>* values) {
(this->*uniformMatrix4x3fvImplementation)(location, count, values);
}
#endif
#ifndef MAGNUM_TARGET_GLES
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Matrix<2, Double>& value) {
(this->*uniformMatrix2dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 2, Double>* values) {
(this->*uniformMatrix2dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Matrix<3, Double>& value) {
(this->*uniformMatrix3dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 3, Double>* values) {
(this->*uniformMatrix3dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::Matrix<4, Double>& value) {
(this->*uniformMatrix4dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 4, Double>* values) {
(this->*uniformMatrix4dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<2, 3, Double>& value) {
(this->*uniformMatrix2x3dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 3, Double>* values) {
(this->*uniformMatrix2x3dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<3, 2, Double>& value) {
(this->*uniformMatrix3x2dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 2, Double>* values) {
(this->*uniformMatrix3x2dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<2, 4, Double>& value) {
(this->*uniformMatrix2x4dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<2, 4, Double>* values) {
(this->*uniformMatrix2x4dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<4, 2, Double>& value) {
(this->*uniformMatrix4x2dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 2, Double>* values) {
(this->*uniformMatrix4x2dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<3, 4, Double>& value) {
(this->*uniformMatrix3x4dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<3, 4, Double>* values) {
(this->*uniformMatrix3x4dvImplementation)(location, count, values);
}
/**
* @copydoc setUniform(Int, Float)
* @copydoc setUniform(Int, UnsignedInt, const Float*)
* @requires_gl40 %Extension @extension{ARB,gpu_shader_fp64}
* @requires_gl Only floats are available in OpenGL ES.
*/
inline void setUniform(Int location, const Math::RectangularMatrix<4, 3, Double>& value) {
(this->*uniformMatrix4x3dvImplementation)(location, value);
inline void setUniform(Int location, UnsignedInt count, const Math::RectangularMatrix<4, 3, Double>* values) {
(this->*uniformMatrix4x3dvImplementation)(location, count, values);
}
#endif
@ -959,144 +983,144 @@ class MAGNUM_EXPORT AbstractShaderProgram {
static void MAGNUM_LOCAL initializeContextBasedFunctionality(Context* context);
typedef void(AbstractShaderProgram::*Uniform1fImplementation)(GLint, GLfloat);
typedef void(AbstractShaderProgram::*Uniform2fvImplementation)(GLint, const Math::Vector<2, GLfloat>&);
typedef void(AbstractShaderProgram::*Uniform3fvImplementation)(GLint, const Math::Vector<3, GLfloat>&);
typedef void(AbstractShaderProgram::*Uniform4fvImplementation)(GLint, const Math::Vector<4, GLfloat>&);
typedef void(AbstractShaderProgram::*Uniform1iImplementation)(GLint, GLint);
typedef void(AbstractShaderProgram::*Uniform2ivImplementation)(GLint, const Math::Vector<2, GLint>&);
typedef void(AbstractShaderProgram::*Uniform3ivImplementation)(GLint, const Math::Vector<3, GLint>&);
typedef void(AbstractShaderProgram::*Uniform4ivImplementation)(GLint, const Math::Vector<4, GLint>&);
typedef void(AbstractShaderProgram::*Uniform1fvImplementation)(GLint, GLsizei, const GLfloat*);
typedef void(AbstractShaderProgram::*Uniform2fvImplementation)(GLint, GLsizei, const Math::Vector<2, GLfloat>*);
typedef void(AbstractShaderProgram::*Uniform3fvImplementation)(GLint, GLsizei, const Math::Vector<3, GLfloat>*);
typedef void(AbstractShaderProgram::*Uniform4fvImplementation)(GLint, GLsizei, const Math::Vector<4, GLfloat>*);
typedef void(AbstractShaderProgram::*Uniform1ivImplementation)(GLint, GLsizei, const GLint*);
typedef void(AbstractShaderProgram::*Uniform2ivImplementation)(GLint, GLsizei, const Math::Vector<2, GLint>*);
typedef void(AbstractShaderProgram::*Uniform3ivImplementation)(GLint, GLsizei, const Math::Vector<3, GLint>*);
typedef void(AbstractShaderProgram::*Uniform4ivImplementation)(GLint, GLsizei, const Math::Vector<4, GLint>*);
#ifndef MAGNUM_TARGET_GLES2
typedef void(AbstractShaderProgram::*Uniform1uiImplementation)(GLint, GLuint);
typedef void(AbstractShaderProgram::*Uniform2uivImplementation)(GLint, const Math::Vector<2, GLuint>&);
typedef void(AbstractShaderProgram::*Uniform3uivImplementation)(GLint, const Math::Vector<3, GLuint>&);
typedef void(AbstractShaderProgram::*Uniform4uivImplementation)(GLint, const Math::Vector<4, GLuint>&);
typedef void(AbstractShaderProgram::*Uniform1uivImplementation)(GLint, GLsizei, const GLuint*);
typedef void(AbstractShaderProgram::*Uniform2uivImplementation)(GLint, GLsizei, const Math::Vector<2, GLuint>*);
typedef void(AbstractShaderProgram::*Uniform3uivImplementation)(GLint, GLsizei, const Math::Vector<3, GLuint>*);
typedef void(AbstractShaderProgram::*Uniform4uivImplementation)(GLint, GLsizei, const Math::Vector<4, GLuint>*);
#endif
#ifndef MAGNUM_TARGET_GLES
typedef void(AbstractShaderProgram::*Uniform1dImplementation)(GLint, GLdouble);
typedef void(AbstractShaderProgram::*Uniform2dvImplementation)(GLint, const Math::Vector<2, GLdouble>&);
typedef void(AbstractShaderProgram::*Uniform3dvImplementation)(GLint, const Math::Vector<3, GLdouble>&);
typedef void(AbstractShaderProgram::*Uniform4dvImplementation)(GLint, const Math::Vector<4, GLdouble>&);
typedef void(AbstractShaderProgram::*Uniform1dvImplementation)(GLint, GLsizei, const GLdouble*);
typedef void(AbstractShaderProgram::*Uniform2dvImplementation)(GLint, GLsizei, const Math::Vector<2, GLdouble>*);
typedef void(AbstractShaderProgram::*Uniform3dvImplementation)(GLint, GLsizei, const Math::Vector<3, GLdouble>*);
typedef void(AbstractShaderProgram::*Uniform4dvImplementation)(GLint, GLsizei, const Math::Vector<4, GLdouble>*);
#endif
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLfloat value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLint value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<2, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<3, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<4, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const GLfloat* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const GLint* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<2, GLint>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<3, GLint>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<4, GLint>* values);
#ifndef MAGNUM_TARGET_GLES2
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLuint value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<2, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<3, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<4, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const GLuint* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<2, GLuint>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<3, GLuint>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<4, GLuint>* values);
#endif
#ifndef MAGNUM_TARGET_GLES
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLdouble value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Vector<4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLfloat value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLint value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<2, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<3, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<4, GLint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLuint value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<2, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<3, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<4, GLuint>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLdouble value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Vector<4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const GLdouble* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::Vector<4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const GLfloat* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const GLint* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<2, GLint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<3, GLint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<4, GLint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const GLuint* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<2, GLuint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<3, GLuint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<4, GLuint>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const GLdouble* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::Vector<4, GLdouble>* values);
#endif
static Uniform1fImplementation uniform1fImplementation;
static Uniform1fvImplementation uniform1fvImplementation;
static Uniform2fvImplementation uniform2fvImplementation;
static Uniform3fvImplementation uniform3fvImplementation;
static Uniform4fvImplementation uniform4fvImplementation;
static Uniform1iImplementation uniform1iImplementation;
static Uniform1ivImplementation uniform1ivImplementation;
static Uniform2ivImplementation uniform2ivImplementation;
static Uniform3ivImplementation uniform3ivImplementation;
static Uniform4ivImplementation uniform4ivImplementation;
#ifndef MAGNUM_TARGET_GLES2
static Uniform1uiImplementation uniform1uiImplementation;
static Uniform1uivImplementation uniform1uivImplementation;
static Uniform2uivImplementation uniform2uivImplementation;
static Uniform3uivImplementation uniform3uivImplementation;
static Uniform4uivImplementation uniform4uivImplementation;
#endif
#ifndef MAGNUM_TARGET_GLES
static Uniform1dImplementation uniform1dImplementation;
static Uniform1dvImplementation uniform1dvImplementation;
static Uniform2dvImplementation uniform2dvImplementation;
static Uniform3dvImplementation uniform3dvImplementation;
static Uniform4dvImplementation uniform4dvImplementation;
#endif
typedef void(AbstractShaderProgram::*UniformMatrix2fvImplementation)(GLint, const Math::Matrix<2, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix3fvImplementation)(GLint, const Math::Matrix<3, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix4fvImplementation)(GLint, const Math::Matrix<4, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix2fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 2, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix3fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 3, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix4fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 4, GLfloat>*);
#ifndef MAGNUM_TARGET_GLES2
typedef void(AbstractShaderProgram::*UniformMatrix2x3fvImplementation)(GLint, const Math::RectangularMatrix<2, 3, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix3x2fvImplementation)(GLint, const Math::RectangularMatrix<3, 2, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix2x4fvImplementation)(GLint, const Math::RectangularMatrix<2, 4, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix4x2fvImplementation)(GLint, const Math::RectangularMatrix<4, 2, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix3x4fvImplementation)(GLint, const Math::RectangularMatrix<3, 4, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix4x3fvImplementation)(GLint, const Math::RectangularMatrix<4, 3, GLfloat>&);
typedef void(AbstractShaderProgram::*UniformMatrix2x3fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 3, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix3x2fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 2, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix2x4fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 4, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix4x2fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 2, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix3x4fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 4, GLfloat>*);
typedef void(AbstractShaderProgram::*UniformMatrix4x3fvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 3, GLfloat>*);
#endif
#ifndef MAGNUM_TARGET_GLES
typedef void(AbstractShaderProgram::*UniformMatrix2dvImplementation)(GLint, const Math::Matrix<2, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix3dvImplementation)(GLint, const Math::Matrix<3, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix4dvImplementation)(GLint, const Math::Matrix<4, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix2x3dvImplementation)(GLint, const Math::RectangularMatrix<2, 3, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix3x2dvImplementation)(GLint, const Math::RectangularMatrix<3, 2, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix2x4dvImplementation)(GLint, const Math::RectangularMatrix<2, 4, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix4x2dvImplementation)(GLint, const Math::RectangularMatrix<4, 2, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix3x4dvImplementation)(GLint, const Math::RectangularMatrix<3, 4, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix4x3dvImplementation)(GLint, const Math::RectangularMatrix<4, 3, GLdouble>&);
typedef void(AbstractShaderProgram::*UniformMatrix2dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 2, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix3dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 3, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix4dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 4, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix2x3dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 3, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix3x2dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 2, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix2x4dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<2, 4, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix4x2dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 2, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix3x4dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<3, 4, GLdouble>*);
typedef void(AbstractShaderProgram::*UniformMatrix4x3dvImplementation)(GLint, GLsizei, const Math::RectangularMatrix<4, 3, GLdouble>*);
#endif
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* values);
#ifndef MAGNUM_TARGET_GLES2
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* values);
#endif
#ifndef MAGNUM_TARGET_GLES
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::Matrix<4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<2, 4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<3, 4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, const Math::RectangularMatrix<4, 3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 2, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 4, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 3, GLfloat>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::Matrix<4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<2, 4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 2, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<3, 4, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, const Math::RectangularMatrix<4, 3, GLdouble>& value);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDefault(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLfloat>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 3, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<2, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 2, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<3, 4, GLdouble>* values);
void MAGNUM_LOCAL uniformImplementationDSA(GLint location, GLsizei count, const Math::RectangularMatrix<4, 3, GLdouble>* values);
#endif
static UniformMatrix2fvImplementation uniformMatrix2fvImplementation;
static UniformMatrix3fvImplementation uniformMatrix3fvImplementation;

Loading…
Cancel
Save