Warning, file /include/root/TVirtualGL.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TVirtualGL
0013 #define ROOT_TVirtualGL
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #include "TNamed.h"
0032 #include "GuiTypes.h"
0033 #include "GLConstants.h"
0034
0035 class TVirtualViewer3D;
0036 class TPoints3DABC;
0037 class TGLViewer;
0038 class TGLCamera;
0039 class TGLManip;
0040 class TGLBoundingBox;
0041 class TGLRect;
0042
0043
0044
0045 class TVirtualGLPainter {
0046 public:
0047 virtual ~TVirtualGLPainter(){}
0048
0049 virtual void Paint() = 0;
0050 virtual void Pan(Int_t px, Int_t py) = 0;
0051 virtual Bool_t PlotSelected(Int_t px, Int_t py) = 0;
0052
0053 virtual char *GetPlotInfo(Int_t px, Int_t py) = 0;
0054
0055 ClassDef(TVirtualGLPainter, 0);
0056 };
0057
0058
0059 class TVirtualGLManip {
0060 public:
0061 virtual ~TVirtualGLManip(){}
0062 virtual Bool_t Select(const TGLCamera & camera, const TGLRect & rect, const TGLBoundingBox & sceneBox) = 0;
0063
0064 ClassDef(TVirtualGLManip, 0);
0065 };
0066
0067
0068
0069
0070 class TGLManager : public TNamed {
0071 public:
0072 TGLManager();
0073 TGLManager(const TGLManager &) = delete;
0074 TGLManager &operator = (const TGLManager &) = delete;
0075
0076
0077 virtual Int_t InitGLWindow(Window_t winID) = 0;
0078
0079 virtual Int_t CreateGLContext(Int_t winInd) = 0;
0080
0081
0082
0083
0084 virtual Bool_t AttachOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h) = 0;
0085 virtual Bool_t ResizeOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h) = 0;
0086
0087 virtual void SelectOffScreenDevice(Int_t ctxInd) = 0;
0088
0089 virtual Int_t GetVirtualXInd(Int_t ctxInd) = 0;
0090
0091 virtual void MarkForDirectCopy(Int_t ctxInd, Bool_t) = 0;
0092
0093 virtual void ExtractViewport(Int_t ctxInd, Int_t *vp) = 0;
0094
0095 virtual void ReadGLBuffer(Int_t ctxInd) = 0;
0096
0097
0098
0099 virtual Bool_t MakeCurrent(Int_t ctxInd) = 0;
0100
0101 virtual void Flush(Int_t ctxInd) = 0;
0102
0103 virtual void DeleteGLContext(Int_t ctxInd) = 0;
0104
0105
0106 virtual Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox) = 0;
0107
0108 virtual void PaintSingleObject(TVirtualGLPainter *) = 0;
0109 virtual void PanObject(TVirtualGLPainter *o, Int_t x, Int_t y) = 0;
0110
0111 virtual void PrintViewer(TVirtualViewer3D *vv) = 0;
0112
0113 virtual Bool_t PlotSelected(TVirtualGLPainter *plot, Int_t px, Int_t py) = 0;
0114 virtual char *GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py) = 0;
0115
0116 virtual Bool_t HighColorFormat(Int_t ctxInd) = 0;
0117
0118 static TGLManager *&Instance();
0119
0120 ClassDefOverride(TGLManager, 0)
0121 };
0122
0123 namespace Rgl {
0124
0125
0126 enum EFormatOptions
0127 {
0128 kNone = 0,
0129 kDoubleBuffer = 1,
0130 kDepth = 2,
0131 kAccum = 4,
0132 kStencil = 8,
0133 kStereo = 16,
0134 kMultiSample = 32
0135 };
0136
0137 }
0138
0139 class TGLContext;
0140 class TGLFormat;
0141
0142 class TGLPaintDevice {
0143 friend class TGLContext;
0144 public:
0145 virtual ~TGLPaintDevice(){}
0146 virtual Bool_t MakeCurrent() = 0;
0147 virtual void SwapBuffers() = 0;
0148 virtual const TGLFormat *GetPixelFormat()const = 0;
0149 virtual const TGLContext *GetContext()const = 0;
0150 virtual void ExtractViewport(Int_t *vp)const = 0;
0151
0152 private:
0153 virtual void AddContext(TGLContext *ctx) = 0;
0154 virtual void RemoveContext(TGLContext *ctx) = 0;
0155
0156 ClassDef(TGLPaintDevice, 0)
0157 };
0158
0159 #define gGLManager (TGLManager::Instance())
0160 R__EXTERN TGLManager *(*gPtr2GLManager)();
0161
0162 #endif