Logo ROOT   6.14/05
Reference Guide
TGLFBO.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Matevz Tadel, Aug 2009
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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_TGLFBO
13 #define ROOT_TGLFBO
14 
15 #include "Rtypes.h"
16 
17 class TGLFBO
18 {
19 private:
20  TGLFBO(const TGLFBO&); // Not implemented
21  TGLFBO& operator=(const TGLFBO&); // Not implemented
22 
23 protected:
29 
31 
34 
37 
38  void InitStandard();
39  void InitMultiSample();
40 
43 
44 public:
45  TGLFBO();
46  virtual ~TGLFBO();
47 
48  void Init(int w, int h, int ms_samples=0);
49  void Release();
50 
51  void Bind();
52  void Unbind();
53 
54  void BindTexture();
55  void UnbindTexture();
56 
57  void SetAsReadBuffer();
58 
59  Int_t GetW() const { return fW; }
60  Int_t GetH() const { return fH; }
61  Int_t GetReqW() const { return fReqW; }
62  Int_t GetReqH() const { return fReqH; }
63  Int_t GetMSSamples() const { return fMSSamples; }
65 
66  Float_t GetWScale() const { return fWScale; }
67  Float_t GetHScale() const { return fHScale; }
68 
69  Bool_t GetIsRescaled() const { return fIsRescaled; }
70 
71  static Bool_t GetRescaleToPow2();
72  static void SetRescaleToPow2(Bool_t r);
73 
74  ClassDef(TGLFBO, 0); // Frame-buffer object.
75 };
76 
77 #endif
static void SetRescaleToPow2(Bool_t r)
Set state of fgRescaleToPow2 static member.
Definition: TGLFBO.cxx:357
TGLFBO & operator=(const TGLFBO &)
UInt_t CreateAndAttachRenderBuffer(Int_t format, Int_t type)
Definition: TGLFBO.cxx:298
UInt_t CreateAndAttachColorTexture()
Initialize color-texture and attach it to current FB.
Definition: TGLFBO.cxx:325
Int_t fMSSamples
Definition: TGLFBO.h:30
float Float_t
Definition: RtypesCore.h:53
void Unbind()
Unbind the frame-buffer object.
Definition: TGLFBO.cxx:214
TGLFBO()
Constructor.
Definition: TGLFBO.cxx:43
Int_t fW
Definition: TGLFBO.h:30
void Bind()
Bind the frame-buffer object.
Definition: TGLFBO.cxx:197
virtual ~TGLFBO()
Destructor.
Definition: TGLFBO.cxx:64
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
void Release()
Release the allocated GL resources.
Definition: TGLFBO.cxx:180
Int_t GetMSCoverageSamples() const
Definition: TGLFBO.h:64
void SetAsReadBuffer()
Definition: TGLFBO.cxx:261
Int_t GetMSSamples() const
Definition: TGLFBO.h:63
static Bool_t GetRescaleToPow2()
Return state of fgRescaleToPow2 static member.
Definition: TGLFBO.cxx:348
Int_t GetReqH() const
Definition: TGLFBO.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:320
Float_t fHScale
Definition: TGLFBO.h:32
UInt_t fDepthBuffer
Definition: TGLFBO.h:26
ROOT::R::TRInterface & r
Definition: Object.C:4
void Init(int w, int h, int ms_samples=0)
Acquire GL resources for given width, height and number of multi-sampling samples.
Definition: TGLFBO.cxx:73
UInt_t fMSFrameBuffer
Definition: TGLFBO.h:27
unsigned int UInt_t
Definition: RtypesCore.h:42
Int_t fH
Definition: TGLFBO.h:30
Float_t fWScale
Definition: TGLFBO.h:32
Bool_t fIsRescaled
Definition: TGLFBO.h:33
#define h(i)
Definition: RSha256.hxx:106
static Bool_t fgMultiSampleNAWarned
Definition: TGLFBO.h:36
void InitMultiSample()
Definition: TGLFBO.cxx:281
Bool_t GetIsRescaled() const
Definition: TGLFBO.h:69
void BindTexture()
Bind texture.
Definition: TGLFBO.cxx:229
UInt_t fColorTexture
Definition: TGLFBO.h:25
int type
Definition: TGX11.cxx:120
Int_t fMSCoverageSamples
Definition: TGLFBO.h:30
Int_t GetReqW() const
Definition: TGLFBO.h:61
Int_t fReqW
Definition: TGLFBO.h:30
void UnbindTexture()
Unbind texture.
Definition: TGLFBO.cxx:247
Float_t GetHScale() const
Definition: TGLFBO.h:67
UInt_t fMSColorBuffer
Definition: TGLFBO.h:28
UInt_t fFrameBuffer
Definition: TGLFBO.h:24
Int_t GetW() const
Definition: TGLFBO.h:59
static Bool_t fgRescaleToPow2
Definition: TGLFBO.h:35
Frame-buffer object.
Definition: TGLFBO.h:17
void InitStandard()
Definition: TGLFBO.cxx:270
Int_t GetH() const
Definition: TGLFBO.h:60
Float_t GetWScale() const
Definition: TGLFBO.h:66
Int_t fReqH
Definition: TGLFBO.h:30