little fx to solve issue 2897
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5839 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
f3901b6b43
commit
19cdaaae89
|
@ -315,7 +315,6 @@ bool PixelShaderCache::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrpr
|
||||||
//Disable Fragment programs and reset the selected Program
|
//Disable Fragment programs and reset the selected Program
|
||||||
void PixelShaderCache::DisableShader()
|
void PixelShaderCache::DisableShader()
|
||||||
{
|
{
|
||||||
CurrentShader = 0;
|
|
||||||
if(ShaderEnabled)
|
if(ShaderEnabled)
|
||||||
{
|
{
|
||||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||||
|
@ -331,11 +330,11 @@ void PixelShaderCache::SetCurrentShader(GLuint Shader)
|
||||||
{
|
{
|
||||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||||
ShaderEnabled = true;
|
ShaderEnabled = true;
|
||||||
CurrentShader = 0;
|
|
||||||
}
|
}
|
||||||
if(CurrentShader != Shader)
|
if(CurrentShader != Shader)
|
||||||
{
|
{
|
||||||
CurrentShader = Shader;
|
if(Shader != 0)
|
||||||
|
CurrentShader = Shader;
|
||||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -596,8 +596,8 @@ void Renderer::RestoreAPIState()
|
||||||
SetColorMask();
|
SetColorMask();
|
||||||
SetBlendMode(true);
|
SetBlendMode(true);
|
||||||
|
|
||||||
VertexShaderCache::SetCurrentShader(1);
|
VertexShaderCache::SetCurrentShader(0);
|
||||||
PixelShaderCache::SetCurrentShader(1);
|
PixelShaderCache::SetCurrentShader(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Renderer::SetColorMask()
|
void Renderer::SetColorMask()
|
||||||
|
|
|
@ -238,7 +238,6 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
||||||
|
|
||||||
void VertexShaderCache::DisableShader()
|
void VertexShaderCache::DisableShader()
|
||||||
{
|
{
|
||||||
CurrentShader = 0;
|
|
||||||
if (ShaderEnabled)
|
if (ShaderEnabled)
|
||||||
{
|
{
|
||||||
glDisable(GL_VERTEX_PROGRAM_ARB);
|
glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||||
|
@ -252,12 +251,12 @@ void VertexShaderCache::SetCurrentShader(GLuint Shader)
|
||||||
if (!ShaderEnabled)
|
if (!ShaderEnabled)
|
||||||
{
|
{
|
||||||
glEnable(GL_VERTEX_PROGRAM_ARB);
|
glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||||
ShaderEnabled= true;
|
ShaderEnabled= true;
|
||||||
CurrentShader = 0;
|
|
||||||
}
|
}
|
||||||
if (CurrentShader != Shader)
|
if (CurrentShader != Shader)
|
||||||
{
|
{
|
||||||
CurrentShader = Shader;
|
if(Shader != 0)
|
||||||
|
CurrentShader = Shader;
|
||||||
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, CurrentShader);
|
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, CurrentShader);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue