mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 13:25:56 +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) {
|
for (auto v = OpenGLVersions::core.rbegin(); v != OpenGLVersions::core.rend(); ++v) {
|
||||||
wxGLContextAttrs attrs;
|
wxGLContextAttrs attrs;
|
||||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
#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)
|
if (m_debug_enabled)
|
||||||
attrs.DebugCtx();
|
attrs.DebugCtx();
|
||||||
attrs.EndList();
|
attrs.EndList();
|
||||||
#else
|
#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
|
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||||
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
||||||
if (m_context->IsOK()) {
|
if (m_context->IsOK()) {
|
||||||
@ -456,12 +456,12 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
|||||||
wxLogNull logNo;
|
wxLogNull logNo;
|
||||||
wxGLContextAttrs attrs;
|
wxGLContextAttrs attrs;
|
||||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
#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)
|
if (m_debug_enabled)
|
||||||
attrs.DebugCtx();
|
attrs.DebugCtx();
|
||||||
attrs.EndList();
|
attrs.EndList();
|
||||||
#else
|
#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
|
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||||
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
m_context = new wxGLContext(&canvas, nullptr, &attrs);
|
||||||
if (!m_context->IsOK()) {
|
if (!m_context->IsOK()) {
|
||||||
@ -477,6 +477,7 @@ wxGLContext* OpenGLManager::init_glcontext(wxGLCanvas& canvas)
|
|||||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||||
if (m_context == nullptr) {
|
if (m_context == nullptr) {
|
||||||
wxGLContextAttrs attrs;
|
wxGLContextAttrs attrs;
|
||||||
|
attrs.PlatformDefaults();
|
||||||
if (m_debug_enabled)
|
if (m_debug_enabled)
|
||||||
attrs.DebugCtx();
|
attrs.DebugCtx();
|
||||||
attrs.EndList();
|
attrs.EndList();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user