Skip to content

Commit ee96ea3

Browse files
andyclaude
andcommitted
Add ECCE_DEBUG_ATOM_COLOR, to measure the uniform-hue bug instead of guessing
CSLoadColorsCmd is where ECCE hands each atom colour to the scene graph. With ECCE_DEBUG_ATOM_COLOR=1 it prints every one, which separates the two possibilities that look identical on screen in issue #83: correct numbers per element (oxygen 1,0,0 and hydrogen 1,1,1) mean the data and the lookup are fine and the fault is below us in the GL or driver path, while green numbers would make it ours. Relevant because the hue is reported on the Wayland machine only, with the same code and the same data on the X11 one -- which already points below the application, and this confirms it rather than assuming it. Worth knowing for whoever picks it up: SoWxRenderArea requests no GL visual attributes at all. The whole GLX_RGBA / depth / accum / stencil block is commented out behind "@todo Work on visual stuff later", so the canvas takes whatever default the platform hands it -- and that default is exactly the sort of thing that differs between X11 and XWayland. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 1c9d7dc commit ee96ea3

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/viz/sgcommands/CSLoadColorsCmd.C‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,18 @@ bool CSLoadColorsCmd::execute()
5757
colors->atomColor.set1Value(index, red, green, blue);
5858
}
5959

60+
// ECCE_DEBUG_ATOM_COLOR=1 prints every colour ECCE hands the scene
61+
// graph. For the uniform-green-atoms report (#83) this separates the
62+
// two possibilities that look identical on screen: if the numbers here
63+
// are correct per element (oxygen 1,0,0 and hydrogen 1,1,1) then the
64+
// data and the lookup are fine and the fault is below us, in the GL
65+
// or driver path; if they all come out green, it is ours.
66+
if (getenv("ECCE_DEBUG_ATOM_COLOR")) {
67+
printf("[ATOMCOLOR] index=%d r=%.3f g=%.3f b=%.3f%s\n",
68+
index, red, green, blue, colors ? "" : " (NO COLOR NODE)");
69+
fflush(stdout);
70+
}
71+
6072
return true;
6173
}
6274

0 commit comments

Comments
 (0)