for(i_t = 0; i_t < n_t; ++i_t)
{
tri = getsurfacetriangle(e, i_s, i_t);
- R_BeginPolygon(tex, 0);
+ R_BeginPolygon(tex, 0, false);
R_PolygonVertex(getsurfacepoint(e, i_s, tri.x), getsurfacepointattribute(e, i_s, tri.x, SPA_TEXCOORDS0), '1 1 1', 1);
R_PolygonVertex(getsurfacepoint(e, i_s, tri.y), getsurfacepointattribute(e, i_s, tri.y, SPA_TEXCOORDS0), '1 1 1', 1);
R_PolygonVertex(getsurfacepoint(e, i_s, tri.z), getsurfacepointattribute(e, i_s, tri.z, SPA_TEXCOORDS0), '1 1 1', 1);
if(f >= 1)
{
// draw full rectangle
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
v.x += 0.5 * ringsize.x; t += '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
d = q - 1;
if(d > 0)
{
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
else if(f > 0.75)
{
// draw upper and first triangle
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
v.x += 0.5 * ringsize.x; t += '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
v.x -= 0.5 * ringsize.x; t -= '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
R_EndPolygon();
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
else if(f > 0.5)
{
// draw upper triangle
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
v.x += 0.5 * ringsize.x; t += '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
d = q - 0.5;
if(d > 0)
{
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
else if(f > 0.25)
{
// draw first triangle
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
d = q;
if(d > 0)
{
- R_BeginPolygon(pic, drawflag);
+ R_BeginPolygon(pic, drawflag, true);
v = centre; t = '0.5 0.5 0';
R_PolygonVertex(v, t, rgb, a);
{
fga = 1;
fgc = '1 1 1' * fg;
- R_BeginPolygon(minimapname, DRAWFLAG_SCREEN | DRAWFLAG_MIPMAP);
+ R_BeginPolygon(minimapname, DRAWFLAG_SCREEN | DRAWFLAG_MIPMAP, true);
if(v_flipped)
{
R_PolygonVertex(teamradar_texcoord_to_2dcoord(mi_pictexcoord3), yinvert(mi_pictexcoord3), fgc, fga);
else
rgb2 = '1 1 1';
- R_BeginPolygon("", 0);
+ R_BeginPolygon("", 0, true);
R_PolygonVertex(coord+forward*3, '0 0 0', rgb2, panel_fg_alpha);
R_PolygonVertex(coord+right*4-forward*2.5, '0 1 0', rgb2, panel_fg_alpha);
R_PolygonVertex(coord-forward*2, '1 0 0', rgb2, panel_fg_alpha);
R_PolygonVertex(coord-right*4-forward*2.5, '1 1 0', rgb2, panel_fg_alpha);
R_EndPolygon();
- R_BeginPolygon("", 0);
+ R_BeginPolygon("", 0, true);
R_PolygonVertex(coord+forward*2, '0 0 0', rgb, panel_fg_alpha);
R_PolygonVertex(coord+right*3-forward*2, '0 1 0', rgb, panel_fg_alpha);
R_PolygonVertex(coord-forward, '1 0 0', rgb, panel_fg_alpha);
c0 = colormapPaletteColor(colors & 0x0F, false);
c1 = colormapPaletteColor((colors & 0xF0) / 0x10, false);
- R_BeginPolygon("", 0);
+ R_BeginPolygon("", 0, true);
R_PolygonVertex(start - norm, '0 0 0', c0, panel_fg_alpha);
R_PolygonVertex(start + norm, '0 1 0', c0, panel_fg_alpha);
R_PolygonVertex(end + norm, '1 1 0', c1, panel_fg_alpha);
tc_10 = '1.5 0 0' - '0.2 0 0' * sin(time * 0.5) + '0 0.5 0' * cos(time * 1.7);
//tc_11 = '1 1 0' + '0.6 0 0' * sin(time * 0.6) + '0 0.3 0' * cos(time * 0.1);
tc_11 = tc_01 + tc_10 - tc_00;
- R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE);
+ R_BeginPolygon("gfx/nightvision-bg.tga", DRAWFLAG_ADDITIVE, true);
R_PolygonVertex('0 0 0', tc_00, rgb, a);
R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
tc_01 = tc_00 + '0 3 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.2);
tc_10 = tc_00 + '2 0 0' * (1 + Noise_White(nightvision_noise2, frametime) * 0.3);
tc_11 = tc_01 + tc_10 - tc_00;
- R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE);
+ R_BeginPolygon("gfx/nightvision-fg.tga", DRAWFLAG_ADDITIVE, true);
R_PolygonVertex('0 0 0', tc_00, rgb, a);
R_PolygonVertex(autocvar_vid_conwidth * '1 0 0', tc_10, rgb, a);
R_PolygonVertex(autocvar_vid_conwidth * '1 0 0' + autocvar_vid_conheight * '0 1 0', tc_11, rgb, a);
v4 = Rotate(v4, rot) + org;
// draw them
- R_BeginPolygon(pic, f);
+ R_BeginPolygon(pic, f, true);
R_PolygonVertex(v1, '0 0 0', rgb, a);
R_PolygonVertex(v2, '1 0 0', rgb, a);
R_PolygonVertex(v3, '1 1 0', rgb, a);
void drawquad(vector o, vector ri, vector up, string pic, vector rgb, float a, float f)
{
- R_BeginPolygon(pic, f);
+ R_BeginPolygon(pic, f, true);
R_PolygonVertex(o, '0 0 0', rgb, a);
R_PolygonVertex(o + ri, '1 0 0', rgb, a);
R_PolygonVertex(o + up + ri, '1 1 0', rgb, a);
vector borderX = eX * (size+borderDiag);
vector borderY = eY * (size+borderDiag+border);
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, true);
R_PolygonVertex(o, '0 0 0', '0 0 0', a);
R_PolygonVertex(o + Rotate(arrowY - borderX, ang), '0 0 0', '0 0 0', a);
R_PolygonVertex(o + Rotate(borderY - borderX, ang), '0 0 0', '0 0 0', a);
R_PolygonVertex(o + Rotate(arrowY + borderX, ang), '0 0 0', '0 0 0', a);
R_EndPolygon();
- R_BeginPolygon("", DRAWFLAG_ADDITIVE);
+ R_BeginPolygon("", DRAWFLAG_ADDITIVE, true);
R_PolygonVertex(o + Rotate(eY * borderDiag, ang), '0 0 0', rgb, a);
R_PolygonVertex(o + Rotate(arrowY - arrowX, ang), '0 0 0', rgb, a);
R_PolygonVertex(o + Rotate(arrowY + arrowX, ang), '0 0 0', rgb, a);
Draw_CylindricLine(start, end, thickness, beam.beam_image, 0.25, -time * 3, beam.beam_color, beam.beam_alpha, DRAWFLAG_NORMAL, transformed_view_org);
else
{
- R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL); // DRAWFLAG_ADDITIVE
+ R_BeginPolygon(beam.beam_image, DRAWFLAG_NORMAL, false); // DRAWFLAG_ADDITIVE
R_PolygonVertex(
top,
'0 0.5 0' + ('0 0.5 0' * (thickness / beam.beam_thickness)),
if(counter >= 1)
{
// draw from shot origin to min spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
// draw from min spread radius to max spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
if((counter + 1) == divisions)
{
// draw from shot origin to min spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(this.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
// draw from min spread radius to max spread radius
- R_BeginPolygon("", DRAWFLAG_NORMAL);
+ R_BeginPolygon("", DRAWFLAG_NORMAL, false);
R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
C = to + thickdir * (thickness / 2);
D = to - thickdir * (thickness / 2);
- R_BeginPolygon(texture, drawflag);
+ R_BeginPolygon(texture, drawflag, false);
R_PolygonVertex(A, '0 0 0' + shift * '1 0 0', rgb, theAlpha);
R_PolygonVertex(B, '0 1 0' + shift * '1 0 0', rgb, theAlpha);
R_PolygonVertex(C, '0 1 0' + (shift + length_tex) * '1 0 0', rgb, theAlpha);