tiles.cpp: fix texcache.cpp:CLEAR_GL_ERRORS() hang on some drivers when trying to create GL textures for tiles when we have no GL context.

This could occur when returning to 2D mode from 3D mode in Mapster32 as videoSet2DMode() does not affect the result of videoGetRenderMode() despite destroying the GL context.

git-svn-id: https://svn.eduke32.com/eduke32@6906 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
pogokeen 2018-05-26 22:11:25 +00:00
parent db1220cd11
commit 014cf67753

View file

@ -591,7 +591,8 @@ bool tileLoad(int16_t tileNum)
tileLoadData(tileNum, dasiz, (char *) waloff[tileNum]);
#ifdef USE_OPENGL
if (videoGetRenderMode() >= REND_POLYMOST)
if (videoGetRenderMode() >= REND_POLYMOST &&
in3dmode())
{
//POGOTODO: this type stuff won't be necessary down the line -- review this
int type;