RSurf_ActiveWorldEntity();
r_refdef.stats.drawndecals += numsurfaces;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
GL_DepthMask(false);
GL_DepthRange(0, 1);
GL_PolygonOffset(0, 0);
Vector4Set(colormultiplier, r_refdef.view.colorscale * (1.0 / 256.0f), r_refdef.view.colorscale * (1.0 / 256.0f), r_refdef.view.colorscale * (1.0 / 256.0f), cl_particles_alpha.value * (1.0 / 256.0f));
r_refdef.stats.particles += numsurfaces;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
GL_DepthMask(false);
GL_DepthRange(0, 1);
GL_PolygonOffset(0, 0);
GL_DepthRange(0, 1);
GL_PolygonOffset(0, 0);
GL_DepthTest(false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
verts[2] = verts[5] = verts[8] = verts[11] = 0;
verts[0] = verts[9] = 0;
verts[1] = verts[4] = vid_conheight.integer - scr_loadingscreen_barheight.value;
GL_DepthRange(0, 1);
GL_PolygonOffset(0, 0);
GL_DepthTest(false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
GL_Color(1,1,1,1);
if(loadingscreentexture)
{
vmpolygons_t* polys = vmpolygons + PRVM_GetProgNr();
if(polys->progstarttime != prog->starttime) // from other progs? won't draw these (this can cause crashes!)
return;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_EntityMatrix(&identitymatrix);
GL_CullFace(GL_NONE);
GL_DepthTest(true); // polys in 3D space shall always have depth test
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;
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);
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);
hasalpha = true;
_DrawQ_SetupAndProcessDrawFlag(flags, NULL, hasalpha ? 0.5f : 1.0f);
+
if(!r_draw2d.integer && !r_draw2d_force)
return;
break;
}
// 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);
GL_DepthMask(false);
GL_DepthRange(0, 1);
GL_PolygonOffset(r_refdef.polygonfactor, r_refdef.polygonoffset);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
vertex3f[ 0] = mins[0];vertex3f[ 1] = mins[1];vertex3f[ 2] = mins[2]; //
vertex3f[ 3] = maxs[0];vertex3f[ 4] = mins[1];vertex3f[ 5] = mins[2];
GL_PolygonOffset(rsurface.basepolygonfactor, rsurface.basepolygonoffset);
GL_DepthTest(!(rsurface.ent_flags & RENDER_NODEPTHTEST));
GL_CullFace((rsurface.ent_flags & RENDER_DOUBLESIDED) ? GL_NONE : r_refdef.view.cullface_back);
- R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
memcpy(color4f, nomodelcolor4f, sizeof(float[6*4]));
for (i = 0, c = color4f;i < 6;i++, c += 4)
{
c[2] = (c[2] * f1 + r_refdef.fogcolor[2] * f2);
}
}
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
+ R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
R_Mesh_PrepareVertices_Generic_Arrays(6, nomodelvertex3f, color4f, NULL);
R_Mesh_Draw(0, 6, 0, 8, nomodelelement3i, NULL, 0, nomodelelement3s, NULL, 0);
}
float c[4];
GL_AlphaTest(false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
if(rsurface.texture && rsurface.texture->currentskinframe)
GL_BlendFunc(GL_ONE, GL_ZERO);
GL_DepthMask(true);
GL_AlphaTest(false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_DepthOrShadow();
}
RSurf_SetupDepthAndCulling();
GL_CullFace(GL_NONE);
R_EntityMatrix(&identitymatrix);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
i = surfacelist[0];
GL_Color(((i & 0x0007) >> 0) * (1.0f / 7.0f) * r_refdef.view.colorscale,
// now render the decals all at once
// (this assumes they all use one particle font texture!)
RSurf_ActiveCustomEntity(&rsurface.matrix, &rsurface.inversematrix, rsurface.ent_flags, rsurface.ent_shadertime, 1, 1, 1, 1, numdecals*3, decalsystem->vertex3f, decalsystem->texcoord2f, NULL, NULL, NULL, decalsystem->color4f, numtris, decalsystem->element3i, decalsystem->element3s, false, false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_Mesh_PrepareVertices_Generic_Arrays(numtris * 3, decalsystem->vertex3f, decalsystem->color4f, decalsystem->texcoord2f);
GL_DepthMask(false);
GL_DepthRange(0, 1);
flagsmask = MATERIALFLAG_SKY | MATERIALFLAG_WALL;
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(NULL, NULL, GL_MODULATE, 1);
GL_DepthRange(0, 1);
GL_DepthTest(!r_showdisabledepthtest.integer);
numpoints = min(portal->numpoints, POLYGONELEMENTS_MAXPOINTS);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
isvis = (portal->here->clusterindex >= 0 && portal->past->clusterindex >= 0 && portal->here->clusterindex != portal->past->clusterindex);
GL_BlendFunc(GL_ONE, GL_ZERO);
GL_DepthMask(true);
GL_AlphaTest(false);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_DepthOrShadow();
if (ent == r_refdef.scene.worldentity)
R_DrawWorldSurfaces(false, false, true, false, false);
GL_CullFace(r_refdef.view.cullface_back);
R_EntityMatrix(&identitymatrix);
- R_Mesh_ResetTextureState();
+// R_Mesh_ResetTextureState();
R_SetupShader_Generic(explosiontexture, NULL, GL_MODULATE, 1);
for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++)
{