ROOT Version: 6.26/10
Platform: Ubuntu 22.04.1 LTS
Compiler: gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Hello,
I have tried opening a gdml file using a small macro (copied below), however, it seems root is not able to open its GL viewer. The message I receive is Warning in <TCanvas::TPad::CreateViewer3D>: Cannot create 3D viewer of type: ogl
. It does open a window where the geometry can be seen, however, it is not as good as the usual GL viewer. When building ROOT, I have checked that OpenGL was found so it should have been compiled against the available ogl module on my system. Any help would be appreciated. Thanks a lot in advance.
The macro file:
void rootreadgeom(const char * infile) {
gSystem->Load("libGeom");
gSystem->Load("libGdml");
gSystem->Load("libGL");
TGeoManager *geom = TGeoManager::Import(infile);
TGeoVolume *top = gGeoManager->GetTopVolume();
top->Draw("ogl");
}
I have also tried adding gStyle->SetCanvasPreferGL(kTRUE);
but it did not affect the outcome. I have also checked that gSystem->Load("libGL")
returns 0 which I think should imply it was found and loaded.