00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 #ifndef ROOT_TGWin32GL
00013 #define ROOT_TGWin32GL
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef ROOT_TVirtualGL
00025 #include "TVirtualGL.h"
00026 #endif
00027 #ifndef ROOT_TVirtualViewer3D
00028 #include "TVirtualViewer3D.h"
00029 #endif
00030 
00031 
00032 class TGWin32GLManager : public TGLManager {
00033 private:
00034    class TGWin32GLImpl;
00035    TGWin32GLImpl *fPimpl;
00036 
00037 public:
00038    TGWin32GLManager();
00039    ~TGWin32GLManager();
00040 
00041    
00042 
00043    
00044    Int_t    InitGLWindow(Window_t winID);
00045    
00046    Int_t    CreateGLContext(Int_t winInd);
00047 
00048    
00049    
00050    
00051    Bool_t   AttachOffScreenDevice(Int_t ctxInd, Int_t x, Int_t y, UInt_t w, UInt_t h);
00052    Bool_t   ResizeOffScreenDevice(Int_t devInd, Int_t x, Int_t y, UInt_t w, UInt_t h);
00053    
00054    void     SelectOffScreenDevice(Int_t devInd);
00055    
00056    Int_t    GetVirtualXInd(Int_t devInd);
00057    
00058    void     MarkForDirectCopy(Int_t devInd, Bool_t);
00059    
00060    void     ExtractViewport(Int_t devInd, Int_t *vp);
00061    
00062    void     ReadGLBuffer(Int_t devInd);
00063    
00064 
00065    
00066    Bool_t   MakeCurrent(Int_t devInd);
00067    
00068    void     Flush(Int_t ctxInd);
00069    
00070    void     DeleteGLContext(Int_t devInd);
00071 
00072    
00073    
00074    Bool_t   SelectManip(TVirtualGLManip *manip, const TGLCamera *camera, const TGLRect *rect, const TGLBoundingBox *sceneBox);
00075 
00076    Bool_t   PlotSelected(TVirtualGLPainter *plot, Int_t px, Int_t py);
00077    char    *GetPlotInfo(TVirtualGLPainter *plot, Int_t px, Int_t py);
00078 
00079    void     PaintSingleObject(TVirtualGLPainter *);
00080    void     PanObject(TVirtualGLPainter *o, Int_t x, Int_t y);
00081    void     PrintViewer(TVirtualViewer3D *vv);
00082 
00083    Bool_t   HighColorFormat(Int_t ctx);
00084 
00085 private:
00086    struct TGLContext;
00087    Bool_t   CreateDIB(TGLContext &ctx)const;
00088 
00089    TGWin32GLManager(const TGWin32GLManager &);
00090    TGWin32GLManager &operator = (const TGWin32GLManager &);
00091 
00092    ClassDef(TGWin32GLManager, 0)
00093 };
00094 
00095 #endif