57 glMatrixMode(GL_PROJECTION);
64 gluPickMatrix(rect.X(), rect.Y(), rect.Width(), rect.Height(),
68 glOrtho(vp.X(), vp.Width(), vp.Y(), vp.Height(), 0, 1);
69 glMatrixMode(GL_MODELVIEW);
76 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
77 glDisable(GL_CULL_FACE);
79 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
80 glShadeModel(GL_FLAT);
81 glClearColor(0.0, 0.0, 0.0, 0.0);
87 glPolygonOffset(0.5f, 0.5f);
94 glBegin(GL_LINE_LOOP);
105 glVertex2f(0.0, 0.0);
122 Float_t llx, lly, llz, urx, ury, urz;
125 glBitmap(0, 0, 0, 0, -urx*0.5f, -ury*0.5f, 0);
132 glMatrixMode(GL_PROJECTION);
134 glMatrixMode(GL_MODELVIEW);
144 Emit(
"Clicked(TGLViewerBase*)", (
Long_t)viewer);
162 switch (event->
fType) {
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
virtual void PreRender(Bool_t autoLight=kTRUE, Bool_t lightOn=kFALSE) const
Set-up GL state before FTFont rendering.
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
void BBox(const char *txt, Float_t &llx, Float_t &lly, Float_t &llz, Float_t &urx, Float_t &ury, Float_t &urz) const
Get bounding box.
void RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont &out)
Get font in the GL rendering context.
TGLRect * GetPickRectangle()
Return current pick rectangle.
Base class for GL viewers.
Viewport (pixel base) 2D rectangle class.
void WindowToViewport(Int_t &, Int_t &y) const
static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a)
Wrapper for glColor4f.
virtual void AddOverlayElement(TGLOverlayElement *el)
Add overlay element.
UInt_t GetItem(Int_t i) const
virtual void PostRender() const
Reset GL state after FTFont rendering.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TGLViewerBase * GetViewer()
Selection record for overlay objects.
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
const Int_t * CArr() const
const char * Data() const
static constexpr double g