Skip to content

Commit

Permalink
R
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Nov 17, 2024
1 parent c4f4ae6 commit 72a7a8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions irr/src/COpenGLCoreCacheHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ class COpenGLCoreCacheHandler
// The "enable/disable texture" stuff is so legacy that
// it's not even allowed for multisample textures.
// (IRR_COMPILE_GL_COMMON is for the legacy driver.)
if ((prevTexture ? prevTexture : curTexture)->getType() != ETT_2D_MS)
if (prevTextureType != GL_TEXTURE_2D_MULTISAMPLE)
GL.Disable(prevTextureType);
if (curTexture->getType() != ETT_2D_MS)
if (curTextureType != GL_TEXTURE_2D_MULTISAMPLE)
GL.Enable(curTextureType);
#endif
}
#if defined(IRR_COMPILE_GL_COMMON)
else if (!prevTexture)
if (curTexture->getType() != ETT_2D_MS)
if (curTextureType != GL_TEXTURE_2D_MULTISAMPLE)
GL.Enable(curTextureType);
#endif

Expand All @@ -116,7 +116,7 @@ class COpenGLCoreCacheHandler
GL.BindTexture(prevTextureType, 0);

#if defined(IRR_COMPILE_GL_COMMON)
if (prevTexture->getType() != ETT_2D_MS)
if (prevTextureType != GL_TEXTURE_2D_MULTISAMPLE)
GL.Disable(prevTextureType);
#endif
}
Expand Down

0 comments on commit 72a7a8d

Please sign in to comment.