use the correct bytes per pixel count

This commit is contained in:
Bill Currie 2003-09-04 16:26:14 +00:00
parent d0aaa5263b
commit ff43d61f81
1 changed files with 9 additions and 3 deletions

View File

@ -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);
}
}
}
}