Tech ENABLE_OPENGL_DEBUG_OPTION - Add new command line option '--opengl-debug' to allow users to force PrusaSlicer to output to console OpenGL related errors on graphics cards supporting it.

This commit is contained in:
enricoturri1966 2022-06-30 09:49:29 +02:00
parent bcbde32678
commit 38683ee221
7 changed files with 118 additions and 3 deletions
src/slic3r/GUI

View file

@ -848,7 +848,11 @@ std::string GUI_App::get_gl_info(bool for_github)
wxGLContext* GUI_App::init_glcontext(wxGLCanvas& canvas)
{
#if ENABLE_GL_CORE_PROFILE
#if ENABLE_OPENGL_DEBUG_OPTION
return m_opengl_mgr.init_glcontext(canvas, init_params != nullptr ? init_params->opengl_version : std::make_pair(0, 0), init_params->opengl_debug);
#else
return m_opengl_mgr.init_glcontext(canvas, init_params != nullptr ? init_params->opengl_version : std::make_pair(0, 0));
#endif // ENABLE_OPENGL_DEBUG_OPTION
#else
return m_opengl_mgr.init_glcontext(canvas);
#endif // ENABLE_GL_CORE_PROFILE