Workaround core context issues

This commit is contained in:
mittorn 2023-10-05 03:32:37 +03:00 committed by Alibek Omarov
parent 676526a518
commit eb23b226cc
2 changed files with 3 additions and 6 deletions

View File

@ -1418,7 +1418,7 @@ static gl_texture_t *GL_AllocTexture( const char *name, texFlags_t flags )
// copy initial params
Q_strncpy( tex->name, name, sizeof( tex->name ));
if( FBitSet( flags, TF_SKYSIDE ))
if( FBitSet( flags, TF_SKYSIDE ) && glConfig.context != CONTEXT_TYPE_GL_CORE )
tex->texnum = tr.skyboxbasenum++;
else
{

View File

@ -761,11 +761,8 @@ void EmitWaterPolys( msurface_t *warp, qboolean reverse )
float s, t, os, ot;
glpoly_t *p;
int i;
#ifndef XASH_GLES
const qboolean useQuads = FBitSet( warp->flags, SURF_DRAWTURB_QUADS );
#else
const qboolean useQuads = false; // TODO: figure out why
#endif
const qboolean useQuads = FBitSet( warp->flags, SURF_DRAWTURB_QUADS ) && glConfig.context == CONTEXT_TYPE_GL;
if( !warp->polys ) return;