Fix thumbnail rendering in CLI (#12129)

* Fix thumbnail rendering in CLI

* Remove OSMesa context flag

* Add stringified error message for glfwInit and glewInit

* micro refactor

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Ocraftyone
2026-02-10 00:08:22 -05:00
committed by GitHub
parent ed3f0e2898
commit abefb0e698
7 changed files with 36 additions and 32 deletions

View File

@@ -13,6 +13,7 @@ namespace Slic3r {
class TriangleMesh;
class Polygon;
class GLShaderProgram;
using Polygons = std::vector<Polygon, PointsAllocator<Polygon>>;
class BuildVolume;
@@ -177,8 +178,8 @@ namespace GUI {
const ColorRGBA& get_color() const { return m_render_data.geometry.color; }
void reset();
void render();
void render(const std::pair<size_t, size_t>& range);
void render(GLShaderProgram* shader = nullptr);
void render(const std::pair<size_t, size_t>& range, GLShaderProgram* shader = nullptr);
void render_instanced(unsigned int instances_vbo, unsigned int instances_count);
bool is_initialized() const { return vertices_count() > 0 && indices_count() > 0; }
@@ -260,4 +261,3 @@ namespace GUI {
} // namespace Slic3r
#endif // slic3r_GLModel_hpp_