/* * * All bones should be an identity orientation to display the mesh exactly * as it is specified. * * For all other frames, the bones represent the transformation from the * orientation of the bone in the base frame to the orientation in this * frame. * */ /* * ============== * R_AddAnimSurfaces * ============== */ void R_AddAnimSurfaces(trRefEntity_t *ent) { md4Header_t * header; md4Surface_t *surface; md4LOD_t * lod; shader_t * shader; int i; header = tr.currentModel->md4; lod = (md4LOD_t *)((byte *)header + header->ofsLODs); surface = (md4Surface_t *)((byte *)lod + lod->ofsSurfaces); for (i = 0; i < lod->numSurfaces; i++) { shader = R_GetShaderByHandle(surface->shaderIndex); R_AddDrawSurf((surfaceType_t *)(void *)surface, shader, 0 /*fogNum*/, false); surface = (md4Surface_t *)((byte *)surface + surface->ofsEnd); } }
/* * ============================================================= * * BRUSH MODELS * * ============================================================= */ /* * ================= * R_AddBrushModelSurfaces * ================= */ void R_AddBrushModelSurfaces(trRefEntity_t *ent) { bmodel_t *bmodel; int clip; model_t * pModel; int i; pModel = R_GetModelByHandle(ent->e.hModel); bmodel = pModel->bmodel; clip = R_CullLocalBox(bmodel->bounds); if (clip == CULL_OUT) { return; } R_DlightBmodel(bmodel); for (i = 0; i < bmodel->numSurfaces; i++) { R_AddWorldSurface(bmodel->firstSurface + i, tr.currentEntity->needDlights); } }
/* * ================= * R_SetupEntityLightingGrid * * ================= */ static void R_SetupEntityLightingGrid(trRefEntity_t *ent) { vec3_t lightOrigin; int pos[3];