OpenGL visualizer becomes buggy after any user interaction with the window

I am running an application based off of Example B4a. Scorers are used to create energy flux histograms. I have the data I need out of the program. Now I am just trying to produce a nice picture. Should be easy, right? :slight_smile:

The visualizer appears normally. Then I run /control/execute gps.mac which creates the scorer shown in my screenshot, and runs 50000 events. The scorer is projected into the visualizer window and the color map legend appears in the lower left.

At this point (if I do not click anything, do not press my screenshot button, do not navigate to another window, etc) then I see:

  • color map legend text is color coded
  • there are strange colored pixels in the color map (looks like noise or something)
  • console output appears normal (in the screenshot below, only up to “> ---- close CSV file…” has been printed.

Now I click my screenshot button, and it affects the visualizer. See the screen shot below.

As you can see, now the color map legend text is now dark grey. And my console starts printing the line “QColor::setRgbF: RGB parameters out of range” about 6 times everytime I click anything.

I am running Geant4.10.04 on Linux Mint 20.

A couple of quick responses…

  • Please try drawing to a “native” OpenGL window, either by

    • /vis/open OGLSX in the Qt GUI command line pane, or
    • starting your app with the tcsh UI (the easiest way to do that is to create a file ~/.g4session (i.e., in your home directory) containing a line tcsh, or see the App Guide, How to Select Interface in Your Applications).
  • Could you try the latest Geant4 version 10.7?

I tried opening a native OpenGL window as you suggested, but ran into an error saying OGLSX wasn’t a listed option.

I updated to Geant4 v10.7 and added the GEANT4_USE_XM flag. The visualization in the Qt GUI still isn’t quite right. The colormap legend text does not appear at all.

However, I am able to use both the /vis/open OGLSX and the tcsh methods to open a “native” OpenGL window and everything is displaying nicely. Thank you!