diff -r 272c84c7c87e -r 98645c8e7704 src/gl/partrenderer.cpp --- a/src/gl/partrenderer.cpp Sun Feb 02 00:58:59 2020 +0200 +++ b/src/gl/partrenderer.cpp Thu Feb 06 20:33:05 2020 +0200 @@ -92,7 +92,7 @@ glEnable (GL_DEPTH_TEST); glShadeModel (GL_SMOOTH); glEnable (GL_MULTISAMPLE); - if (this->renderPreferences.lineAntiAliasing) + if (this->renderPreferences.lineAntiAliasing && this->renderPreferences.style != gl::RenderStyle::PickScene) { glEnable(GL_LINE_SMOOTH); glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); @@ -106,11 +106,20 @@ void PartRenderer::renderScene() { const QColor& backgroundColor = this->renderPreferences.backgroundColor; - glClearColor( - static_cast(backgroundColor.redF()), - static_cast(backgroundColor.greenF()), - static_cast(backgroundColor.blueF()), - 1.0f); + if (this->renderPreferences.style != gl::RenderStyle::PickScene) + { + glClearColor( + static_cast(backgroundColor.redF()), + static_cast(backgroundColor.greenF()), + static_cast(backgroundColor.blueF()), + 1.0f); + this->compiler->setUniform("useLighting", true); + } + else + { + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + this->compiler->setUniform("useLighting", false); + } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); glEnable(GL_POLYGON_OFFSET_FILL); @@ -139,6 +148,11 @@ this->setFragmentStyle(gl::FragmentStyle::RandomColors); this->renderAllArrays(); break; + case gl::RenderStyle::PickScene: + glLineWidth(3.0f); + this->setFragmentStyle(gl::FragmentStyle::Id); + this->renderAllArrays(); + break; case gl::RenderStyle::Wireframe: glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); this->setFragmentStyle(gl::FragmentStyle::Normal);