viewport: wire up the backface-culling setting

The "Backface Culling" checkbox persisted a value and reflected it, but
nothing consumed AppSettings::backfaceCulling — the opaque pipeline
hardcoded cullMode = Back, so toggling had no effect.

Build a second opaque pipeline (cullMode None) alongside the culled one and
pick between them per-frame from a backface_culling_ flag; setBackfaceCulling
flips the flag and requests a redraw (no rebuild). ViewportWindow forwards
it, and MainWindow applies the persisted value at startup and re-applies on
change — same wiring as the nav preset.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-07-09 17:23:48 +10:00
parent ed21dd7ecc
commit 9ccbcc2216
5 changed files with 45 additions and 2 deletions
+4
View File
@@ -1499,6 +1499,10 @@ void ViewportWindow::applyNavPreset(const char* name) {
select_button_ = toQtBtn(b.select); select_mods_ = toQtMod(b.select_mod);
}
void ViewportWindow::setBackfaceCulling(bool enabled) {
core_.setBackfaceCulling(enabled);
}
// -----------------------------------------------------------------------------
// One-shot framebuffer capture → PNG
// -----------------------------------------------------------------------------