else if (prepass)
RSurf_ActiveModelEntity(ent, true, true, true);
else if (depthonly)
- RSurf_ActiveModelEntity(ent, false, false, false);
+ {
+ switch (vid.renderpath)
+ {
+ case RENDERPATH_GL20:
+ case RENDERPATH_CGGL:
+ RSurf_ActiveModelEntity(ent, model->wantnormals, model->wanttangents, false);
+ break;
+ case RENDERPATH_GL13:
+ case RENDERPATH_GL11:
+ RSurf_ActiveModelEntity(ent, model->wantnormals, false, false);
+ break;
+ }
+ }
else
{
switch (vid.renderpath)
Mod_FrameGroupify_ParseGroups(buf, Mod_FrameGroupify_ParseGroups_Store, mod);
}
+void Mod_FindPotentialDeforms(dp_model_t *mod)
+{
+ int i, j;
+ texture_t *texture;
+ mod->wantnormals = false;
+ mod->wanttangents = false;
+ for (i = 0;i < mod->num_textures;i++)
+ {
+ texture = mod->data_textures + i;
+ if (texture->tcgen.tcgen == Q3TCGEN_ENVIRONMENT)
+ mod->wantnormals = true;
+ for (j = 0;j < Q3MAXDEFORMS;j++)
+ {
+ if (texture->deforms[j].deform == Q3DEFORM_AUTOSPRITE)
+ {
+ mod->wanttangents = true;
+ mod->wantnormals = true;
+ break;
+ }
+ if (texture->deforms[j].deform != Q3DEFORM_NONE)
+ mod->wantnormals = true;
+ }
+ }
+}
+
/*
==================
Mod_LoadModel
else Con_Printf("Mod_LoadModel: model \"%s\" is of unknown/unsupported type\n", mod->name);
Mem_Free(buf);
+ Mod_FindPotentialDeforms(mod);
+
buf = FS_LoadFile (va("%s.framegroups", mod->name), tempmempool, false, &filesize);
if(buf)
{