Hi, I am new to this forum and I installed Geant4 10.05.p01 some days ago, using Visual studio 2017 and Cmake 3.15 on Windows 10. I’m trying to run example B1 but when it runs there are some visualization problems with OpenGL. The application does not respond and the image visualized is this. I have NVIDIA GeForce GTX 750 Ti with OpenGL 4.4. I swear someone could help me find a solution. Thank you all .
Hi. That looks pretty good to me. The image doesn’t look quite right but maybe that’s something to do with OpenGL on Windows. Maybe it would look better if you made one of the volumes invisible:
/vis/geometry/set/visibility Envelope 0 false
Unfortunately, text is not implemented on Windows.
When you say, “the application does not respond”, it looks like it has responded with
Idle>. You should type something in there, such as
Please get back to us if I have not understood you.
Thank you Allison , I tried to run and it works, OpenGL does not respond, but in spite of this, the graphic with the beam works . Is this a problem ? I swear it is a kind of bug of Windows or something like this . Thank you
Hi. The “simple” OGL window (OGLSWin32) is not interactive, so yes, that explains why it does not respond. It is not a Windows bug, more a Geant4 feature. To get an interactive window you would have to build with Qt.
Thank you so much John
Hi. Just to point out that if the capture of Geant4 commands is on the terminal (DOS or a CYGWIN prompt), then clearly the Windows events are not treated, and then the GLWin32 window can’t be responsive. At the time the OpenGL Win32 driver had been introduced (…long time ago!), it was though to cowork with the “G4UIWin32” which is a simple GUI window done by using Microsoft Win32 widgets (and then with a widget to capture G4 commands) which then treated the Windows “messages” (according Microsoft terminology). And then if using this GUI, you had no “blocking” since the steering of the app was done by a traditional Windows message loop treatment (for both the capture of G4 commands and the graphics windows).
But well, not clear to me if this UI is still available in last releases. (It was at the time of the old gmake build system, but not clear to me if it is buildable now with VisualStudio or with the new cmake build system). (To illustrate, I join a screen shot of a G4UIWin32 coworking with an OpenGLStoredWin32 window done some time ago on a Windows virtual machine).
Hi. We have been looking deeper into this. We have a suggestion. Are you able to change Geant4 source code and rebuild the libraries and your application? If so, we would like you to add
isGUI = true; after line 144 in
G4UIExecutive.cc so that it reads
case kWin32: #if defined(G4UI_BUILD_WIN32_SESSION) DISCARD_PARAMETER(argc); DISCARD_PARAMETER(argv); session = new G4UIWin32(); isGUI = true; #endif break;
Please give this a try if you can and report back to us. Even better, please try basic example B2a or B5, which execute
gui.mac and add buttons to the window; please try the buttons.