1
0

Merging r6488 through r6491 from trunk to ogl-es branch

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6492 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2023-05-13 12:25:10 +00:00
parent 1670db617b
commit 1de0ec5459
14 changed files with 90 additions and 31 deletions

View File

@@ -573,10 +573,14 @@ void COpenGLSLMaterialRenderer::startUseProgram()
void COpenGLSLMaterialRenderer::stopUseProgram()
{
// Not going to reset irrGlUseProgram/extGlUseProgramObject as it shouldn't really matter
// Necessary as fixed function pipeline breaks if programs are not reset to 0
if (Program)
Driver->extGlUseProgramObject(0);
if (Program2)
Driver->irrGlUseProgram(0);
// Force reset of material to ensure OnSetMaterial will be called or we can miss
// the next UseProgram call
// the next UseProgram call as stopUseProgram can be called from anywhere
Driver->DoResetRenderStates();
}