diff -r a0ddbc9a4e77 -r 0fd926ebb03b src/gl/partrenderer.cpp --- a/src/gl/partrenderer.cpp Tue Jun 28 14:53:22 2022 +0300 +++ b/src/gl/partrenderer.cpp Tue Jun 28 17:35:56 2022 +0300 @@ -187,12 +187,13 @@ } else { - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClearColor(1.0f, 1.0f, 1.0f, 1.0f); gl::setShaderUniform(&this->shaders, "useLighting", GL_FALSE); } this->checkForGLErrors(); - const QVector3D color = calcQVector3DFromQColor(this->renderPreferences.selectedColor); - gl::setShaderUniform(&this->shaders, "selectedColor", color); + const QColor qs = this->renderPreferences.selectedColor; + const glm::vec4 selectedColor{qs.redF(), qs.greenF(), qs.blueF(), 1.0f}; + gl::setShaderUniformVector(&this->shaders, "selectedColor", selectedColor); gl::setShaderUniform(&this->shaders, "highlighted", this->highlighted.value); this->checkForGLErrors(); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -473,7 +474,7 @@ this->checkForGLErrors(); fbo.release(); this->renderPreferences.style = oldRenderStyle; - return gl::idFromColor(data); + return gl::idFromUcharColor(data); } /**