#ifndef ROOT_TVirtualGL
#define ROOT_TVirtualGL
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_GuiTypes
#include "GuiTypes.h"
#endif
#ifndef ROOT_GLConstants
#include "GLConstants.h"
#endif
class TVirtualViewer3D;
class TPoints3DABC;
class TGLViewer;
class TGLCamera;
class TGLManip;
class TGLBoundingBox;
class TGLRect;
class TVirtualGLPainter {
public:
virtual ~TVirtualGLPainter(){}
virtual void Paint() = 0;
virtual void Pan(Int_t px, Int_t py) = 0;
virtual Bool_t PlotSelected(Int_t px, Int_t py) = 0;
virtual char *GetPlotInfo(Int_t px, Int_t py) = 0;
ClassDef(TVirtualGLPainter, 0);
};
class TVirtualGLManip {
public:
virtual ~TVirtualGLManip(){}
virtual Bool_t Select(const TGLCamera & camera, const TGLRect & rect, const TGLBoundingBox & sceneBox) = 0;
ClassDef(TVirtualGLManip, 0);
};
class TGLManager : public TNamed {
public:
TGLManager();
virtual Int_t InitGLWindow(Window_t winID) = 0;
virtual Int_t CreateGLContext(Int_t winInd) = 0;
virtual Bool_t AttachOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h) = 0;
virtual Bool_t ResizeOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h) = 0;
virtual void SelectOffScreenDevice(Int_t ctxInd) = 0;
virtual Int_t GetVirtualXInd(Int_t ctxInd) = 0;
virtual void MarkForDirectCopy(Int_t ctxInd, Bool_t) = 0;
virtual void ExtractViewport(Int_t ctxInd, Int_t *vp) = 0;
virtual void ReadGLBuffer(Int_t ctxInd) = 0;
virtual Bool_t MakeCurrent(Int_t ctxInd) = 0;
virtual void Flush(Int_t ctxInd) = 0;
virtual void DeleteGLContext(Int_t ctxInd) = 0;
virtual Bool_t SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox) = 0;
virtual void PaintSingleObject(TVirtualGLPainter *) = 0;
virtual void PanObject(TVirtualGLPainter *o, Int_t x, Int_t y) = 0;
virtual void PrintViewer(TVirtualViewer3D *vv) = 0;
virtual Bool_t PlotSelected(TVirtualGLPainter *plot, Int_t px, Int_t py) = 0;
virtual char *GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py) = 0;
virtual Bool_t HighColorFormat(Int_t ctxInd) = 0;
static TGLManager *&Instance();
private:
TGLManager(const TGLManager &);
TGLManager &operator = (const TGLManager &);
ClassDef(TGLManager, 0)
};
namespace Rgl {
enum EFormatOptions
{
kNone = 0,
kDoubleBuffer = 1,
kDepth = 2,
kAccum = 4,
kStencil = 8,
kStereo = 16,
kMultiSample = 32
};
}
class TGLContext;
class TGLFormat;
class TGLPaintDevice {
friend class TGLContext;
public:
virtual ~TGLPaintDevice(){}
virtual Bool_t MakeCurrent() = 0;
virtual void SwapBuffers() = 0;
virtual const TGLFormat *GetPixelFormat()const = 0;
virtual const TGLContext *GetContext()const = 0;
virtual void ExtractViewport(Int_t *vp)const = 0;
private:
virtual void AddContext(TGLContext *ctx) = 0;
virtual void RemoveContext(TGLContext *ctx) = 0;
ClassDef(TGLPaintDevice, 0)
};
#ifndef __CINT__
#define gGLManager (TGLManager::Instance())
R__EXTERN TGLManager *(*gPtr2GLManager)();
#endif
#endif