src/gl/partrenderer.cpp

changeset 234
87ee9824210b
parent 232
8efa3a33172e
child 237
10a6298f636f
equal deleted inserted replaced
233:5509bec02c81 234:87ee9824210b
42 documents{documents}, 42 documents{documents},
43 colorTable{colorTable} 43 colorTable{colorTable}
44 { 44 {
45 this->setMouseTracking(true); 45 this->setMouseTracking(true);
46 this->setFocusPolicy(Qt::WheelFocus); 46 this->setFocusPolicy(Qt::WheelFocus);
47 QSurfaceFormat surfaceFormat;
48 surfaceFormat.setSamples(8);
49 this->setFormat(surfaceFormat);
47 connect(model, &Model::rowsInserted, [&]{ 50 connect(model, &Model::rowsInserted, [&]{
48 this->needBuild = true; 51 this->needBuild = true;
49 }); 52 });
50 connect(model, &Model::rowsRemoved, [&]{ this->needBuild = true; }); 53 connect(model, &Model::rowsRemoved, [&]{ this->needBuild = true; });
51 const auto updateLayerMvpMatrix = [this]{ 54 const auto updateLayerMvpMatrix = [this]{
133 this->renderScene(); 136 this->renderScene();
134 for (RenderLayer* layer : this->activeRenderLayers) { 137 for (RenderLayer* layer : this->activeRenderLayers) {
135 layer->paintGL(); 138 layer->paintGL();
136 } 139 }
137 QPainter painter{this}; 140 QPainter painter{this};
141 painter.setRenderHint(QPainter::Antialiasing);
138 for (RenderLayer* layer : this->activeRenderLayers) { 142 for (RenderLayer* layer : this->activeRenderLayers) {
139 layer->overpaint(&painter); 143 layer->overpaint(&painter);
140 } 144 }
141 } 145 }
142 146

mercurial