17#include <TGLIncludes.h>
56 glMatrixMode(GL_PROJECTION);
63 gluPickMatrix(rect.
X(), rect.
Y(), rect.
Width(), rect.
Height(),
68 glMatrixMode(GL_MODELVIEW);
75 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
76 glDisable(GL_CULL_FACE);
78 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
79 glShadeModel(GL_FLAT);
80 glClearColor(0.0, 0.0, 0.0, 0.0);
86 glPolygonOffset(0.5f, 0.5f);
93 glBegin(GL_LINE_LOOP);
104 glVertex2f(0.0, 0.0);
121 Float_t llx, lly, llz, urx, ury, urz;
122 fFont.BBox(
fText.Data(), llx, lly, llz, urx, ury, urz);
124 glBitmap(0, 0, 0, 0, -urx*0.5f, -ury*0.5f,
nullptr);
131 glMatrixMode(GL_PROJECTION);
133 glMatrixMode(GL_MODELVIEW);
161 switch (event->
fType) {
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
bool Bool_t
Boolean (0=false, 1=true) (bool).
float Float_t
Float 4 bytes (float).
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b)
void WindowToViewport(Int_t &, Int_t &y) const
TGLOverlayElement(const TGLOverlayElement &)=delete
Selection record for overlay objects.
Viewport (pixel base) 2D rectangle class.
const Int_t * CArr() const
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
TGLViewerBase * GetViewer()
TGLRect * GetPickRectangle()
Return current pick rectangle.
void RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont &out)
Get font in the GL rendering context.
UInt_t GetItem(Int_t i) const
static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a)
Wrapper for glColor4f.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Base class for GL viewers.
virtual void AddOverlayElement(TGLOverlayElement *el)
Add overlay element.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
EGEventType fType
of event (see EGEventType)
UInt_t fCode
key or button code