ROOT Version: 6.12.06
Compiler: precompiled EPEL7 binary
Maybe I’m stupid and, as usual, I’m missing something trivial but… The following macro does not produce any transparent fill color in my histogram:
TH1D * h = new TH1D("h", "h", 10, 0, 1);
any clue? Missing compile time option?
PS: Also, in the GUI editor, the "opacity’ parameter is not available…
It works for me. I get the attached picture.
Also notice the opacity slider in the GUI.
I tried with the ROOT version 6.12.05 and with the master version on mac.
I know, it works fine also on my mac, but here’s the output on Linux:
As you see the slider is unusable
PS: you didn’t select the histogram in the GUI editor
ROOT 6.12/06 (binaries provided by the ROOT Team) on Ubuntu 14 (ran locally) and CentOS 7 (ran via “ssh -X -Y”) and I get it fine.
Yes and the blue is fully blue, not half tone blue as it should be.
It does not matter if it works for one objet it works for all. If I click on the histogram the slider is active also.
We just tried on a CENTOS 7 machine with ROOT 6.13 and it works fine.
I can reproduce the issue in the following Docker container:
RUN yum install -q -y epel-release && \
yum install -q -y root
with the usual
sudo docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix command. Could you check? (you’ll see OpenGL errors, I don’t have them on my pc…)
Interesting feature: if I save the canvas as PDF the transparency is drawn correctly
Ah ! that’s why it does not work. OpenGL is mandatory in that case.
Yes PDF output is an independent module I implemented in ROOT as the TPDF class. It is completely disconnected from the screen display. I implemented transparency in that class.
What “OpenGL errors” are you talikng about?
If you just get something like this, then it is still fine:
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600
These are the errors you’ll get in the container when starting ROOT:
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: i915_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i915
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
And I’ve always had them within my CentOS containers, I remember struggling a lot in the past to get rid of them but never succeeded (all the OpenGL stuff is correctly installed as a dependency of the EPEL7 ROOT rpm)… Also, as I said, I don’t get any of those errors in my CentOS7 physical machine.
Moreover, despite of the errors, I’ve never encountered any kind of issue by running ROOT graphics from containers (maybe until now…?)
Maybe, instead of the “docker”, you could try the “
Singularity” (which is claimed to work flawlessly with X11).
In any case, of course, your “X display server” needs to have OpenGL support built in (and the “container” with ROOT, too, of course).
Sure, I use Singularity too, but unfortunately the situation is the same, e.g. with the following recipe file:
yum -y -q install epel-release
yum -y -q install root
I get the same errors. The fact that I don’t have them on my pc, where X11 and ROOT are installed in the same way, still puzzles me.
However, you could be right, maybe the Xorg distribution for CentOS7 does not have OpenGL support, I have to check…
Oh, nice, no more libGL errors… Thanks!
However, as suspected, this has nothing to do with the transparency issue… have to check the OpenGL support thing
Maybe, instead of executing “yum -y -q install root”, you could try to download and unpack the
ROOT 6.12/06 binary distribution provided by the ROOT Team.
BTW. Have you checked that you have the “root-graf3d-gl” package installed? Maybe it is an optional package which you need to manually add using yum.
I didn’t have it, but after installing it the issue was still there…
Update: the problem remains also with the official binary distribution, so it shouldn’t be a ROOT issue
I think I got the solution. On mac OSX one should just kill the X server (go to activity monitor, look for the xquartz processes and kill them all), then open a shell and give
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
which would set the -iglx option (whatever it means).
Then restart the ssh -XY session, and run any GL-based application (such as glxgears).
Thank you all for your patience, suggestions and useful help!
I already tried to add e.g.
Option "AllowIndirectGLX" "on"
Option "IndirectGLX" "on"
I think you need to “enable_iglx” on your mac (using the “magic” command shown in the link).
But I am working on a CentOS7 machine since the beginning…