Tech ENABLE_TEXTURED_VOLUMES - OpenGL check macros moved from 3DScene.hpp to OpenGLManager.hpp

This commit is contained in:
enricoturri1966 2022-01-03 11:00:42 +01:00
parent 36ce076de9
commit de906bd006
2 changed files with 20 additions and 0 deletions

View File

@ -11,11 +11,13 @@
#include "GLModel.hpp"
#if ENABLE_TEXTURED_VOLUMES
#include "GLTexture.hpp"
#include "OpenGLManager.hpp"
#endif // ENABLE_TEXTURED_VOLUMES
#include <functional>
#include <optional>
#if !ENABLE_TEXTURED_VOLUMES
#ifndef NDEBUG
#define HAS_GLSAFE
#endif // NDEBUG
@ -30,6 +32,7 @@
#define glsafe(cmd) cmd
#define glcheck()
#endif // HAS_GLSAFE
#endif // !ENABLE_TEXTURED_VOLUMES
namespace Slic3r {
class SLAPrintObject;

View File

@ -3,6 +3,23 @@
#include "GLShadersManager.hpp"
#if ENABLE_TEXTURED_VOLUMES
#ifndef NDEBUG
#define HAS_GLSAFE
#endif // NDEBUG
#ifdef HAS_GLSAFE
extern void glAssertRecentCallImpl(const char* file_name, unsigned int line, const char* function_name);
inline void glAssertRecentCall() { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); }
#define glsafe(cmd) do { cmd; glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
#define glcheck() do { glAssertRecentCallImpl(__FILE__, __LINE__, __FUNCTION__); } while (false)
#else // HAS_GLSAFE
inline void glAssertRecentCall() { }
#define glsafe(cmd) cmd
#define glcheck()
#endif // HAS_GLSAFE
#endif // ENABLE_TEXTURED_VOLUMES
class wxWindow;
class wxGLCanvas;
class wxGLContext;