Disable and delete the fragment program if it fails to compile.

svn path=/branches/KDE/4.6/kdebase/workspace/; revision=1215777
This commit is contained in:
Fredrik Höglund 2011-01-19 16:40:37 +00:00 committed by Martin Gräßlin
parent 8bc99e68c0
commit 1a5b3b4bea

View file

@ -708,6 +708,10 @@ bool LanczosShader::init()
{
const char *error = (const char*)glGetString(GL_PROGRAM_ERROR_STRING_ARB);
kError() << "Failed to compile fragment program:" << error;
glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
glDeleteProgramsARB(1, &m_arbProgram);
glDisable(GL_FRAGMENT_PROGRAM_ARB);
m_arbProgram = 0;
return false;
}