Tech ENABLE_OPENGL_DEBUG_OPTION - Let option opengl-debug be always available to avoid error unknown option at startup
This commit is contained in:
parent
22b634ca1d
commit
e0c8ffc524
4 changed files with 4 additions and 13 deletions
|
@ -192,16 +192,14 @@ int CLI::run(int argc, char **argv)
|
|||
m_actions.erase(it);
|
||||
}
|
||||
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
#ifndef __APPLE__
|
||||
it = std::find(m_actions.begin(), m_actions.end(), "opengl-debug");
|
||||
if (it != m_actions.end()) {
|
||||
start_gui = true;
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
opengl_debug = true;
|
||||
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||
m_actions.erase(it);
|
||||
}
|
||||
#endif // __APPLE__
|
||||
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||
#else
|
||||
// are we starting as gcodeviewer ?
|
||||
for (auto it = m_actions.begin(); it != m_actions.end(); ++it) {
|
||||
|
|
|
@ -4311,13 +4311,11 @@ CLIActionsConfigDef::CLIActionsConfigDef()
|
|||
def->cli = "opengl-core";
|
||||
def->set_default_value(new ConfigOptionString());
|
||||
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
def = this->add("opengl-debug", coBool);
|
||||
def->label = L("OpenGL debug output");
|
||||
def->tooltip = L("Activate OpenGL debug output on graphic cards which support it");
|
||||
def->cli = "opengl-debug";
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
#endif // ENABLE_OPENGL_DEBUG_OPTION
|
||||
#endif // ENABLE_GL_CORE_PROFILE
|
||||
|
||||
def = this->add("slice", coBool);
|
||||
|
|
|
@ -66,11 +66,6 @@ const std::string& OpenGLManager::GLInfo::get_renderer() const
|
|||
return m_renderer;
|
||||
}
|
||||
|
||||
bool OpenGLManager::GLInfo::is_core_profile() const
|
||||
{
|
||||
return !GLEW_ARB_compatibility;
|
||||
}
|
||||
|
||||
bool OpenGLManager::GLInfo::is_mesa() const
|
||||
{
|
||||
return boost::icontains(m_version, "mesa");
|
||||
|
@ -392,7 +387,7 @@ bool OpenGLManager::init_gl()
|
|||
wxMessageBox(message, wxString("PrusaSlicer - ") + _L("Error loading shaders"), wxOK | wxICON_ERROR);
|
||||
}
|
||||
#if ENABLE_OPENGL_DEBUG_OPTION
|
||||
if (m_debug_enabled) {
|
||||
if (m_debug_enabled && GLEW_KHR_debug) {
|
||||
::glEnable(GL_DEBUG_OUTPUT);
|
||||
::glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
|
||||
::glDebugMessageCallback(CustomGLDebugOutput, nullptr);
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
const std::string& get_vendor() const;
|
||||
const std::string& get_renderer() const;
|
||||
|
||||
bool is_core_profile() const;
|
||||
bool is_core_profile() const { return m_core_profile; }
|
||||
void set_core_profile(bool value) { m_core_profile = value; }
|
||||
|
||||
bool is_mesa() const;
|
||||
|
|
Loading…
Reference in a new issue