lighthalf related transpoly cleanup
[xonotic/darkplaces.git] / gl_poly.c
index d312335ec68ccf8397c19bcb0acee54e616fd662..3947bbd80fabb9dfc3e6c48b6fed04b987beddd5 100644 (file)
--- a/gl_poly.c
+++ b/gl_poly.c
@@ -59,6 +59,8 @@ void transpolyclear()
        transviewdist = DotProduct(r_refdef.vieworg, vpn);
 }
 
+// turned into a #define
+/*
 void transpolybegin(int texnum, int glowtexnum, int fogtexnum, int transpolytype)
 {
        if (currenttranspoly >= MAX_TRANSPOLYS || currenttransvert >= MAX_TRANSVERTS)
@@ -71,6 +73,7 @@ void transpolybegin(int texnum, int glowtexnum, int fogtexnum, int transpolytype
        transpoly[currenttranspoly].verts = 0;
 //     transpoly[currenttranspoly].ndist = 0; // clear the normal
 }
+*/
 
 // turned into a #define
 /*
@@ -367,10 +370,6 @@ void transpolyrender()
                glEnable(GL_ALPHA_TEST);
        else
                glDisable(GL_ALPHA_TEST);
-       // later note: wasn't working on my TNT drivers...  strangely...  used a cheaper hack in transpolyvert
-       //// offset by 16 depth units so decal sprites appear infront of walls
-       //glPolygonOffset(1, -16);
-       //glEnable(GL_POLYGON_OFFSET_FILL);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        tpolytype = TPOLYTYPE_ALPHA;
        texnum = -1;
@@ -538,39 +537,11 @@ void transpolyrender()
                glEnd();
        }
 
-       //glDisable(GL_POLYGON_OFFSET_FILL);
        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
        glDepthMask(1); // enable zbuffer updates
        glDisable(GL_ALPHA_TEST);
 }
 
-/*
-void lightpolybegin(int texnum)
-{
-       if (currentlightpoly >= MAX_LIGHTPOLYS || currentlightvert >= MAX_LIGHTVERTS)
-               return;
-       lightpoly[currentlightpoly].texnum = (unsigned short) texnum;
-       lightpoly[currentlightpoly].firstvert = currentlightvert;
-       lightpoly[currentlightpoly].verts = 0;
-}
-
-// lightpolyvert is a #define
-
-void lightpolyend()
-{
-       if (currentlightpoly >= MAX_LIGHTPOLYS)
-               return;
-       if (lightpoly[currentlightpoly].verts < 3) // skip invalid polygons
-       {
-               currentlightvert = lightpoly[currentlightpoly].firstvert; // reset vert pointer
-               return;
-       }
-       if (currentlightvert >= MAX_LIGHTVERTS)
-               return;
-       currentlightpoly++;
-}
-*/
-
 extern qboolean isG200;
 
 void wallpolyclear()