- moved GLEXT API out of RenderContext struct.

This commit is contained in:
Christoph Oelckers 2013-09-03 18:29:39 +02:00
commit 2885056f46
35 changed files with 384 additions and 353 deletions

View file

@ -82,7 +82,7 @@ void GLWall::SplitUpperEdge(texcoord * tcs, bool glow)
float fracfac = sidefrac - glseg.fracleft;
if (glow) gl.VertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - ztop[0] + (facc - fact) * fracfac,
if (glow) glVertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - ztop[0] + (facc - fact) * fracfac,
ztop[0] - zfloor[0] + (fact - facf) * fracfac);
glTexCoord2f(tcs[1].u + facu * fracfac, tcs[1].v + facv * fracfac);
@ -118,7 +118,7 @@ void GLWall::SplitLowerEdge(texcoord * tcs, bool glow)
float fracfac = sidefrac - glseg.fracleft;
if (glow) gl.VertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - zbottom[0] + (facc - facb) * fracfac,
if (glow) glVertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - zbottom[0] + (facc - facb) * fracfac,
zbottom[0] - zfloor[0] + (facb - facf) * fracfac);
glTexCoord2f(tcs[0].u + facu * fracfac, tcs[0].v + facv * fracfac);
@ -150,7 +150,7 @@ void GLWall::SplitLeftEdge(texcoord * tcs, bool glow)
while (i<vi->numheights && vi->heightlist[i] <= zbottom[0] ) i++;
while (i<vi->numheights && vi->heightlist[i] < ztop[0])
{
if (glow) gl.VertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - vi->heightlist[i], vi->heightlist[i] - zfloor[0]);
if (glow) glVertexAttrib2f(VATTR_GLOWDISTANCE, zceil[0] - vi->heightlist[i], vi->heightlist[i] - zfloor[0]);
glTexCoord2f(factu1*(vi->heightlist[i] - ztop[0]) + tcs[1].u,
factv1*(vi->heightlist[i] - ztop[0]) + tcs[1].v);
glVertex3f(glseg.x1, vi->heightlist[i], glseg.y1);
@ -183,7 +183,7 @@ void GLWall::SplitRightEdge(texcoord * tcs, bool glow)
while (i>0 && vi->heightlist[i] >= ztop[1]) i--;
while (i>0 && vi->heightlist[i] > zbottom[1])
{
if (glow) gl.VertexAttrib2f(VATTR_GLOWDISTANCE, zceil[1] - vi->heightlist[i], vi->heightlist[i] - zfloor[1]);
if (glow) glVertexAttrib2f(VATTR_GLOWDISTANCE, zceil[1] - vi->heightlist[i], vi->heightlist[i] - zfloor[1]);
glTexCoord2f(factu2 * (vi->heightlist[i] - ztop[1]) + tcs[2].u,
factv2 * (vi->heightlist[i] - ztop[1]) + tcs[2].v);
glVertex3f(glseg.x2, vi->heightlist[i], glseg.y2);