From 204454f39d2f8412da654da2fcf3c826d5180dae Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Mon, 7 Sep 2026 16:26:33 +0200 Subject: [PATCH] [histpainter] do not show TH3 projection with GL In such mode drawing must be done differently and completely fails when GL painter is activated --- hist/histpainter/src/THistPainter.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hist/histpainter/src/THistPainter.cxx b/hist/histpainter/src/THistPainter.cxx index 7775cce9bd4e3..1fdd1acda4996 100644 --- a/hist/histpainter/src/THistPainter.cxx +++ b/hist/histpainter/src/THistPainter.cxx @@ -10895,6 +10895,11 @@ void THistPainter::SetShowProjection(const char *option,Int_t nbins) if (nbins <= 0) return; + if ((fH->GetDimension() == 3) && (gPad->GetGLDevice() != -1)) { + Error("SetShowProjection", "TH3 projections do not work in GL mode"); + return; + } + TString opt = option; opt.ToLower(); Int_t projection = 0; @@ -10933,6 +10938,10 @@ void THistPainter::SetShowProjectionXY(const char *option,Int_t nbinsY,Int_t nbi if ((nbinsX <= 0) || (nbinsY <= 0)) return; + if ((fH->GetDimension() == 3) && (gPad->GetGLDevice() != -1)) { + Error("SetShowProjection", "TH3 projections do not work in GL mode"); + return; + } TString opt = option; opt.ToLower(); @@ -11156,6 +11165,10 @@ void THistPainter::ShowProjection3(Int_t px, Int_t py) } } + // 3D protection does not work with GL painters + if (gPad->GetGLDevice() != -1) + return; + gPad->SetDoubleBuffer(0); // turn off double buffer mode gVirtualX->SetDrawMode(TVirtualX::kInvert); // set the drawing mode to XOR mode