Enabling the uniform mappings

This commit is contained in:
samcake 2016-10-28 10:47:06 -07:00
parent 403bba9035
commit d66d5af688
2 changed files with 4 additions and 3 deletions

View file

@ -196,7 +196,8 @@ bool GLShader::makeProgram(GLBackend& backend, Shader& shader, const Shader::Bin
// Define the public slots only from the default version
if (version == 0) {
shader.defineSlots(uniforms, buffers, textures, samplers, inputs, outputs);
} else {
} // else
{
GLShader::UniformMapping mapping;
for (auto srcUniform : shader.getUniforms()) {
mapping[srcUniform._location] = uniforms.findLocation(srcUniform._name);

View file

@ -42,8 +42,8 @@ public:
GLint getUniformLocation(GLint srcLoc, Version version = Mono) {
// THIS will be used in the future PR as we grow the number of versions
// return _uniformMappings[version][srcLoc];
return srcLoc;
return _uniformMappings[version][srcLoc];
// return srcLoc;
}
const std::weak_ptr<GLBackend> _backend;