Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGLAdapter.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gl:$Id$
0002 // Author:  Timur Pocheptsov, Jun 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGLAdapter
0013 #define ROOT_TGLAdapter
0014 
0015 #include "TVirtualGL.h"
0016 
0017 class TGLAdapter : public TGLPaintDevice {
0018 private:
0019    Int_t fGLDevice;
0020 
0021 public:
0022    explicit TGLAdapter(Int_t glDevice = -1);
0023 
0024    Bool_t            MakeCurrent() override;
0025    void              SwapBuffers() override;
0026    const TGLFormat  *GetPixelFormat()const override{return nullptr;}
0027    const TGLContext *GetContext()const override{return nullptr;}
0028 
0029    void SetGLDevice(Int_t glDevice)
0030    {
0031       fGLDevice = glDevice;
0032    }
0033 
0034    void ReadGLBuffer();
0035    void SelectOffScreenDevice();
0036    void MarkForDirectCopy(Bool_t isDirect);
0037    void ExtractViewport(Int_t *vp)const override;
0038 
0039 private:
0040    TGLAdapter(const TGLAdapter &);
0041    TGLAdapter &operator = (const TGLAdapter &);
0042 
0043    void AddContext(TGLContext *) override{}
0044    void RemoveContext(TGLContext *) override{}
0045 
0046    ClassDefOverride(TGLAdapter, 0) // Allow plot-painters to be used for gl-inpad and gl-viewer.
0047 };
0048 
0049 #endif