From 8f8217723ced26cd3d24ed8a7a31d49959e786fd Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 25 Feb 2021 13:38:52 +0100 Subject: [PATCH] Tech ENABLE_OPENGL_ERROR_LOGGING set as default --- src/libslic3r/Technologies.hpp | 3 --- src/slic3r/GUI/3DScene.cpp | 7 +++---- src/slic3r/GUI/3DScene.hpp | 5 +---- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index fe6c349b4..a456b3d85 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -49,9 +49,6 @@ // Enable smoothing of objects normals #define ENABLE_SMOOTH_NORMALS (0 && ENABLE_2_3_0_ALPHA1) -// Enable error logging for OpenGL calls when SLIC3R_LOGLEVEL >= 5 -#define ENABLE_OPENGL_ERROR_LOGGING (1 && ENABLE_2_3_0_ALPHA1) - //==================== // 2.3.0.alpha3 techs diff --git a/src/slic3r/GUI/3DScene.cpp b/src/slic3r/GUI/3DScene.cpp index 3aafc9a3b..04301061d 100644 --- a/src/slic3r/GUI/3DScene.cpp +++ b/src/slic3r/GUI/3DScene.cpp @@ -39,12 +39,11 @@ #ifdef HAS_GLSAFE void glAssertRecentCallImpl(const char* file_name, unsigned int line, const char* function_name) { -#if defined(NDEBUG) && ENABLE_OPENGL_ERROR_LOGGING - // In release mode, if OpenGL debugging was forced by ENABLE_OPENGL_ERROR_LOGGING, only show - // OpenGL errors if sufficiently high loglevel. +#if defined(NDEBUG) + // In release mode, only show OpenGL errors if sufficiently high loglevel. if (Slic3r::get_logging_level() < 5) return; -#endif // ENABLE_OPENGL_ERROR_LOGGING +#endif // NDEBUG GLenum err = glGetError(); if (err == GL_NO_ERROR) diff --git a/src/slic3r/GUI/3DScene.hpp b/src/slic3r/GUI/3DScene.hpp index 6565d5c09..e4d9c6067 100644 --- a/src/slic3r/GUI/3DScene.hpp +++ b/src/slic3r/GUI/3DScene.hpp @@ -10,10 +10,7 @@ #include -#if ENABLE_OPENGL_ERROR_LOGGING || ! defined(NDEBUG) - #define HAS_GLSAFE -#endif - +#define HAS_GLSAFE #ifdef HAS_GLSAFE extern void glAssertRecentCallImpl(const char *file_name, unsigned int line, const char *function_name); inline void glAssertRecentCall() { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); }