mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Code cleanup
This commit is contained in:
parent
be7b786fee
commit
7f267987cb
4 changed files with 4 additions and 386 deletions
|
@ -8,9 +8,7 @@
|
|||
#include "../../libslic3r/Utils.hpp"
|
||||
#include "../../libslic3r/Model.hpp"
|
||||
#include "../../slic3r/GUI/GLCanvas3DManager.hpp"
|
||||
//#################################################################################################################################
|
||||
#include "../../slic3r/GUI/GLTexture.hpp"
|
||||
//#################################################################################################################################
|
||||
|
||||
class wxBitmap;
|
||||
class wxWindow;
|
||||
|
@ -203,16 +201,10 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
//########################################################################################################################################3
|
||||
class LayersTexture
|
||||
//class GLTexture
|
||||
//########################################################################################################################################3
|
||||
{
|
||||
public:
|
||||
//########################################################################################################################################3
|
||||
LayersTexture() : width(0), height(0), levels(0), cells(0) {}
|
||||
// GLTexture() : width(0), height(0), levels(0), cells(0) {}
|
||||
//########################################################################################################################################3
|
||||
|
||||
// Texture data
|
||||
std::vector<char> data;
|
||||
|
@ -351,10 +343,7 @@ public:
|
|||
void release_geometry() { this->indexed_vertex_array.release_geometry(); }
|
||||
|
||||
/************************************************ Layer height texture ****************************************************/
|
||||
//########################################################################################################################################3
|
||||
std::shared_ptr<LayersTexture> layer_height_texture;
|
||||
// std::shared_ptr<GLTexture> layer_height_texture;
|
||||
//########################################################################################################################################3
|
||||
// Data to render this volume using the layer height texture
|
||||
LayerHeightTextureData layer_height_texture_data;
|
||||
|
||||
|
@ -452,36 +441,6 @@ private:
|
|||
|
||||
class _3DScene
|
||||
{
|
||||
//###################################################################################################################################################
|
||||
// class TextureBase
|
||||
// {
|
||||
// protected:
|
||||
// unsigned int m_tex_id;
|
||||
// unsigned int m_tex_width;
|
||||
// unsigned int m_tex_height;
|
||||
//
|
||||
// // generate() fills in m_data with the pixels, while finalize() moves the data to the GPU before rendering.
|
||||
// std::vector<unsigned char> m_data;
|
||||
//
|
||||
// public:
|
||||
// TextureBase() : m_tex_id(0), m_tex_width(0), m_tex_height(0) {}
|
||||
// virtual ~TextureBase() { _destroy_texture(); }
|
||||
//
|
||||
// // If not loaded, load the texture data into the GPU. Return a texture ID or 0 if the texture has zero size.
|
||||
// unsigned int finalize();
|
||||
//
|
||||
// unsigned int get_texture_id() const { return m_tex_id; }
|
||||
// unsigned int get_texture_width() const { return m_tex_width; }
|
||||
// unsigned int get_texture_height() const { return m_tex_height; }
|
||||
//
|
||||
// void reset_texture() { _destroy_texture(); }
|
||||
//
|
||||
// private:
|
||||
// void _destroy_texture();
|
||||
// };
|
||||
//###################################################################################################################################################
|
||||
|
||||
//###################################################################################################################################################
|
||||
class WarningTexture : public GUI::GLTexture
|
||||
{
|
||||
static const unsigned char Background_Color[3];
|
||||
|
@ -491,20 +450,6 @@ class _3DScene
|
|||
bool generate(const std::string& msg);
|
||||
};
|
||||
|
||||
// class WarningTexture : public TextureBase
|
||||
// {
|
||||
// static const unsigned char Background_Color[3];
|
||||
// static const unsigned char Opacity;
|
||||
//
|
||||
// public:
|
||||
// WarningTexture() : TextureBase() {}
|
||||
//
|
||||
// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet.
|
||||
// bool generate(const std::string& msg);
|
||||
// };
|
||||
//###################################################################################################################################################
|
||||
|
||||
//###################################################################################################################################################
|
||||
class LegendTexture : public GUI::GLTexture
|
||||
{
|
||||
static const int Px_Title_Offset = 5;
|
||||
|
@ -520,25 +465,6 @@ class _3DScene
|
|||
bool generate(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
|
||||
};
|
||||
|
||||
// class LegendTexture : public TextureBase
|
||||
// {
|
||||
// static const unsigned int Px_Title_Offset = 5;
|
||||
// static const unsigned int Px_Text_Offset = 5;
|
||||
// static const unsigned int Px_Square = 20;
|
||||
// static const unsigned int Px_Square_Contour = 1;
|
||||
// static const unsigned int Px_Border = Px_Square / 2;
|
||||
// static const unsigned char Squares_Border_Color[3];
|
||||
// static const unsigned char Background_Color[3];
|
||||
// static const unsigned char Opacity;
|
||||
//
|
||||
// public:
|
||||
// LegendTexture() : TextureBase() {}
|
||||
//
|
||||
// // Generate a texture data, but don't load it into the GPU yet, as the glcontext may not be valid yet.
|
||||
// bool generate(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
|
||||
// };
|
||||
//###################################################################################################################################################
|
||||
|
||||
static LegendTexture s_legend_texture;
|
||||
static WarningTexture s_warning_texture;
|
||||
static GUI::GLCanvas3DManager s_canvas_mgr;
|
||||
|
@ -644,33 +570,19 @@ public:
|
|||
|
||||
// generates the legend texture in dependence of the current shown view type
|
||||
static void generate_legend_texture(const GCodePreviewData& preview_data, const std::vector<float>& tool_colors);
|
||||
//###################################################################################################################################################
|
||||
// static unsigned int get_legend_texture_width();
|
||||
// static unsigned int get_legend_texture_height();
|
||||
//###################################################################################################################################################
|
||||
|
||||
static void reset_legend_texture();
|
||||
//###################################################################################################################################################
|
||||
|
||||
static unsigned int get_legend_texture_id();
|
||||
static int get_legend_texture_width();
|
||||
static int get_legend_texture_height();
|
||||
// static unsigned int finalize_legend_texture();
|
||||
//###################################################################################################################################################
|
||||
|
||||
//###################################################################################################################################################
|
||||
// static unsigned int get_warning_texture_width();
|
||||
// static unsigned int get_warning_texture_height();
|
||||
//###################################################################################################################################################
|
||||
|
||||
// generates a warning texture containing the given message
|
||||
static void generate_warning_texture(const std::string& msg);
|
||||
static void reset_warning_texture();
|
||||
//###################################################################################################################################################
|
||||
|
||||
static unsigned int get_warning_texture_id();
|
||||
static int get_warning_texture_width();
|
||||
static int get_warning_texture_height();
|
||||
// static unsigned int finalize_warning_texture();
|
||||
//###################################################################################################################################################
|
||||
|
||||
static void thick_lines_to_verts(const Lines& lines, const std::vector<double>& widths, const std::vector<double>& heights, bool closed, double top_z, GLVolume& volume);
|
||||
static void thick_lines_to_verts(const Lines3& lines, const std::vector<double>& widths, const std::vector<double>& heights, bool closed, GLVolume& volume);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue