mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Tech ENABLE_HACK_CLOSING_ON_OSX_10_9_5 set as default
This commit is contained in:
parent
8f8217723c
commit
4146fd337a
3 changed files with 2 additions and 37 deletions
|
@ -27,27 +27,10 @@
|
||||||
#define ENABLE_GCODE_VIEWER_STATISTICS 0
|
#define ENABLE_GCODE_VIEWER_STATISTICS 0
|
||||||
// Enable G-Code viewer comparison between toolpaths height and width detected from gcode and calculated at gcode generation
|
// Enable G-Code viewer comparison between toolpaths height and width detected from gcode and calculated at gcode generation
|
||||||
#define ENABLE_GCODE_VIEWER_DATA_CHECKING 0
|
#define ENABLE_GCODE_VIEWER_DATA_CHECKING 0
|
||||||
|
|
||||||
|
|
||||||
//=================
|
|
||||||
// 2.2.0.rc1 techs
|
|
||||||
//=================
|
|
||||||
#define ENABLE_2_2_0_RC1 1
|
|
||||||
|
|
||||||
// Enable hack to remove crash when closing on OSX 10.9.5
|
|
||||||
#define ENABLE_HACK_CLOSING_ON_OSX_10_9_5 (1 && ENABLE_2_2_0_RC1)
|
|
||||||
|
|
||||||
|
|
||||||
//====================
|
|
||||||
// 2.3.0.alpha1 techs
|
|
||||||
//====================
|
|
||||||
#define ENABLE_2_3_0_ALPHA1 1
|
|
||||||
|
|
||||||
// Enable rendering of objects using environment map
|
// Enable rendering of objects using environment map
|
||||||
#define ENABLE_ENVIRONMENT_MAP (0 && ENABLE_2_3_0_ALPHA1)
|
#define ENABLE_ENVIRONMENT_MAP 0
|
||||||
|
|
||||||
// Enable smoothing of objects normals
|
// Enable smoothing of objects normals
|
||||||
#define ENABLE_SMOOTH_NORMALS (0 && ENABLE_2_3_0_ALPHA1)
|
#define ENABLE_SMOOTH_NORMALS 0
|
||||||
|
|
||||||
|
|
||||||
//====================
|
//====================
|
||||||
|
|
|
@ -14,14 +14,10 @@
|
||||||
#include <wx/glcanvas.h>
|
#include <wx/glcanvas.h>
|
||||||
#include <wx/msgdlg.h>
|
#include <wx/msgdlg.h>
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
||||||
#include <wx/platinfo.h>
|
#include <wx/platinfo.h>
|
||||||
#endif // __APPLE__
|
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include "../Utils/MacDarkMode.hpp"
|
#include "../Utils/MacDarkMode.hpp"
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
||||||
|
@ -202,34 +198,26 @@ bool OpenGLManager::s_compressed_textures_supported = false;
|
||||||
OpenGLManager::EMultisampleState OpenGLManager::s_multisample = OpenGLManager::EMultisampleState::Unknown;
|
OpenGLManager::EMultisampleState OpenGLManager::s_multisample = OpenGLManager::EMultisampleState::Unknown;
|
||||||
OpenGLManager::EFramebufferType OpenGLManager::s_framebuffers_type = OpenGLManager::EFramebufferType::Unknown;
|
OpenGLManager::EFramebufferType OpenGLManager::s_framebuffers_type = OpenGLManager::EFramebufferType::Unknown;
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
||||||
OpenGLManager::OSInfo OpenGLManager::s_os_info;
|
OpenGLManager::OSInfo OpenGLManager::s_os_info;
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
|
|
||||||
OpenGLManager::~OpenGLManager()
|
OpenGLManager::~OpenGLManager()
|
||||||
{
|
{
|
||||||
m_shaders_manager.shutdown();
|
m_shaders_manager.shutdown();
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// This is an ugly hack needed to solve the crash happening when closing the application on OSX 10.9.5 with newer wxWidgets
|
// This is an ugly hack needed to solve the crash happening when closing the application on OSX 10.9.5 with newer wxWidgets
|
||||||
// The crash is triggered inside wxGLContext destructor
|
// The crash is triggered inside wxGLContext destructor
|
||||||
if (s_os_info.major != 10 || s_os_info.minor != 9 || s_os_info.micro != 5)
|
if (s_os_info.major != 10 || s_os_info.minor != 9 || s_os_info.micro != 5)
|
||||||
{
|
{
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
|
|
||||||
if (m_context != nullptr)
|
if (m_context != nullptr)
|
||||||
delete m_context;
|
delete m_context;
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
}
|
}
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OpenGLManager::init_gl()
|
bool OpenGLManager::init_gl()
|
||||||
|
@ -286,14 +274,12 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
||||||
if (m_context == nullptr) {
|
if (m_context == nullptr) {
|
||||||
m_context = new wxGLContext(&canvas);
|
m_context = new wxGLContext(&canvas);
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
||||||
s_os_info.major = wxPlatformInfo::Get().GetOSMajorVersion();
|
s_os_info.major = wxPlatformInfo::Get().GetOSMajorVersion();
|
||||||
s_os_info.minor = wxPlatformInfo::Get().GetOSMinorVersion();
|
s_os_info.minor = wxPlatformInfo::Get().GetOSMinorVersion();
|
||||||
s_os_info.micro = wxPlatformInfo::Get().GetOSMicroVersion();
|
s_os_info.micro = wxPlatformInfo::Get().GetOSMicroVersion();
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
}
|
}
|
||||||
return m_context;
|
return m_context;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ public:
|
||||||
void detect() const;
|
void detect() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
||||||
struct OSInfo
|
struct OSInfo
|
||||||
|
@ -61,7 +60,6 @@ public:
|
||||||
int micro{ 0 };
|
int micro{ 0 };
|
||||||
};
|
};
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class EMultisampleState : unsigned char
|
enum class EMultisampleState : unsigned char
|
||||||
|
@ -75,12 +73,10 @@ private:
|
||||||
wxGLContext* m_context{ nullptr };
|
wxGLContext* m_context{ nullptr };
|
||||||
GLShadersManager m_shaders_manager;
|
GLShadersManager m_shaders_manager;
|
||||||
static GLInfo s_gl_info;
|
static GLInfo s_gl_info;
|
||||||
#if ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
// Part of hack to remove crash when closing the application on OSX 10.9.5 when building against newer wxWidgets
|
||||||
static OSInfo s_os_info;
|
static OSInfo s_os_info;
|
||||||
#endif //__APPLE__
|
#endif //__APPLE__
|
||||||
#endif // ENABLE_HACK_CLOSING_ON_OSX_10_9_5
|
|
||||||
static bool s_compressed_textures_supported;
|
static bool s_compressed_textures_supported;
|
||||||
static EMultisampleState s_multisample;
|
static EMultisampleState s_multisample;
|
||||||
static EFramebufferType s_framebuffers_type;
|
static EFramebufferType s_framebuffers_type;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue