[gl] Remove some more warts

seeing ptexels and pixels together is very confusing
This commit is contained in:
Bill Currie 2021-03-10 21:15:53 +09:00
parent 5949753579
commit 62cce7f98c

View file

@ -43,29 +43,28 @@
int
Mod_Fullbright (byte *skin, int width, int height, const char *name)
{
byte *ptexels;
byte *texels;
int pixels;
int texnum = 0;
pixels = width * height;
// ptexels = Hunk_Alloc(s);
ptexels = malloc (pixels);
SYS_CHECKMEM (ptexels);
texels = malloc (pixels);
SYS_CHECKMEM (texels);
// Check for fullbright pixels
if (Mod_CalcFullbright (skin, ptexels, pixels)) {
if (Mod_CalcFullbright (skin, texels, pixels)) {
//FIXME black should be transparent for fullbrights (or just fix
//fullbright rendering in gl)
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
for (int i = 0; i < pixels; i++) {
if (!ptexels[i]) {
ptexels[i] = 255;
if (!texels[i]) {
texels[i] = 255;
}
}
Sys_MaskPrintf (SYS_DEV, "FB Model ID: '%s'\n", name);
texnum = GL_LoadTexture (name, width, height, ptexels, true, true, 1);
texnum = GL_LoadTexture (name, width, height, texels, true, true, 1);
}
free (ptexels);
free (texels);
return texnum;
}