mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@244 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
5800687491
commit
59fbf83db5
1 changed files with 17 additions and 27 deletions
|
@ -142,7 +142,7 @@ long glprojectionhacks = 1;
|
||||||
static GLuint polymosttext = 0;
|
static GLuint polymosttext = 0;
|
||||||
extern char nofog;
|
extern char nofog;
|
||||||
|
|
||||||
// Those two globals control the drawing of fullbright tiles
|
// Those THREE globals control the drawing of fullbright tiles
|
||||||
long fullbrightloadingpass = 0;
|
long fullbrightloadingpass = 0;
|
||||||
long fullbrightdrawingpass = 0;
|
long fullbrightdrawingpass = 0;
|
||||||
long shadeforfullbrightpass;
|
long shadeforfullbrightpass;
|
||||||
|
@ -395,18 +395,6 @@ tryart:
|
||||||
(pth->flags & (1+2)) == ((dameth&4)>>2)
|
(pth->flags & (1+2)) == ((dameth&4)>>2)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (pth->flags & 16)
|
|
||||||
if (indrawroomsandmasks)
|
|
||||||
{
|
|
||||||
if (!fullbrightdrawingpass)
|
|
||||||
{
|
|
||||||
pth = pth->wofb;
|
|
||||||
fullbrightdrawingpass = 1;
|
|
||||||
}
|
|
||||||
else if (fullbrightdrawingpass == 2)
|
|
||||||
pth = pth->ofb;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pth->flags & 128)
|
if (pth->flags & 128)
|
||||||
{
|
{
|
||||||
pth->flags &= ~128;
|
pth->flags &= ~128;
|
||||||
|
@ -425,18 +413,6 @@ tryart:
|
||||||
pth->next = gltexcachead[j];
|
pth->next = gltexcachead[j];
|
||||||
gltexcachead[j] = pth;
|
gltexcachead[j] = pth;
|
||||||
|
|
||||||
if (pth->flags & 16)
|
|
||||||
if (indrawroomsandmasks)
|
|
||||||
{
|
|
||||||
if (!fullbrightdrawingpass)
|
|
||||||
{
|
|
||||||
pth = pth->wofb;
|
|
||||||
fullbrightdrawingpass = 1;
|
|
||||||
}
|
|
||||||
else if (fullbrightdrawingpass == 2)
|
|
||||||
pth = pth->ofb;
|
|
||||||
}
|
|
||||||
|
|
||||||
return(pth);
|
return(pth);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1377,6 +1353,8 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
#ifdef USE_OPENGL
|
#ifdef USE_OPENGL
|
||||||
pthtyp *pth;
|
pthtyp *pth;
|
||||||
#endif
|
#endif
|
||||||
|
// backup of the n for possible redrawing of fullbright
|
||||||
|
long n_ = n, method_ = method;
|
||||||
|
|
||||||
if (method == -1) return;
|
if (method == -1) return;
|
||||||
|
|
||||||
|
@ -1460,6 +1438,19 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
|
|
||||||
if (skyclamphack) method |= 4;
|
if (skyclamphack) method |= 4;
|
||||||
pth = gltexcache(globalpicnum,globalpal,method&(~3));
|
pth = gltexcache(globalpicnum,globalpal,method&(~3));
|
||||||
|
|
||||||
|
if (pth->flags & 16)
|
||||||
|
if (indrawroomsandmasks)
|
||||||
|
{
|
||||||
|
if (!fullbrightdrawingpass)
|
||||||
|
{
|
||||||
|
pth = pth->wofb;
|
||||||
|
fullbrightdrawingpass = 1;
|
||||||
|
}
|
||||||
|
else if (fullbrightdrawingpass == 2)
|
||||||
|
pth = pth->ofb;
|
||||||
|
}
|
||||||
|
|
||||||
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
||||||
|
|
||||||
if (pth && (pth->flags & 2))
|
if (pth && (pth->flags & 2))
|
||||||
|
@ -1661,7 +1652,7 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
||||||
shadeforfullbrightpass = globalshade; // save the current shade
|
shadeforfullbrightpass = globalshade; // save the current shade
|
||||||
globalshade = -30; // fullbright
|
globalshade = -30; // fullbright
|
||||||
bglDisable(GL_FOG); // no fog
|
bglDisable(GL_FOG); // no fog
|
||||||
drawpoly(dpx, dpy, n, method); // draw them afterwards, then. :)
|
drawpoly(dpx, dpy, n_, method_); // draw them afterwards, then. :)
|
||||||
bglEnable(GL_FOG);
|
bglEnable(GL_FOG);
|
||||||
globalshade = shadeforfullbrightpass;
|
globalshade = shadeforfullbrightpass;
|
||||||
fullbrightdrawingpass = 0;
|
fullbrightdrawingpass = 0;
|
||||||
|
@ -3867,7 +3858,6 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
|
||||||
switch((globalorientation>>4)&3)
|
switch((globalorientation>>4)&3)
|
||||||
{
|
{
|
||||||
case 0: //Face sprite
|
case 0: //Face sprite
|
||||||
|
|
||||||
//Project 3D to 2D
|
//Project 3D to 2D
|
||||||
sx0 = (float)(tspr->x-globalposx);
|
sx0 = (float)(tspr->x-globalposx);
|
||||||
sy0 = (float)(tspr->y-globalposy);
|
sy0 = (float)(tspr->y-globalposy);
|
||||||
|
|
Loading…
Reference in a new issue