if(!r_draw2d.integer && !r_draw2d_force)
return;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
floats[12] = 0.0f;floats[13] = 0.0f;
floats[14] = 1.0f;floats[15] = 0.0f;
floats[16] = 1.0f;floats[17] = 1.0f;
if(!r_draw2d.integer && !r_draw2d_force)
return;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
if (pic)
{
if (width == 0)
if(!r_draw2d.integer && !r_draw2d_force)
return;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
floats[2] = floats[5] = floats[8] = floats[11] = 0;
return x;
}
+float DrawQ_Color[4];
float DrawQ_String_Scale(float startx, float starty, const char *text, size_t maxlen, float w, float h, float sw, float sh, float basered, float basegreen, float baseblue, float basealpha, int flags, int *outcolor, qboolean ignorecolorcodes, const dp_font_t *fnt)
{
int shadow, colorindex = STRING_COLOR_DEFAULT;
size_t i;
float x = startx, y, s, t, u, v, thisw;
float *av, *at, *ac;
- float color[4];
int batchcount;
static float vertex3f[QUADELEMENTS_MAXQUADS*4*3];
static float texcoord2f[QUADELEMENTS_MAXQUADS*4*2];
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_ResetTextureState();
+// R_Mesh_ResetTextureState();
if (!fontmap)
R_Mesh_TexBind(0, fnt->tex);
R_SetupShader_Generic(fnt->tex, NULL, GL_MODULATE, 1);
else
colorindex = *outcolor;
- DrawQ_GetTextColor(color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
+ DrawQ_GetTextColor(DrawQ_Color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
x = startx;
y = starty;
if (ch <= '9' && ch >= '0') // ^[0-9] found
{
colorindex = ch - '0';
- DrawQ_GetTextColor(color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
+ DrawQ_GetTextColor(DrawQ_Color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
++text;
++i;
continue;
colorindex = tempcolorindex | 0xf;
// ...done! now colorindex has rgba codes (1,rrrr,gggg,bbbb,aaaa)
//Con_Printf("^1colorindex:^7 %x\n", colorindex);
- DrawQ_GetTextColor(color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
+ DrawQ_GetTextColor(DrawQ_Color, colorindex, basered, basegreen, baseblue, basealpha, shadow != 0);
i+=4;
text+=4;
continue;
t = (ch >> 4)*0.0625f + (0.5f / th);
u = 0.0625f * thisw - (1.0f / tw);
v = 0.0625f - (1.0f / th);
- ac[ 0] = color[0];ac[ 1] = color[1];ac[ 2] = color[2];ac[ 3] = color[3];
- ac[ 4] = color[0];ac[ 5] = color[1];ac[ 6] = color[2];ac[ 7] = color[3];
- ac[ 8] = color[0];ac[ 9] = color[1];ac[10] = color[2];ac[11] = color[3];
- ac[12] = color[0];ac[13] = color[1];ac[14] = color[2];ac[15] = color[3];
+ ac[ 0] = DrawQ_Color[0];ac[ 1] = DrawQ_Color[1];ac[ 2] = DrawQ_Color[2];ac[ 3] = DrawQ_Color[3];
+ ac[ 4] = DrawQ_Color[0];ac[ 5] = DrawQ_Color[1];ac[ 6] = DrawQ_Color[2];ac[ 7] = DrawQ_Color[3];
+ ac[ 8] = DrawQ_Color[0];ac[ 9] = DrawQ_Color[1];ac[10] = DrawQ_Color[2];ac[11] = DrawQ_Color[3];
+ ac[12] = DrawQ_Color[0];ac[13] = DrawQ_Color[1];ac[14] = DrawQ_Color[2];ac[15] = DrawQ_Color[3];
at[ 0] = s ; at[ 1] = t ;
at[ 2] = s+u ; at[ 3] = t ;
at[ 4] = s+u ; at[ 5] = t+v ;
}
else
kx = ky = 0;
- ac[ 0] = color[0]; ac[ 1] = color[1]; ac[ 2] = color[2]; ac[ 3] = color[3];
- ac[ 4] = color[0]; ac[ 5] = color[1]; ac[ 6] = color[2]; ac[ 7] = color[3];
- ac[ 8] = color[0]; ac[ 9] = color[1]; ac[10] = color[2]; ac[11] = color[3];
- ac[12] = color[0]; ac[13] = color[1]; ac[14] = color[2]; ac[15] = color[3];
+ ac[ 0] = DrawQ_Color[0]; ac[ 1] = DrawQ_Color[1]; ac[ 2] = DrawQ_Color[2]; ac[ 3] = DrawQ_Color[3];
+ ac[ 4] = DrawQ_Color[0]; ac[ 5] = DrawQ_Color[1]; ac[ 6] = DrawQ_Color[2]; ac[ 7] = DrawQ_Color[3];
+ ac[ 8] = DrawQ_Color[0]; ac[ 9] = DrawQ_Color[1]; ac[10] = DrawQ_Color[2]; ac[11] = DrawQ_Color[3];
+ ac[12] = DrawQ_Color[0]; ac[13] = DrawQ_Color[1]; ac[14] = DrawQ_Color[2]; ac[15] = DrawQ_Color[3];
at[0] = map->glyphs[mapch].txmin; at[1] = map->glyphs[mapch].tymin;
at[2] = map->glyphs[mapch].txmax; at[3] = map->glyphs[mapch].tymin;
at[4] = map->glyphs[mapch].txmax; at[5] = map->glyphs[mapch].tymax;
if (outcolor)
*outcolor = colorindex;
-
+
// note: this relies on the proper text (not shadow) being drawn last
return x;
}
if(!r_draw2d.integer && !r_draw2d_force)
return;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
if (pic)
{
if (width == 0)
return;
DrawQ_ProcessDrawFlag(flags, hasalpha);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(mesh->texture, NULL, GL_MODULATE, 1);
R_Mesh_PrepareVertices_Generic_Arrays(mesh->num_vertices, mesh->data_vertex3f, mesh->data_color4f, mesh->data_texcoord2f);
case RENDERPATH_D3D11:
Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
break;
+ case RENDERPATH_SOFT:
+ //Con_DPrintf("FIXME SOFT %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
}
}
case RENDERPATH_D3D11:
Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
break;
+ case RENDERPATH_SOFT:
+ //Con_DPrintf("FIXME SOFT %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
}
}
hasalpha = true;
_DrawQ_SetupAndProcessDrawFlag(flags, NULL, hasalpha ? 0.5f : 1.0f);
+
if(!r_draw2d.integer && !r_draw2d_force)
return;
case RENDERPATH_D3D11:
Con_DPrintf("FIXME D3D11 %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
break;
+ case RENDERPATH_SOFT:
+ //Con_DPrintf("FIXME SOFT %s:%i %s\n", __FILE__, __LINE__, __FUNCTION__);
+ break;
}
}
if (vid_usinghwgamma)
return;
break;
+ case RENDERPATH_SOFT:
+ return;
}
// all the blends ignore depth
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
GL_DepthMask(true);
GL_DepthRange(0, 1);