/* ================ R_ShowTris -- johnfitz ================ */ void R_ShowTris(void) { extern cvar_t r_particles; int i; if (r_showtris.value < 1 || r_showtris.value > 2 || cl.maxclients > 1 || !vulkan_globals.non_solid_fill) return; if (r_drawworld.value) { R_DrawWorld_ShowTris(); } if (r_drawentities.value) { for (i=0 ; i<cl_numvisedicts ; i++) { currententity = cl_visedicts[i]; if (currententity == &cl_entities[cl.viewentity]) // chasecam currententity->angles[0] *= 0.3; switch (currententity->model->type) { case mod_brush: R_DrawBrushModel_ShowTris (currententity); break; case mod_alias: R_DrawAliasModel_ShowTris (currententity); break; default: break; } } // viewmodel currententity = &cl.viewent; if (r_drawviewmodel.value && !chase_active.value && cl.stats[STAT_HEALTH] > 0 && !(cl.items & IT_INVISIBILITY) && currententity->model && currententity->model->type == mod_alias) { R_DrawAliasModel_ShowTris (currententity); } } if (r_particles.value) { R_DrawParticles_ShowTris(); } Sbar_Changed(); //so we don't get dots collecting on the statusbar }
/* ================ R_ShowTris -- johnfitz ================ */ void R_ShowTris (void) { extern cvar_t r_particles; int i; if (r_showtris.value < 1 || r_showtris.value > 2 || cl.maxclients > 1) return; if (r_showtris.value == 1) glDisable (GL_DEPTH_TEST); glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); GL_PolygonOffset (OFFSET_SHOWTRIS); glDisable (GL_TEXTURE_2D); glColor3f (1,1,1); // glEnable (GL_BLEND); // glBlendFunc (GL_ONE, GL_ONE); if (r_drawworld.value) { R_DrawWorld_ShowTris (); } if (r_drawentities.value) { for (i=0 ; i<cl_numvisedicts ; i++) { currententity = cl_visedicts[i]; if (currententity == &cl_entities[cl.viewentity]) // chasecam currententity->angles[0] *= 0.3; switch (currententity->model->type) { case mod_brush: R_DrawBrushModel_ShowTris (currententity); break; case mod_alias: R_DrawAliasModel_ShowTris (currententity); break; case mod_sprite: R_DrawSpriteModel (currententity); break; default: break; } } // viewmodel currententity = &cl.viewent; if (r_drawviewmodel.value && !chase_active.value && cl.stats[STAT_HEALTH] > 0 && !(cl.items & IT_INVISIBILITY) && currententity->model && currententity->model->type == mod_alias) { glDepthRange (0, 0.3); R_DrawAliasModel_ShowTris (currententity); glDepthRange (0, 1); } } if (r_particles.value) { R_DrawParticles_ShowTris (); } // glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // glDisable (GL_BLEND); glColor3f (1,1,1); glEnable (GL_TEXTURE_2D); glPolygonMode (GL_FRONT_AND_BACK, GL_FILL); GL_PolygonOffset (OFFSET_NONE); if (r_showtris.value == 1) glEnable (GL_DEPTH_TEST); Sbar_Changed (); //so we don't get dots collecting on the statusbar }