1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Expose OpenGL debugging as a normal setting

This commit is contained in:
sfan5 2024-04-12 11:38:30 +02:00
parent ecfe9c5c2f
commit 7a6ca85081
11 changed files with 49 additions and 95 deletions

View file

@ -1177,7 +1177,9 @@ void COGLES1Driver::setMaterial(const SMaterial &material)
//! prints error if an error happened.
bool COGLES1Driver::testGLError(int code)
{
#ifdef _DEBUG
if (!Params.DriverDebug)
return false;
GLenum g = glGetError();
switch (g) {
case GL_NO_ERROR:
@ -1201,11 +1203,7 @@ bool COGLES1Driver::testGLError(int code)
os::Printer::log("GL_OUT_OF_MEMORY", core::stringc(code).c_str(), ELL_ERROR);
break;
};
// _IRR_DEBUG_BREAK_IF(true);
return true;
#else
return false;
#endif
}
//! sets the needed renderstates