mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Don't enable fog in polymost_printext256() and when drawing tile view in M32.
The new "r_usenewshading 2" mode could darken these otherwise. git-svn-id: https://svn.eduke32.com/eduke32@3302 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
922aa3ca8b
commit
5bda3a6ebf
2 changed files with 25 additions and 3 deletions
|
@ -6074,6 +6074,12 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba
|
|||
bglDisable(GL_ALPHA_TEST);
|
||||
bglDepthMask(GL_FALSE); // disable writing to the z-buffer
|
||||
|
||||
bglPushAttrib(GL_POLYGON_BIT|GL_ENABLE_BIT);
|
||||
// XXX: Don't fogify the OSD text in Mapster32 with r_usenewshading=2.
|
||||
bglDisable(GL_FOG);
|
||||
// We want to have readable text in wireframe mode, too:
|
||||
bglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
|
||||
if (backcol >= 0)
|
||||
{
|
||||
bglColor4ub(b.r,b.g,b.b,255);
|
||||
|
@ -6087,9 +6093,6 @@ int32_t polymost_printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t ba
|
|||
bglEnd();
|
||||
}
|
||||
|
||||
bglPushAttrib(GL_POLYGON_BIT); // we want to have readable text in wireframe mode, too
|
||||
bglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
|
||||
bglEnable(GL_TEXTURE_2D);
|
||||
bglEnable(GL_BLEND);
|
||||
bglColor4ub(p.r,p.g,p.b,255);
|
||||
|
|
|
@ -3082,6 +3082,21 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i
|
|||
} while (0)
|
||||
|
||||
|
||||
static inline void pushDisableFog(void)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
bglPushAttrib(GL_ENABLE_BIT);
|
||||
bglDisable(GL_FOG);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void popDisableFog(void)
|
||||
{
|
||||
#ifdef USE_OPENGL
|
||||
bglPopAttrib();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int32_t m32gettile(int32_t idInitialTile)
|
||||
{
|
||||
int32_t gap, temp, zoomsz;
|
||||
|
@ -3095,6 +3110,8 @@ static int32_t m32gettile(int32_t idInitialTile)
|
|||
int32_t noTilesMarked=1;
|
||||
int32_t mark_lastk = -1;
|
||||
|
||||
pushDisableFog();
|
||||
|
||||
// Enable following line for testing. I couldn't work out how to change vidmode on the fly
|
||||
// s_Zoom = NUM_ZOOMS - 1;
|
||||
|
||||
|
@ -3610,6 +3627,8 @@ static int32_t m32gettile(int32_t idInitialTile)
|
|||
keystatus[KEYSC_ESC] = 0;
|
||||
keystatus[KEYSC_ENTER] = 0;
|
||||
|
||||
popDisableFog();
|
||||
|
||||
return idSelectedTile;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue