mirror of
https://github.com/libretro/libretro-tyrquake.git
synced 2025-04-01 10:11:49 +00:00
Remove unneeded alpha parameter to GL_Upload8_EXT
This commit is contained in:
parent
2ee8c94948
commit
1bb07a24a0
@ -319,8 +319,8 @@ R_TranslatePlayerSkin(int playernum)
|
||||
|
||||
|
||||
// don't mipmap these, because it takes too long
|
||||
GL_Upload8(translated, paliashdr->skinwidth, paliashdr->skinheight,
|
||||
false, false, true);
|
||||
GL_Upload8(translated, paliashdr->skinwidth, paliashdr->skinheight, false,
|
||||
true);
|
||||
#else
|
||||
// allow users to crunch sizes down
|
||||
scaled_width = 512 >> (int)gl_playermip.value;
|
||||
@ -353,8 +353,7 @@ R_TranslatePlayerSkin(int playernum)
|
||||
}
|
||||
}
|
||||
|
||||
GL_Upload8_EXT((byte *)pixels, scaled_width, scaled_height, false,
|
||||
false);
|
||||
GL_Upload8_EXT((byte *)pixels, scaled_width, scaled_height, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -367,8 +367,7 @@ R_TranslatePlayerSkin(int playernum)
|
||||
}
|
||||
}
|
||||
|
||||
GL_Upload8_EXT((byte *)pixels, scaled_width, scaled_height,
|
||||
false, false);
|
||||
GL_Upload8_EXT((byte *)pixels, scaled_width, scaled_height, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1200,28 +1200,12 @@ GL_Upload32(const unsigned *data, int width, int height, qboolean mipmap,
|
||||
}
|
||||
|
||||
void
|
||||
GL_Upload8_EXT(const byte *data, int width, int height, qboolean mipmap,
|
||||
qboolean alpha)
|
||||
GL_Upload8_EXT(const byte *data, int width, int height, qboolean mipmap)
|
||||
{
|
||||
int i, s;
|
||||
qboolean noalpha;
|
||||
int samples;
|
||||
int i;
|
||||
static unsigned char scaled[1024 * 512]; // [512*256];
|
||||
int scaled_width, scaled_height;
|
||||
|
||||
s = width * height;
|
||||
// if there are no transparent pixels, make it a 3 component
|
||||
// texture even if it was specified as otherwise
|
||||
if (alpha) {
|
||||
noalpha = true;
|
||||
for (i = 0; i < s; i++) {
|
||||
if (data[i] == 255)
|
||||
noalpha = false;
|
||||
}
|
||||
|
||||
if (alpha && noalpha)
|
||||
alpha = false;
|
||||
}
|
||||
for (scaled_width = 1; scaled_width < width; scaled_width <<= 1);
|
||||
for (scaled_height = 1; scaled_height < height; scaled_height <<= 1);
|
||||
|
||||
@ -1236,8 +1220,6 @@ GL_Upload8_EXT(const byte *data, int width, int height, qboolean mipmap,
|
||||
if (scaled_width * scaled_height > sizeof(scaled))
|
||||
Sys_Error("%s: too big", __func__);
|
||||
|
||||
samples = 1; // alpha ? gl_alpha_format : gl_solid_format;
|
||||
|
||||
texels += scaled_width * scaled_height;
|
||||
|
||||
if (scaled_width == width && scaled_height == height) {
|
||||
@ -1323,7 +1305,7 @@ GL_Upload8(const byte *data, int width, int height, qboolean mipmap,
|
||||
}
|
||||
|
||||
if (VID_Is8bit() && !alpha && (data != scrap_texels[0])) {
|
||||
GL_Upload8_EXT(data, width, height, mipmap, alpha);
|
||||
GL_Upload8_EXT(data, width, height, mipmap);
|
||||
return;
|
||||
}
|
||||
GL_Upload32(trans, width, height, mipmap, alpha);
|
||||
|
@ -80,8 +80,7 @@ void GL_Upload32(const unsigned *data, int width, int height,
|
||||
qboolean mipmap, qboolean alpha);
|
||||
void GL_Upload8(const byte *data, int width, int height,
|
||||
qboolean mipmap, qboolean alpha);
|
||||
void GL_Upload8_EXT(const byte *data, int width, int height,
|
||||
qboolean mipmap, qboolean alpha);
|
||||
void GL_Upload8_EXT(const byte *data, int width, int height, qboolean mipmap);
|
||||
int GL_LoadTexture(const char *identifier, int width, int height,
|
||||
const byte *data, qboolean mipmap, qboolean alpha);
|
||||
int GL_FindTexture(const char *identifier);
|
||||
|
Loading…
x
Reference in New Issue
Block a user