src/gl/partrenderer.cpp

changeset 150
b6cbba6e29a1
parent 120
8c9fff699241
child 189
815fbaae9cb2
equal deleted inserted replaced
148:e1ced2523cad 150:b6cbba6e29a1
36 QWidget* parent) : 36 QWidget* parent) :
37 QOpenGLWidget{parent}, 37 QOpenGLWidget{parent},
38 model{model}, 38 model{model},
39 documents{documents}, 39 documents{documents},
40 colorTable{colorTable}, 40 colorTable{colorTable},
41 compiler{new gl::Compiler{this->colorTable, this}} 41 compiler{new gl::Compiler{model, this->colorTable, this}}
42 { 42 {
43 this->setMouseTracking(true); 43 this->setMouseTracking(true);
44 connect(model, &Model::rowsInserted, [&]{ 44 connect(model, &Model::rowsInserted, [&]{
45 this->needBuild = true; 45 this->needBuild = true;
46 }); 46 });
115 115
116 void PartRenderer::renderScene() 116 void PartRenderer::renderScene()
117 { 117 {
118 if (this->needBuild) 118 if (this->needBuild)
119 { 119 {
120 this->compiler->build(this->model, this->documents, this->renderPreferences); 120 this->compiler->build(this->documents, this->renderPreferences);
121 this->needBuild = false; 121 this->needBuild = false;
122 } 122 }
123 this->checkForGLErrors(); 123 this->checkForGLErrors();
124 if (this->renderPreferences.lineAntiAliasing && this->renderPreferences.style != gl::RenderStyle::PickScene) 124 if (this->renderPreferences.lineAntiAliasing && this->renderPreferences.style != gl::RenderStyle::PickScene)
125 { 125 {

mercurial