mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +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) {
|
||||
targa = LoadTGA (f);
|
||||
Qclose (f);
|
||||
if (targa->format < 4) {
|
||||
tx->gl_texturenum =
|
||||
GL_LoadTexture (tx->name, targa->width, targa->height,
|
||||
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