GL_BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
+qboolean r_draw2d_force = false;
static void _DrawQ_ProcessDrawFlag(int flags)
{
_DrawQ_Setup();
CHECKGLERROR
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
if(flags == DRAWFLAG_ADDITIVE)
GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
else if(flags == DRAWFLAG_MODULATE)
float floats[20];
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
+
GL_Color(red, green, blue, alpha);
R_Mesh_VertexPointer(floats, 0, 0);
float cosar = cos(ar);
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
+
GL_Color(red, green, blue, alpha);
R_Mesh_VertexPointer(floats, 0, 0);
float floats[12];
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
+
GL_Color(red, green, blue, alpha);
R_Mesh_VertexPointer(floats, 0, 0);
maxlen = 1<<30;
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return startx + DrawQ_TextWidth_UntilWidth_TrackColors_Scale(text, &maxlen, w, h, sw, sh, NULL, ignorecolorcodes, fnt, 1000000000);
R_Mesh_ColorPointer(color4f, 0, 0);
R_Mesh_ResetTextureState();
float floats[36];
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
R_Mesh_VertexPointer(floats, 0, 0);
R_Mesh_ColorPointer(floats + 20, 0, 0);
void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags)
{
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
R_Mesh_VertexPointer(mesh->data_vertex3f, 0, 0);
R_Mesh_ColorPointer(mesh->data_color4f, 0, 0);
int num;
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
GL_Color(1,1,1,1);
CHECKGLERROR
void DrawQ_Line (float width, float x1, float y1, float x2, float y2, float r, float g, float b, float alpha, int flags)
{
_DrawQ_ProcessDrawFlag(flags);
+ if(!r_draw2d.integer && !r_draw2d_force)
+ return;
R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
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_draw2d = {0, "r_draw2d","1", "draw 2D stuff (dangerous to turn off)"};
cvar_t r_drawworld = {0, "r_drawworld","1", "draw world (most static stuff)"};
cvar_t r_drawviewmodel = {0, "r_drawviewmodel","1", "draw your weapon model"};
cvar_t r_drawexteriormodel = {0, "r_drawexteriormodel","1", "draw your player model (e.g. in chase cam, reflections)"};
Cvar_RegisterVariable(&r_showdisabledepthtest);
Cvar_RegisterVariable(&r_drawportals);
Cvar_RegisterVariable(&r_drawentities);
+ Cvar_RegisterVariable(&r_draw2d);
Cvar_RegisterVariable(&r_drawworld);
Cvar_RegisterVariable(&r_cullentities_trace);
Cvar_RegisterVariable(&r_cullentities_trace_samples);
}
if (fpsstring[0])
{
+ r_draw2d_force = true;
fps_x = vid_conwidth.integer - DrawQ_TextWidth(fpsstring, 0, fps_scalex, fps_scaley, true, FONT_INFOBAR);
DrawQ_Fill(fps_x, fps_y, vid_conwidth.integer - fps_x, fps_scaley, 0, 0, 0, 0.5, 0);
if (red)
else
DrawQ_String(fps_x, fps_y, fpsstring, 0, fps_scalex, fps_scaley, 1, 1, 1, 1, 0, NULL, true, FONT_INFOBAR);
fps_y += fps_scaley;
+ r_draw2d_force = false;
}
if (timedemostring1[0])
{