Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLAdapter.cxx
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#include "TGLAdapter.h"
13
14/** \class TGLAdapter
15\ingroup opengl
16Allow plot-painters to be used for gl-inpad and gl-viewer.
17*/
18
19
20////////////////////////////////////////////////////////////////////////////////
21/// Constructor.
22
27
28////////////////////////////////////////////////////////////////////////////////
29/// Set as current GL context.
30
32{
33 return fGLDevice != -1 && gGLManager->MakeCurrent(fGLDevice);
34}
35
36////////////////////////////////////////////////////////////////////////////////
37/// Swap front/back buffers.
38
40{
41 if (fGLDevice != -1)
42 gGLManager->Flush(fGLDevice);
43}
44
45////////////////////////////////////////////////////////////////////////////////
46/// Mark gl-device for later copying into x-pixmap.
47
52
53////////////////////////////////////////////////////////////////////////////////
54/// Read gl buffer into x-pixmap.
55
57{
58 gGLManager->ReadGLBuffer(fGLDevice);
59}
60
61////////////////////////////////////////////////////////////////////////////////
62/// Extract viewport from gl.
63
65{
66 gGLManager->ExtractViewport(fGLDevice, vp);
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Select off-screen device for rendering.
71
73{
74 gGLManager->SelectOffScreenDevice(fGLDevice);
75}
#define gGLManager
Definition TVirtualGL.h:159
void SelectOffScreenDevice()
Select off-screen device for rendering.
void ReadGLBuffer()
Read gl buffer into x-pixmap.
TGLAdapter(Int_t glDevice=-1)
Constructor.
void ExtractViewport(Int_t *vp) const override
Extract viewport from gl.
void SwapBuffers() override
Swap front/back buffers.
Int_t fGLDevice
Definition TGLAdapter.h:19
void MarkForDirectCopy(Bool_t isDirect)
Mark gl-device for later copying into x-pixmap.
Bool_t MakeCurrent() override
Set as current GL context.