Changing the color scheme does not recolor an already-rendered model
Switching to a different color scheme repaints the background but leaves the rendered model in the old scheme's colors. The model only picks up the new scheme when its geometry is computed again — editing the source, or anything else that forces a fresh F6.
Reproduced on current master (033ddb6f6), Linux, Qt6, Manifold backend, NVIDIA GPU. Not platform-specific as far as I can tell — the cause is in shared code.
Steps to reproduce
- Open this model:
difference() {
cube(20, center = true);
cylinder(h = 40, r = 6, center = true, $fn = 32);
}
translate([25, 0, 0]) color("red") cube(10, center = true);- Render it with F6 under Cornfield.
- Preferences → 3D View → Color scheme → Metallic.
Expected: the model is drawn in Metallic's colors. Actual: the background turns blue, the model stays Cornfield yellow.
What it looks like
F6 render under Cornfield:

After switching to Metallic — background changed, model did not:

Sampling the two frames makes it precise. The face colors are bit-for-bit the same before and after; only the background differs:
| background | model faces | |
|---|---|---|
| Cornfield | #ffffe5 |
#fad82c, #8f7b19, #a58f1d |
| after switching to Metallic | #aaaaff |
#fad82c, #8f7b19, #a58f1d (unchanged) |
The explicitly color("red") cube stays red throughout, which is correct — that color comes from the model, not the scheme.
For comparison, this is the same switch with the two causes below fixed, where the faces do follow the scheme (and the red cube still doesn't):

Cause
Two independent things have to go right, and neither does:
The scheme is baked into cached geometry.
ManifoldGeometry::toPolySet()resolvesCGAL_FACE_FRONT_COLOR/CGAL_FACE_BACK_COLORfromRenderSettings::inst()->colorschemeand stores the resulting colors in thePolySet. ThatPolySetgoes into the geometry cache and is reused;MainWindow::setColorScheme()does not invalidate it. So the cached geometry permanently carries the colors of whichever scheme was active when it was built.The vertex buffers are never rebuilt. Each renderer's
prepare()builds itsVertexStateContainers only when they are empty, andsetColorScheme()only refreshescolormap_. Per-vertex colors are baked into the VBOs at build time, so even geometry that carried no scheme colors would keep its uploaded ones.
Fixing either alone changes nothing visible: with (1) fixed the renderer still redraws stale buffers, and with (2) fixed the rebuild re-reads the baked colors out of the cached PolySet.
The scad file and the full-resolution captures are here.
I have a fix for both and will open a PR shortly.
Source: openscad/openscad