From 0b2685bb4bdedbe41940a4e626d32ba1d4274907 Mon Sep 17 00:00:00 2001 From: Artem Kharytoniuk Date: Mon, 20 Mar 2017 21:21:55 +0200 Subject: [PATCH] Removed image_t::TMU. --- src/engine/renderer/tr_image.c | 17 +++++------------ src/engine/renderer/tr_local.h | 1 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/engine/renderer/tr_image.c b/src/engine/renderer/tr_image.c index d422bd2..3dee54a 100644 --- a/src/engine/renderer/tr_image.c +++ b/src/engine/renderer/tr_image.c @@ -178,15 +178,15 @@ void R_ImageList_f( void ) { "no ", "yes" }; - ri.Printf (PRINT_ALL, "\n -w-- -h-- -mm- -TMU- -if-- wrap --name-------\n"); + ri.Printf (PRINT_ALL, "\n -w-- -h-- -mm- -if-- wrap --name-------\n"); texels = 0; for ( i = 0 ; i < tr.numImages ; i++ ) { image = tr.images[ i ]; texels += image->uploadWidth*image->uploadHeight; - ri.Printf (PRINT_ALL, "%4i: %4i %4i %s %d ", - i, image->uploadWidth, image->uploadHeight, yesno[image->mipmap], image->TMU ); + ri.Printf (PRINT_ALL, "%4i: %4i %4i %s ", + i, image->uploadWidth, image->uploadHeight, yesno[image->mipmap] ); switch ( image->internalFormat ) { case 1: ri.Printf( PRINT_ALL, "I " ); @@ -763,14 +763,7 @@ image_t *R_CreateImage( const char *name, const byte *pic, int width, int height image->height = height; image->wrapClampMode = glWrapClampMode; - // lightmaps are always allocated on TMU 1 - if (isLightmap) { - image->TMU = 1; - } else { - image->TMU = 0; - } - - GL_SelectTexture(image->TMU); + GL_SelectTexture(isLightmap ? 1 : 0); GL_Bind(image); Upload32( (unsigned *)pic, image->width, image->height, @@ -786,7 +779,7 @@ image_t *R_CreateImage( const char *name, const byte *pic, int width, int height qglBindTexture( GL_TEXTURE_2D, 0 ); - if ( image->TMU == 1 ) { + if (isLightmap) { GL_SelectTexture( 0 ); } diff --git a/src/engine/renderer/tr_local.h b/src/engine/renderer/tr_local.h index a93754d..08e2faf 100644 --- a/src/engine/renderer/tr_local.h +++ b/src/engine/renderer/tr_local.h @@ -99,7 +99,6 @@ typedef struct image_s { int frameUsed; // for texture usage in frame statistics int internalFormat; - int TMU; // only needed for voodoo2 qboolean mipmap; qboolean allowPicmip;