Tech ENABLE_WARNING_TEXTURE_REMOVAL set as default

This commit is contained in:
enricoturri1966 2021-05-10 16:05:16 +02:00
parent ca8a42c8b1
commit 426d2cd725
3 changed files with 0 additions and 404 deletions

View file

@ -295,7 +295,6 @@ class GLCanvas3D
bool matches(double z) const { return this->z == z; }
};
#if ENABLE_WARNING_TEXTURE_REMOVAL
enum class EWarning {
ObjectOutside,
ToolpathOutside,
@ -303,46 +302,6 @@ class GLCanvas3D
SomethingNotShown,
ObjectClashed
};
#else
class WarningTexture : public GUI::GLTexture
{
public:
WarningTexture();
enum Warning {
ObjectOutside,
ToolpathOutside,
SlaSupportsOutside,
SomethingNotShown,
ObjectClashed
};
// Sets a warning of the given type to be active/inactive. If several warnings are active simultaneously,
// only the last one is shown (decided by the order in the enum above).
void activate(WarningTexture::Warning warning, bool state, const GLCanvas3D& canvas);
void render(const GLCanvas3D& canvas) const;
// function used to get an information for rescaling of the warning
void msw_rescale(const GLCanvas3D& canvas);
private:
static const unsigned char Background_Color[3];
static const unsigned char Opacity;
int m_original_width;
int m_original_height;
// information for rescaling of the warning legend
std::string m_msg_text = "";
bool m_is_colored_red{false};
// Information about which warnings are currently active.
std::vector<Warning> m_warnings;
// Generates the texture with given text.
bool generate(const std::string& msg, const GLCanvas3D& canvas, bool compress, bool red_colored = false);
};
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
#if ENABLE_RENDER_STATISTICS
class RenderStats
@ -440,9 +399,6 @@ private:
std::unique_ptr<RetinaHelper> m_retina_helper;
#endif
bool m_in_render;
#if !ENABLE_WARNING_TEXTURE_REMOVAL
WarningTexture m_warning_texture;
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
wxTimer m_timer;
LayersEditing m_layers_editing;
Mouse m_mouse;
@ -814,9 +770,6 @@ private:
#endif // ENABLE_RENDER_SELECTION_CENTER
void _check_and_update_toolbar_icon_scale() const;
void _render_overlays() const;
#if !ENABLE_WARNING_TEXTURE_REMOVAL
void _render_warning_texture() const;
#endif // !ENABLE_WARNING_TEXTURE_REMOVAL
void _render_volumes_for_picking() const;
void _render_current_gizmo() const;
void _render_gizmos_overlay() const;
@ -869,17 +822,10 @@ private:
void _load_sla_shells();
void _update_toolpath_volumes_outside_state();
void _update_sla_shells_outside_state();
#if ENABLE_WARNING_TEXTURE_REMOVAL
void _set_warning_notification_if_needed(EWarning warning);
// generates a warning notification containing the given message
void _set_warning_notification(EWarning warning, bool state);
#else
void _show_warning_texture_if_needed(WarningTexture::Warning warning);
// generates a warning texture containing the given message
void _set_warning_texture(WarningTexture::Warning warning, bool state);
#endif // ENABLE_WARNING_TEXTURE_REMOVAL
bool _is_any_volume_outside() const;