cvar_t r_showcollisionbrushes_polygonfactor = {0, "r_showcollisionbrushes_polygonfactor", "-1", "expands outward the brush polygons a little bit, used to make collision brushes appear infront of walls"};
cvar_t r_showcollisionbrushes_polygonoffset = {0, "r_showcollisionbrushes_polygonoffset", "0", "nudges brush polygon depth in hardware depth units, used to make collision brushes appear infront of walls"};
cvar_t r_showdisabledepthtest = {0, "r_showdisabledepthtest", "0", "disables depth testing on r_show* cvars, allowing you to see what hidden geometry the graphics card is processing"};
+cvar_t r_drawportals = {0, "r_drawportals", "0", "shows portals (separating polygons) in world interior in quake1 maps"};
cvar_t r_drawentities = {0, "r_drawentities","1", "draw entities (doors, players, projectiles, etc)"};
cvar_t r_drawviewmodel = {0, "r_drawviewmodel","1", "draw your weapon model"};
cvar_t r_speeds = {0, "r_speeds","0", "displays rendering statistics and per-subsystem timings"};
Cvar_RegisterVariable(&r_showcollisionbrushes_polygonfactor);
Cvar_RegisterVariable(&r_showcollisionbrushes_polygonoffset);
Cvar_RegisterVariable(&r_showdisabledepthtest);
+ Cvar_RegisterVariable(&r_drawportals);
Cvar_RegisterVariable(&r_drawentities);
Cvar_RegisterVariable(&r_drawviewmodel);
Cvar_RegisterVariable(&r_speeds);
extern void R_DrawLightningBeams (void);
extern void VM_AddPolygonsToMeshQueue (void);
+extern void R_DrawPortals (void);
void R_RenderScene(void)
{
// don't let sound skip if going slow
}
VM_AddPolygonsToMeshQueue();
+ if (r_drawportals.integer)
+ {
+ R_DrawPortals();
+ if (r_timereport_active)
+ R_TimeReport("portals");
+ }
+
if (gl_support_fragment_shader)
{
qglUseProgramObjectARB(0);CHECKGLERROR
#define MAX_LIGHTMAP_SIZE 256
cvar_t r_ambient = {0, "r_ambient", "0", "brighter world cheat (not allowed in multiplayer), value is 0-128"};
-cvar_t r_drawportals = {0, "r_drawportals", "0", "shows portals (separating polygons) in world interior in quake1 maps"};
cvar_t r_lockpvs = {0, "r_lockpvs", "0", "disables pvs switching, allows you to walk around and inspect what is visible from a given location in the map (anything not visible from your current location will not be drawn)"};
cvar_t r_lockvisibility = {0, "r_lockvisibility", "0", "disables visibility updates, allows you to walk around and inspect what is visible from a given viewpoint in the map (anything offscreen at the moment this is enabled will not be drawn)"};
cvar_t r_useportalculling = {0, "r_useportalculling", "1", "use advanced portal culling visibility method to improve performance over just Potentially Visible Set, provides an even more significant speed improvement in unvised maps"};
}
// LordHavoc: this is just a nice debugging tool, very slow
-static void R_DrawPortals(void)
+void R_DrawPortals(void)
{
int i, leafnum;
mportal_t *portal;
}
}
}
-
- if (r_drawportals.integer)
- R_DrawPortals();
}
void R_Q1BSP_DrawSky(entity_render_t *ent)
{
Cvar_RegisterVariable(&r_ambient);
- Cvar_RegisterVariable(&r_drawportals);
Cvar_RegisterVariable(&r_lockpvs);
Cvar_RegisterVariable(&r_lockvisibility);
Cvar_RegisterVariable(&r_useportalculling);