Removed image_t::TMU.

This commit is contained in:
Artem Kharytoniuk 2017-03-20 21:21:55 +02:00
parent 26dda0aa5e
commit 0b2685bb4b
2 changed files with 5 additions and 13 deletions

View File

@ -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 );
}

View File

@ -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;