--- a/src/gl/compiler.h Tue Nov 02 15:43:57 2021 +0200 +++ b/src/gl/compiler.h Thu Mar 03 11:42:52 2022 +0200 @@ -40,9 +40,9 @@ { Q_OBJECT public: - Compiler(const ldraw::ColorTable& colorTable, QObject* parent); + Compiler(Model* model, const ldraw::ColorTable& colorTable, QObject* parent); ~Compiler(); - void build(Model* model, DocumentManager* context, const RenderPreferences& preferences); + void build(DocumentManager* context, const RenderPreferences& preferences); std::size_t vertexCount(gl::ArrayClass arrayClass) const; QColor getColorForPolygon(const gl::Polygon& polygon, const RenderPreferences& preferences); glm::vec3 modelCenter() const; @@ -85,6 +85,7 @@ glm::int32 selected = 0; }; void buildPolygon(Polygon polygon, std::vector<Vertex>* vboData, const gl::RenderPreferences& preferences); + Model* const model; std::size_t storedVertexCounts[gl::NUM_POLYGON_TYPES] = {0}; bool initialized = false; BoundingBox boundingBox;