Skip to content

Commit b2ab630

Browse files
committed
Remove useless loop calling GL_TextureMode
GL_TextureMode() does not interact with the bound texture unit. Also clear modified flag there to avoid uselessly updating all the images in the first frame.
1 parent 8389127 commit b2ab630

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/engine/renderer/tr_init.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -830,18 +830,8 @@ ScreenshotCmd screenshotPNGRegistration("screenshotPNG", ssFormat_t::SSF_PNG, "p
830830

831831
tr.currenttextures.resize( glConfig2.maxTextureUnits );
832832

833-
// initialize downstream texture units if we're running
834-
// in a multitexture environment
835-
if ( glConfig.driverType == glDriverType_t::GLDRV_OPENGL3 )
836-
{
837-
for ( int i = 0; i < glConfig2.maxTextureUnits; i++ )
838-
{
839-
GL_SelectTexture( i );
840-
GL_TextureMode( r_textureMode->string );
841-
}
842-
}
843-
844-
GL_CheckErrors();
833+
GL_TextureMode( r_textureMode->string );
834+
r_textureMode->modified = false;
845835

846836
GL_DepthFunc( GL_LEQUAL );
847837

0 commit comments

Comments
 (0)