Fixed shader and program cleanup.

This commit is contained in:
bkaradzic
2013-10-03 20:39:55 -07:00
parent 557c175e61
commit 25917d1cac
2 changed files with 18 additions and 4 deletions

View File

@@ -1071,8 +1071,12 @@ namespace bgfx
}
m_numPredefined = 0;
GL_CHECK(glUseProgram(0) );
GL_CHECK(glDeleteProgram(m_id) );
if (0 != m_id)
{
GL_CHECK(glUseProgram(0) );
GL_CHECK(glDeleteProgram(m_id) );
m_id = 0;
}
m_vcref.invalidate(s_renderCtx->m_vaoStateCache);
}