mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 09:35:58 +08:00
Tech ENABLE_TEXTURED_VOLUMES - OpenGL check macros moved from 3DScene.hpp to OpenGLManager.hpp
This commit is contained in:
parent
36ce076de9
commit
de906bd006
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user