- it looks like glProgramUniform is not working correctly with Intel drivers, so better forget about it for setting the view and projection matrices. Even on NVidia the time difference can only be measured in microseconds per frame so it's not a big loss.

This commit is contained in:
Christoph Oelckers 2014-08-02 11:57:42 +02:00
commit b2860a1d63
3 changed files with 4 additions and 16 deletions

View file

@ -299,18 +299,9 @@ FShader *FShaderManager::Compile (const char *ShaderName, const char *ShaderPath
void FShader::ApplyMatrices(VSMatrix *proj, VSMatrix *view)
{
if (gl.flags & RFL_SEPARATE_SHADER_OBJECTS) // this check is just for safety. All supported hardware reports this extension as being present.
{
glProgramUniformMatrix4fv(hShader, projectionmatrix_index, 1, false, proj->get());
glProgramUniformMatrix4fv(hShader, viewmatrix_index, 1, false, view->get());
}
else
{
Bind();
glUniformMatrix4fv(projectionmatrix_index, 1, false, proj->get());
glUniformMatrix4fv(viewmatrix_index, 1, false, view->get());
}
Bind();
glUniformMatrix4fv(projectionmatrix_index, 1, false, proj->get());
glUniformMatrix4fv(viewmatrix_index, 1, false, view->get());
}