mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 00:10:40 +00:00
precalculate smoe model specific info (wether the whole model is fullbright,
if it should have shadows, whether it should be scaled/translated (gl eyes), and the minimum lighting (player)). give a 1.9% speedup in null renderer.
This commit is contained in:
parent
b69e372589
commit
5dab7ccaf7
8 changed files with 63 additions and 40 deletions
|
@ -48,6 +48,8 @@ static const char rcsid[] =
|
|||
#include "QF/sys.h"
|
||||
#include "QF/vfs.h"
|
||||
|
||||
#include "compat.h"
|
||||
|
||||
void Mod_LoadAliasModel (model_t *mod, void *buf, cache_allocator_t allocator);
|
||||
void Mod_LoadSpriteModel (model_t *mod, void *buf);
|
||||
void Mod_LoadBrushModel (model_t *mod, void *buf);
|
||||
|
@ -189,6 +191,23 @@ Mod_RealLoadModel (model_t *mod, qboolean crash, cache_allocator_t allocator)
|
|||
loadmodel = mod;
|
||||
|
||||
// fill it in
|
||||
if (strequal (mod->name, "progs/grenade.mdl")) {
|
||||
mod->shadow_alpha = 0;
|
||||
} else {
|
||||
mod->shadow_alpha = 255;
|
||||
}
|
||||
if (strnequal (mod->name, "progs/flame", 11)
|
||||
|| strnequal (mod->name, "progs/bolt", 10)) {
|
||||
mod->fullbright = 1;
|
||||
mod->shadow_alpha = 0;
|
||||
} else {
|
||||
mod->fullbright = 0;
|
||||
}
|
||||
if (strequal (mod->name, "progs/player.mdl")) {
|
||||
mod->min_light = 8;
|
||||
} else {
|
||||
mod->min_light = 0;
|
||||
}
|
||||
|
||||
// call the apropriate loader
|
||||
mod->needload = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue