Tech ENABLE_COLOR_CLASSES set as default

This commit is contained in:
enricoturri1966 2022-01-14 08:19:00 +01:00
parent fab35e8aa4
commit 6201dad245
50 changed files with 18 additions and 1500 deletions
src/slic3r/GUI

View file

@ -3,9 +3,7 @@
#include "libslic3r/Point.hpp"
#include "libslic3r/BoundingBox.hpp"
#if ENABLE_COLOR_CLASSES
#include "libslic3r/Color.hpp"
#endif // ENABLE_COLOR_CLASSES
#include <vector>
#include <string>
@ -36,11 +34,7 @@ namespace GUI {
unsigned int vbo_id{ 0 };
unsigned int ibo_id{ 0 };
size_t indices_count{ 0 };
#if ENABLE_COLOR_CLASSES
ColorRGBA color;
#else
std::array<float, 4> color{ 1.0f, 1.0f, 1.0f, 1.0f };
#endif // ENABLE_COLOR_CLASSES
};
struct InitializationData
@ -51,11 +45,7 @@ namespace GUI {
std::vector<Vec3f> positions;
std::vector<Vec3f> normals;
std::vector<unsigned int> indices;
#if ENABLE_COLOR_CLASSES
ColorRGBA color;
#else
std::array<float, 4> color{ 1.0f, 1.0f, 1.0f, 1.0f };
#endif // ENABLE_COLOR_CLASSES
};
std::vector<Entity> entities;
@ -85,11 +75,7 @@ namespace GUI {
bool init_from_file(const std::string& filename);
// if entity_id == -1 set the color of all entities
#if ENABLE_COLOR_CLASSES
void set_color(int entity_id, const ColorRGBA& color);
#else
void set_color(int entity_id, const std::array<float, 4>& color);
#endif // ENABLE_COLOR_CLASSES
void reset();
void render() const;