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
|
||||
void PixelShaderCache::DisableShader()
|
||||
{
|
||||
CurrentShader = 0;
|
||||
if(ShaderEnabled)
|
||||
{
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
|
@ -331,11 +330,11 @@ void PixelShaderCache::SetCurrentShader(GLuint Shader)
|
|||
{
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
ShaderEnabled = true;
|
||||
CurrentShader = 0;
|
||||
}
|
||||
if(CurrentShader != Shader)
|
||||
{
|
||||
CurrentShader = Shader;
|
||||
if(Shader != 0)
|
||||
CurrentShader = Shader;
|
||||
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, CurrentShader);
|
||||
}
|
||||
}
|
|
@ -596,8 +596,8 @@ void Renderer::RestoreAPIState()
|
|||
SetColorMask();
|
||||
SetBlendMode(true);
|
||||
|
||||
VertexShaderCache::SetCurrentShader(1);
|
||||
PixelShaderCache::SetCurrentShader(1);
|
||||
VertexShaderCache::SetCurrentShader(0);
|
||||
PixelShaderCache::SetCurrentShader(0);
|
||||
}
|
||||
|
||||
void Renderer::SetColorMask()
|
||||
|
|
|
@ -238,7 +238,6 @@ bool VertexShaderCache::CompileVertexShader(VERTEXSHADER& vs, const char* pstrpr
|
|||
|
||||
void VertexShaderCache::DisableShader()
|
||||
{
|
||||
CurrentShader = 0;
|
||||
if (ShaderEnabled)
|
||||
{
|
||||
glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
|
@ -253,11 +252,11 @@ void VertexShaderCache::SetCurrentShader(GLuint Shader)
|
|||
{
|
||||
glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||
ShaderEnabled= true;
|
||||
CurrentShader = 0;
|
||||
}
|
||||
if (CurrentShader != Shader)
|
||||
{
|
||||
CurrentShader = Shader;
|
||||
if(Shader != 0)
|
||||
CurrentShader = Shader;
|
||||
glBindProgramARB(GL_VERTEX_PROGRAM_ARB, CurrentShader);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue