mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 09:25:57 +08:00
Tech ENABLE_GL_CORE_PROFILE - Added call to method PlatformDefaults() to the wxGLContextAttrs used to generate wxWidgets OpenGL context
This commit is contained in:
parent
4353c626fc
commit
91b3c3dd1d
@ -430,12 +430,12 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
||||
for (auto v = OpenGLVersions::core.rbegin(); v != OpenGLVersions::core.rend(); ++v) {
|
||||
wxGLContextAttrs attrs;
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
attrs.MajorVersion(v->first).MinorVersion(v->second).CoreProfile().ForwardCompatible();
|
||||
attrs.PlatformDefaults().MajorVersion(v->first).MinorVersion(v->second).CoreProfile().ForwardCompatible();
|
||||
if (m_debug_enabled)
|
||||
attrs.DebugCtx();
|
||||
attrs.EndList();
|
||||
#else
|
||||
attrs.MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible().EndList();
|
||||
attrs.PlatformDefaults().MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible().EndList();
|
||||
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
||||
if (m_context->IsOK()) {
|
||||
@ -456,12 +456,12 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
||||
wxLogNull logNo;
|
||||
wxGLContextAttrs attrs;
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
attrs.MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible();
|
||||
attrs.PlatformDefaults().MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible();
|
||||
if (m_debug_enabled)
|
||||
attrs.DebugCtx();
|
||||
attrs.EndList();
|
||||
#else
|
||||
attrs.MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible().EndList();
|
||||
attrs.PlatformDefaults().MajorVersion(gl_major).MinorVersion(gl_minor).CoreProfile().ForwardCompatible().EndList();
|
||||
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
||||
if (!m_context->IsOK()) {
|
||||
@ -477,6 +477,7 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
if (m_context == nullptr) {
|
||||
wxGLContextAttrs attrs;
|
||||
attrs.PlatformDefaults();
|
||||
if (m_debug_enabled)
|
||||
attrs.DebugCtx();
|
||||
attrs.EndList();
|
||||
|
Loading…
x
Reference in New Issue
Block a user