src/gl/partrenderer.cpp

changeset 40
30cb5e836736
parent 39
caac957e9834
child 44
c6114b3af3a6
equal deleted inserted replaced
39:caac957e9834 40:30cb5e836736
98 this->renderScene(); 98 this->renderScene();
99 } 99 }
100 100
101 void PartRenderer::renderScene() 101 void PartRenderer::renderScene()
102 { 102 {
103 glClearColor(0.8f, 0.8f, 0.8f, 1.0f); 103 const QColor& backgroundColor = this->renderPreferences.backgroundColor;
104 glClearColor(
105 static_cast<float>(backgroundColor.redF()),
106 static_cast<float>(backgroundColor.greenF()),
107 static_cast<float>(backgroundColor.blueF()),
108 1.0f);
104 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 109 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
105 glEnable(GL_DEPTH_TEST); 110 glEnable(GL_DEPTH_TEST);
106 glEnable(GL_POLYGON_OFFSET_FILL); 111 glEnable(GL_POLYGON_OFFSET_FILL);
107 glPolygonOffset(1.0f, 1.0f); 112 glPolygonOffset(1.0f, 1.0f);
108 switch (this->renderPreferences.style) 113 switch (this->renderPreferences.style)

mercurial