Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGOSXGL.h
Go to the documentation of this file.
1#ifndef ROOT_TGOSXGL
2#define ROOT_TGOSXGL
3
4#include <map>
5
6#include "TVirtualGL.h"
7
8//
9//TGLManager is a legacy interface (gl-context/window management):
10//at some point we had to use OpenGL in our TCanvas/TPad classes which do not
11//have direct access to low-level APIs + on Windows we had quite tricky
12//mt-problems to deal with.
13//
14
15class TGOSXGLManager : public TGLManager {
16public:
18 ~TGOSXGLManager() override;
19
20 //TGLManager's final-overriders (window + context management):
21 Int_t InitGLWindow(Window_t winID) override;
23 void DeleteGLContext(Int_t devInd) override;
25 void Flush(Int_t ctxInd) override;
26
27 //In case of Cocoa 'VirtulXInd' == devInd (again, legacy).
29
30 //These are empty overriders, we do not have/use off-screen renreding in TCanvas/TPad anymore
31 //(before we had 1) non-hardware glpixmaps/DIB sections and later 2) a hack with double buffer).
34 void SelectOffScreenDevice(Int_t devInd) override;
35 void MarkForDirectCopy(Int_t devInd, Bool_t) override;
36 void ExtractViewport(Int_t devInd, Int_t *vp) override;
37 void ReadGLBuffer(Int_t devInd) override;
38
39 //Used by our OpenGL viewer.
40 //In the past we had to implement this functions to deal with mt-issues on Windows.
41 Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox) override;
43 char *GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py) override;
44 void PaintSingleObject(TVirtualGLPainter *) override;
45 void PanObject(TVirtualGLPainter *o, Int_t x, Int_t y) override;
46 void PrintViewer(TVirtualViewer3D *vv) override;
47
48 Bool_t HighColorFormat(Int_t /*ctxInd*/) override{return kFALSE;}
49
50private:
51 typedef std::map<Handle_t, Window_t> CtxToWindowMap_t;
53
56
57 ClassDefOverride(TGOSXGLManager, 0) //Cocoa specific version of TGLManager.
58};
59
60#endif
Handle_t Window_t
Window handle.
Definition GuiTypes.h:29
#define h(i)
Definition RSha256.hxx:106
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h Flush
winID h PrintViewer
winID AttachOffScreenDevice
winID h TVirtualViewer3D PanObject
winID h DeleteGLContext
winID winInd
winID h TVirtualViewer3D vv
winID h devInd
winID h SelectOffScreenDevice
winID h TVirtualViewer3D TVirtualGLPainter char TVirtualGLPainter plot
winID h TVirtualViewer3D TVirtualGLPainter char GetPlotInfo
winID h MarkForDirectCopy
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t rect
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition TGLCamera.h:44
Viewport (pixel base) 2D rectangle class.
Definition TGLUtil.h:422
~TGOSXGLManager() override
Definition TGOSXGL.mm:36
Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox) override
Definition TGOSXGL.mm:168
TGOSXGLManager(const TGOSXGLManager &)
CtxToWindowMap_t fCtxToWin
Definition TGOSXGL.h:52
Bool_t PlotSelected(TVirtualGLPainter *plot, Int_t px, Int_t py) override
Definition TGOSXGL.mm:182
void ExtractViewport(Int_t devInd, Int_t *vp) override
Definition TGOSXGL.mm:154
TGOSXGLManager & operator=(const TGOSXGLManager &)
Int_t CreateGLContext(Int_t winInd) override
Definition TGOSXGL.mm:81
Int_t GetVirtualXInd(Int_t devInd) override
Definition TGOSXGL.mm:116
void ReadGLBuffer(Int_t devInd) override
Definition TGOSXGL.mm:160
Bool_t MakeCurrent(Int_t devInd) override
Definition TGOSXGL.mm:100
void PaintSingleObject(TVirtualGLPainter *) override
Definition TGOSXGL.mm:200
Bool_t ResizeOffScreenDevice(Int_t devInd, Int_t x, Int_t y, UInt_t w, UInt_t h) override
Definition TGOSXGL.mm:133
std::map< Handle_t, Window_t > CtxToWindowMap_t
Definition TGOSXGL.h:51
Bool_t HighColorFormat(Int_t) override
Definition TGOSXGL.h:48
Abstract 3D shapes viewer.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17