ROOT logo
// @(#)root/gl:$Id: TGLAdapter.h 20882 2007-11-19 11:31:26Z rdm $
// Author:  Timur Pocheptsov, Jun 2007

/*************************************************************************
 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TGLAdapter
#define ROOT_TGLAdapter

#ifndef ROOT_TVirtualGL
#include "TVirtualGL.h"
#endif

class TGLAdapter : public TGLPaintDevice {
private:
   Int_t fGLDevice;

public:
   explicit TGLAdapter(Int_t glDevice = -1);

   Bool_t            MakeCurrent();
   void              SwapBuffers();
   const TGLFormat  *GetPixelFormat()const{return 0;}
   const TGLContext *GetContext()const{return 0;}

   void SetGLDevice(Int_t glDevice)
   {
      fGLDevice = glDevice;
   }

   void ReadGLBuffer();
   void SelectOffScreenDevice();
   void MarkForDirectCopy(Bool_t isDirect);
   void ExtractViewport(Int_t *vp)const;

private:
   TGLAdapter(const TGLAdapter &);
   TGLAdapter &operator = (const TGLAdapter &);

   void AddContext(TGLContext *){}
   void RemoveContext(TGLContext *){}

   ClassDef(TGLAdapter, 0) // Allow plot-painters to be used for gl-inpad and gl-viewer.
};

#endif
 TGLAdapter.h:1
 TGLAdapter.h:2
 TGLAdapter.h:3
 TGLAdapter.h:4
 TGLAdapter.h:5
 TGLAdapter.h:6
 TGLAdapter.h:7
 TGLAdapter.h:8
 TGLAdapter.h:9
 TGLAdapter.h:10
 TGLAdapter.h:11
 TGLAdapter.h:12
 TGLAdapter.h:13
 TGLAdapter.h:14
 TGLAdapter.h:15
 TGLAdapter.h:16
 TGLAdapter.h:17
 TGLAdapter.h:18
 TGLAdapter.h:19
 TGLAdapter.h:20
 TGLAdapter.h:21
 TGLAdapter.h:22
 TGLAdapter.h:23
 TGLAdapter.h:24
 TGLAdapter.h:25
 TGLAdapter.h:26
 TGLAdapter.h:27
 TGLAdapter.h:28
 TGLAdapter.h:29
 TGLAdapter.h:30
 TGLAdapter.h:31
 TGLAdapter.h:32
 TGLAdapter.h:33
 TGLAdapter.h:34
 TGLAdapter.h:35
 TGLAdapter.h:36
 TGLAdapter.h:37
 TGLAdapter.h:38
 TGLAdapter.h:39
 TGLAdapter.h:40
 TGLAdapter.h:41
 TGLAdapter.h:42
 TGLAdapter.h:43
 TGLAdapter.h:44
 TGLAdapter.h:45
 TGLAdapter.h:46
 TGLAdapter.h:47
 TGLAdapter.h:48
 TGLAdapter.h:49
 TGLAdapter.h:50
 TGLAdapter.h:51