Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLAdapter.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov, Jun 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGLAdapter
13#define ROOT_TGLAdapter
14
15#include "TVirtualGL.h"
16
17class TGLAdapter : public TGLPaintDevice {
18private:
20
21public:
22 explicit TGLAdapter(Int_t glDevice = -1);
23
24 Bool_t MakeCurrent() override;
25 void SwapBuffers() override;
26 const TGLFormat *GetPixelFormat()const override{return nullptr;}
27 const TGLContext *GetContext()const override{return nullptr;}
28
29 void SetGLDevice(Int_t glDevice)
30 {
31 fGLDevice = glDevice;
32 }
33
34 void ReadGLBuffer();
36 void MarkForDirectCopy(Bool_t isDirect);
37 void ExtractViewport(Int_t *vp)const override;
38
39private:
42
43 void AddContext(TGLContext *) override{}
44 void RemoveContext(TGLContext *) override{}
45
46 ClassDefOverride(TGLAdapter, 0) // Allow plot-painters to be used for gl-inpad and gl-viewer.
47};
48
49#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h MarkForDirectCopy
Allow plot-painters to be used for gl-inpad and gl-viewer.
Definition TGLAdapter.h:17
void SelectOffScreenDevice()
Select off-screen device for rendering.
void ReadGLBuffer()
Read gl buffer into x-pixmap.
TGLAdapter & operator=(const TGLAdapter &)
TGLAdapter(const TGLAdapter &)
const TGLFormat * GetPixelFormat() const override
Definition TGLAdapter.h:26
const TGLContext * GetContext() const override
Definition TGLAdapter.h:27
void ExtractViewport(Int_t *vp) const override
Extract viewport from gl.
void SwapBuffers() override
Swap front/back buffers.
void SetGLDevice(Int_t glDevice)
Definition TGLAdapter.h:29
Int_t fGLDevice
Definition TGLAdapter.h:19
void AddContext(TGLContext *) override
Definition TGLAdapter.h:43
void RemoveContext(TGLContext *) override
Definition TGLAdapter.h:44
Bool_t MakeCurrent() override
Set as current GL context.
This class encapsulates window-system specific information about a GL-context and alows their proper ...
Definition TGLContext.h:31
Encapsulation of format / contents of an OpenGL buffer.
Definition TGLFormat.h:36