imgui: Fix ENABLE_IMGUI, disable on OS X for now

This commit is contained in:
Vojtech Kral 2018-11-27 11:28:00 +01:00
parent db4ceaa5fa
commit 2585e3103d
3 changed files with 11 additions and 11 deletions

View file

@ -34,7 +34,7 @@
// Enables shortcut keys for gizmos // Enables shortcut keys for gizmos
#define ENABLE_GIZMOS_SHORTCUT (1 && ENABLE_1_42_0) #define ENABLE_GIZMOS_SHORTCUT (1 && ENABLE_1_42_0)
// Scene's GUI made using imgui library // Scene's GUI made using imgui library
#define ENABLE_IMGUI (1 && ENABLE_1_42_0) #define ENABLE_IMGUI (1 && !__APPLE__ && ENABLE_1_42_0)
#endif // _technologies_h_ #endif // _technologies_h_

View file

@ -139,7 +139,7 @@ public:
void render(const GLCanvas3D::Selection& selection) const { on_render(selection); } void render(const GLCanvas3D::Selection& selection) const { on_render(selection); }
void render_for_picking(const GLCanvas3D::Selection& selection) const { on_render_for_picking(selection); } void render_for_picking(const GLCanvas3D::Selection& selection) const { on_render_for_picking(selection); }
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
virtual void create_external_gizmo_widgets(wxWindow *parent); virtual void create_external_gizmo_widgets(wxWindow *parent);
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
@ -485,7 +485,7 @@ private:
bool is_mesh_update_necessary() const; bool is_mesh_update_necessary() const;
void update_mesh(); void update_mesh();
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
void render_tooltip_texture() const; void render_tooltip_texture() const;
mutable GLTexture m_tooltip_texture; mutable GLTexture m_tooltip_texture;
mutable GLTexture m_reset_texture; mutable GLTexture m_reset_texture;
@ -508,7 +508,7 @@ protected:
}; };
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
class GLGizmoCutPanel; class GLGizmoCutPanel;
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
@ -526,17 +526,17 @@ class GLGizmoCut : public GLGizmoBase
bool m_keep_upper; bool m_keep_upper;
bool m_keep_lower; bool m_keep_lower;
bool m_rotate_lower; bool m_rotate_lower;
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
GLGizmoCutPanel *m_panel; GLGizmoCutPanel *m_panel;
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
public: public:
explicit GLGizmoCut(GLCanvas3D& parent); explicit GLGizmoCut(GLCanvas3D& parent);
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
virtual void create_external_gizmo_widgets(wxWindow *parent); virtual void create_external_gizmo_widgets(wxWindow *parent);
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
protected: protected:

View file

@ -915,7 +915,7 @@ struct Plater::priv
// GUI elements // GUI elements
wxNotebook *notebook; wxNotebook *notebook;
Sidebar *sidebar; Sidebar *sidebar;
#ifndef ENABLE_IMGUI #if !ENABLE_IMGUI
wxPanel *panel3d; wxPanel *panel3d;
#endif // not ENABLE_IMGUI #endif // not ENABLE_IMGUI
wxGLCanvas *canvas3Dwidget; // TODO: Use GLCanvas3D when we can wxGLCanvas *canvas3Dwidget; // TODO: Use GLCanvas3D when we can
@ -1043,7 +1043,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
})) }))
, notebook(new wxNotebook(q, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM)) , notebook(new wxNotebook(q, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM))
, sidebar(new Sidebar(q)) , sidebar(new Sidebar(q))
#ifdef ENABLE_IMGUI #if ENABLE_IMGUI
, canvas3Dwidget(GLCanvas3DManager::create_wxglcanvas(notebook)) , canvas3Dwidget(GLCanvas3DManager::create_wxglcanvas(notebook))
#else #else
, panel3d(new wxPanel(notebook, wxID_ANY)) , panel3d(new wxPanel(notebook, wxID_ANY))
@ -1076,7 +1076,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
this->canvas3D = _3DScene::get_canvas(this->canvas3Dwidget); this->canvas3D = _3DScene::get_canvas(this->canvas3Dwidget);
this->canvas3D->allow_multisample(GLCanvas3DManager::can_multisample()); this->canvas3D->allow_multisample(GLCanvas3DManager::can_multisample());
#ifdef ENABLE_IMGUI #if ENABLE_IMGUI
notebook->AddPage(canvas3Dwidget, _(L("3D"))); notebook->AddPage(canvas3Dwidget, _(L("3D")));
#else #else
auto *panel3dsizer = new wxBoxSizer(wxVERTICAL); auto *panel3dsizer = new wxBoxSizer(wxVERTICAL);
@ -1935,7 +1935,7 @@ void Plater::priv::fix_through_netfabb(const int obj_idx)
void Plater::priv::on_notebook_changed(wxBookCtrlEvent&) void Plater::priv::on_notebook_changed(wxBookCtrlEvent&)
{ {
const auto current_id = notebook->GetCurrentPage()->GetId(); const auto current_id = notebook->GetCurrentPage()->GetId();
#ifdef ENABLE_IMGUI #if ENABLE_IMGUI
if (current_id == canvas3Dwidget->GetId()) { if (current_id == canvas3Dwidget->GetId()) {
#else #else
if (current_id == panel3d->GetId()) { if (current_id == panel3d->GetId()) {