ref: gl: only check for GL errors if both gl_check_errors and developer mode are enabled

This commit is contained in:
Alibek Omarov
2026-03-11 08:39:58 +05:00
parent f7b389b7cd
commit 4e9a2dace0

View File

@@ -1351,12 +1351,12 @@ obsolete
*/
void GL_CheckForErrors_( const char *filename, const int fileline )
{
int err;
if( !gl_check_errors.value )
if( !gl_check_errors.value || !gpGlobals->developer )
return;
if(( err = pglGetError( )) == GL_NO_ERROR )
int err = pglGetError( );
if( err == GL_NO_ERROR )
return;
gEngfuncs.Con_Printf( S_OPENGL_ERROR "%s (at %s:%i)\n", GL_ErrorString( err ), filename, fileline );