mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 01:10:51 +00:00
GL State leak correction : no more diffuse map disappearance.
git-svn-id: https://svn.eduke32.com/eduke32@461 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
581fd77c35
commit
43657d4f56
1 changed files with 8 additions and 7 deletions
|
@ -1623,8 +1623,9 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
|||
bglBindTexture(GL_TEXTURE_2D, pth ? pth->glpic : 0);
|
||||
|
||||
detailpth = NULL;
|
||||
if (r_detailmapping && !r_depthpeeling && indrawroomsandmasks && !drawingskybox && hicfindsubst(globalpicnum, DETAILPAL, 0))
|
||||
detailpth = gltexcache(globalpicnum,DETAILPAL,method&(~3));
|
||||
if (r_detailmapping && usehightile && !r_depthpeeling && indrawroomsandmasks && !drawingskybox &&
|
||||
hicfindsubst(globalpicnum, DETAILPAL, 0))
|
||||
detailpth = gltexcache(globalpicnum, DETAILPAL,method&(~3));
|
||||
|
||||
if (detailpth && (detailpth->hicr->palnum == DETAILPAL))
|
||||
{
|
||||
|
@ -1886,6 +1887,11 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
|||
}
|
||||
bglEnd();
|
||||
}
|
||||
if (detailpth)
|
||||
{
|
||||
bglDisable(GL_TEXTURE_2D);
|
||||
bglActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
if (fullbrightdrawingpass == 1) // tile has fullbright colors ?
|
||||
{
|
||||
fullbrightdrawingpass = 2;
|
||||
|
@ -1899,11 +1905,6 @@ void drawpoly (double *dpx, double *dpy, long n, long method)
|
|||
bglFogf(GL_FOG_DENSITY, fogresult);
|
||||
fullbrightdrawingpass = 0;
|
||||
}
|
||||
if (detailpth)
|
||||
{
|
||||
bglDisable(GL_TEXTURE_2D);
|
||||
bglActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue