mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
[gl] Remove some more warts
seeing ptexels and pixels together is very confusing
This commit is contained in:
parent
5949753579
commit
62cce7f98c
1 changed files with 9 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue