Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions hist/histpainter/src/THistPainter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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

Expand Down
Loading