Try another (dirty) fix.

This commit is contained in:
vlj
2014-07-13 01:30:00 +02:00
parent 6d643d973c
commit cc24407f09
2 changed files with 8 additions and 2 deletions

View File

@@ -464,6 +464,11 @@ AssignUniforms(GLuint Program, std::vector<GLuint> &uniforms, const std::vector<
}
}
void glUniformMatrix4fvWraper(GLuint a, size_t b, unsigned c, const float *d)
{
glUniformMatrix4fv(a, b, c, d);
}
namespace MeshShader
{

View File

@@ -20,7 +20,6 @@
#include <IShaderConstantSetCallBack.h>
#include <IMeshSceneNode.h>
#include <vector>
#include "glwrap.hpp"
typedef unsigned int GLuint;
using namespace irr;
@@ -53,13 +52,15 @@ void setUniformsHelper(const std::vector<GLuint> &uniforms)
{
}
void glUniformMatrix4fvWraper(GLuint, size_t, unsigned, const float *mat);
template<unsigned N = 0, typename... Args>
void setUniformsHelper(const std::vector<GLuint> &uniforms, const core::matrix4 &mat, Args... arg)
{
#ifndef GL_FALSE
#define GL_FALSE 0
#endif
glUniformMatrix4fv(uniforms[N], 1, GL_FALSE, mat.pointer());
glUniformMatrix4fvWraper(uniforms[N], 1, GL_FALSE, mat.pointer());
setUniformsHelper<N + 1>(uniforms, arg...);
}