astub.cpp: only call GL functions if we are in a GL mode

git-svn-id: https://svn.eduke32.com/eduke32@6709 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2018-02-27 00:52:28 +00:00
parent 322f1b46dd
commit 94b2fc68af

View file

@ -2509,15 +2509,21 @@ static int32_t DrawTiles(int32_t iTopLeft, int32_t iSelected, int32_t nXTiles, i
static inline void pushDisableFog(void)
{
#ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST)
{
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_FOG);
}
#endif
}
static inline void popDisableFog(void)
{
#ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST)
{
glPopAttrib();
}
#endif
}
@ -3264,7 +3270,10 @@ static int32_t OnSelectTile(int32_t tileNum)
setpolymost2dview();
#ifdef USE_OPENGL
if (getrendermode() >= REND_POLYMOST)
{
glEnable(GL_TEXTURE_2D);
}
#endif
clearview(-1);