mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Don't apply GL fogging to wall lines drawn in game's "light" overhead view.
git-svn-id: https://svn.eduke32.com/eduke32@3438 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
385095be76
commit
0796c0e66e
4 changed files with 30 additions and 17 deletions
|
@ -1058,6 +1058,27 @@ void hash_delete(hashtable_t *t, const char *s);
|
||||||
|
|
||||||
extern void initialize_engine_globals(void);
|
extern void initialize_engine_globals(void);
|
||||||
|
|
||||||
|
// XXX: These assume that glbuild.h is already #include'd
|
||||||
|
static inline void push_nofog(void)
|
||||||
|
{
|
||||||
|
#ifdef USE_OPENGL
|
||||||
|
if (rendmode >= REND_POLYMOST)
|
||||||
|
{
|
||||||
|
bglPushAttrib(GL_ENABLE_BIT);
|
||||||
|
bglDisable(GL_FOG);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void pop_nofog(void)
|
||||||
|
{
|
||||||
|
#ifdef USE_OPENGL
|
||||||
|
if (rendmode >= REND_POLYMOST)
|
||||||
|
bglPopAttrib();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXTERNC
|
#ifdef EXTERNC
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
|
|
||||||
# include "compat.h"
|
# include "compat.h"
|
||||||
# include "baselayer.h"
|
# include "baselayer.h"
|
||||||
# include "build.h"
|
|
||||||
# include "glbuild.h"
|
# include "glbuild.h"
|
||||||
|
# include "build.h"
|
||||||
# include "osd.h"
|
# include "osd.h"
|
||||||
# include "hightile.h"
|
# include "hightile.h"
|
||||||
# include "mdsprite.h"
|
# include "mdsprite.h"
|
||||||
|
|
|
@ -2917,22 +2917,6 @@ static void ReadPaletteTable(void)
|
||||||
}// end ReadPaletteTable
|
}// end ReadPaletteTable
|
||||||
|
|
||||||
|
|
||||||
// XXX: this belongs into some engine header?
|
|
||||||
static inline void push_nofog(void)
|
|
||||||
{
|
|
||||||
#ifdef USE_OPENGL
|
|
||||||
bglPushAttrib(GL_ENABLE_BIT);
|
|
||||||
bglDisable(GL_FOG);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void pop_nofog(void)
|
|
||||||
{
|
|
||||||
#ifdef USE_OPENGL
|
|
||||||
bglPopAttrib();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static void m32_showmouse(void)
|
static void m32_showmouse(void)
|
||||||
{
|
{
|
||||||
int32_t i, col;
|
int32_t i, col;
|
||||||
|
|
|
@ -2143,6 +2143,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
xvect2 = mulscale16(xvect,yxaspect);
|
xvect2 = mulscale16(xvect,yxaspect);
|
||||||
yvect2 = mulscale16(yvect,yxaspect);
|
yvect2 = mulscale16(yvect,yxaspect);
|
||||||
|
|
||||||
|
push_nofog();
|
||||||
|
|
||||||
//Draw red lines
|
//Draw red lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
|
@ -2188,6 +2190,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_nofog();
|
||||||
|
|
||||||
//Draw sprites
|
//Draw sprites
|
||||||
k = g_player[screenpeek].ps->i;
|
k = g_player[screenpeek].ps->i;
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
|
@ -2334,6 +2338,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
push_nofog();
|
||||||
|
|
||||||
//Draw white lines
|
//Draw white lines
|
||||||
for (i=numsectors-1; i>=0; i--)
|
for (i=numsectors-1; i>=0; i--)
|
||||||
{
|
{
|
||||||
|
@ -2376,6 +2382,8 @@ static void G_DrawOverheadMap(int32_t cposx, int32_t cposy, int32_t czoom, int16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_nofog();
|
||||||
|
|
||||||
setaspect_new();
|
setaspect_new();
|
||||||
|
|
||||||
for (TRAVERSE_CONNECT(p))
|
for (TRAVERSE_CONNECT(p))
|
||||||
|
|
Loading…
Reference in a new issue