mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
use the correct bytes per pixel count
This commit is contained in:
parent
d0aaa5263b
commit
ff43d61f81
1 changed files with 9 additions and 3 deletions
|
@ -117,9 +117,15 @@ Mod_LoadExternalTextures (model_t *mod)
|
||||||
if (f) {
|
if (f) {
|
||||||
targa = LoadTGA (f);
|
targa = LoadTGA (f);
|
||||||
Qclose (f);
|
Qclose (f);
|
||||||
|
if (targa->format < 4) {
|
||||||
tx->gl_texturenum =
|
tx->gl_texturenum =
|
||||||
GL_LoadTexture (tx->name, targa->width, targa->height,
|
GL_LoadTexture (tx->name, targa->width, targa->height,
|
||||||
targa->data, true, false, 3);
|
targa->data, true, false, 3);
|
||||||
|
} else {
|
||||||
|
tx->gl_texturenum =
|
||||||
|
GL_LoadTexture (tx->name, targa->width, targa->height,
|
||||||
|
targa->data, true, false, 4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue