Interface mockup 15

This commit is contained in:
Dion Moult
2026-05-11 09:17:45 +10:00
parent 1c598a981e
commit 6df9aeda2c
21 changed files with 556 additions and 88 deletions
+13 -1
View File
@@ -725,7 +725,7 @@ void ViewportWindow::initGL() {
gl_->glEnable(GL_DEPTH_TEST);
gl_->glEnable(GL_MULTISAMPLE);
gl_->glClearColor(0.18f, 0.20f, 0.22f, 1.0f);
gl_->glClearColor(background_color_.redF(), background_color_.greenF(), background_color_.blueF(), 1.0f);
gl_->glCullFace(GL_BACK);
if (AppSettings::instance().backfaceCulling()) gl_->glEnable(GL_CULL_FACE);
else gl_->glDisable(GL_CULL_FACE);
@@ -768,6 +768,18 @@ void ViewportWindow::initGL() {
emit initialized();
}
void ViewportWindow::setBackgroundColor(const QColor& color) {
if (!color.isValid()) return;
const QColor normalized = color.toRgb();
if (background_color_ == normalized) return;
background_color_ = normalized;
if (gl_initialized_ && gl_) {
context_->makeCurrent(this);
gl_->glClearColor(background_color_.redF(), background_color_.greenF(), background_color_.blueF(), 1.0f);
requestUpdate();
}
}
void ViewportWindow::enqueuePendingOperation(PendingOperation op) {
pending_ops_.push_back(std::move(op));
}