OGL: Fix brace and body placements

Also got rid of void argument specifiers. These are a carryover from C.
This commit is contained in:
Lioncash
2014-08-15 14:09:53 -04:00
parent d5d5580424
commit 960b54670c
16 changed files with 221 additions and 90 deletions

View File

@ -164,24 +164,28 @@ void OpenGLPostProcessing::Update(u32 width, u32 height)
void OpenGLPostProcessing::ApplyShader()
{
// shader didn't changed
if (m_config.GetShader() == g_ActiveConfig.sPostProcessingShader) return;
if (m_config.GetShader() == g_ActiveConfig.sPostProcessingShader)
return;
m_enable = false;
m_shader.Destroy();
m_uniform_bindings.clear();
// shader disabled
if (g_ActiveConfig.sPostProcessingShader == "") return;
if (g_ActiveConfig.sPostProcessingShader == "")
return;
// so need to compile shader
std::string code = m_config.LoadShader();
if (code == "") return;
if (code == "")
return;
code = LoadShaderOptions(code);
// and compile it
if (!ProgramShaderCache::CompileShader(m_shader, s_vertex_shader, code.c_str())) {
if (!ProgramShaderCache::CompileShader(m_shader, s_vertex_shader, code.c_str()))
{
ERROR_LOG(VIDEO, "Failed to compile post-processing shader %s", m_config.GetShader().c_str());
return;
}