Logo ROOT   6.16/01
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
17class TGLFBO
18{
19private:
20 TGLFBO(const TGLFBO&); // Not implemented
21 TGLFBO& operator=(const TGLFBO&); // Not implemented
22
23protected:
29
31
34
37
38 void InitStandard();
39 void InitMultiSample();
40
43
44public:
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
ROOT::R::TRInterface & r
Definition: Object.C:4
#define h(i)
Definition: RSha256.hxx:106
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
bool Bool_t
Definition: RtypesCore.h:59
float Float_t
Definition: RtypesCore.h:53
#define ClassDef(name, id)
Definition: Rtypes.h:324
int type
Definition: TGX11.cxx:120
Frame-buffer object.
Definition: TGLFBO.h:18
void InitStandard()
Definition: TGLFBO.cxx:270
UInt_t fDepthBuffer
Definition: TGLFBO.h:26
static Bool_t fgMultiSampleNAWarned
Definition: TGLFBO.h:36
Int_t fW
Definition: TGLFBO.h:30
void Unbind()
Unbind the frame-buffer object.
Definition: TGLFBO.cxx:214
TGLFBO(const TGLFBO &)
void UnbindTexture()
Unbind texture.
Definition: TGLFBO.cxx:247
UInt_t CreateAndAttachRenderBuffer(Int_t format, Int_t type)
Definition: TGLFBO.cxx:298
Int_t fMSCoverageSamples
Definition: TGLFBO.h:30
Int_t GetReqH() const
Definition: TGLFBO.h:62
virtual ~TGLFBO()
Destructor.
Definition: TGLFBO.cxx:64
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
Bool_t GetIsRescaled() const
Definition: TGLFBO.h:69
UInt_t fMSColorBuffer
Definition: TGLFBO.h:28
UInt_t CreateAndAttachColorTexture()
Initialize color-texture and attach it to current FB.
Definition: TGLFBO.cxx:325
void Bind()
Bind the frame-buffer object.
Definition: TGLFBO.cxx:197
Float_t fHScale
Definition: TGLFBO.h:32
Bool_t fIsRescaled
Definition: TGLFBO.h:33
Float_t GetHScale() const
Definition: TGLFBO.h:67
Int_t GetH() const
Definition: TGLFBO.h:60
Int_t GetMSSamples() const
Definition: TGLFBO.h:63
static void SetRescaleToPow2(Bool_t r)
Set state of fgRescaleToPow2 static member.
Definition: TGLFBO.cxx:357
Float_t GetWScale() const
Definition: TGLFBO.h:66
static Bool_t GetRescaleToPow2()
Return state of fgRescaleToPow2 static member.
Definition: TGLFBO.cxx:348
Float_t fWScale
Definition: TGLFBO.h:32
TGLFBO()
Constructor.
Definition: TGLFBO.cxx:43
void SetAsReadBuffer()
Definition: TGLFBO.cxx:261
void Release()
Release the allocated GL resources.
Definition: TGLFBO.cxx:180
TGLFBO & operator=(const TGLFBO &)
Int_t GetW() const
Definition: TGLFBO.h:59
void InitMultiSample()
Definition: TGLFBO.cxx:281
Int_t fReqW
Definition: TGLFBO.h:30
void BindTexture()
Bind texture.
Definition: TGLFBO.cxx:229
UInt_t fFrameBuffer
Definition: TGLFBO.h:24
UInt_t fColorTexture
Definition: TGLFBO.h:25
Int_t GetMSCoverageSamples() const
Definition: TGLFBO.h:64
Int_t fMSSamples
Definition: TGLFBO.h:30
Int_t fReqH
Definition: TGLFBO.h:30
static Bool_t fgRescaleToPow2
Definition: TGLFBO.h:35
Int_t GetReqW() const
Definition: TGLFBO.h:61
Int_t fH
Definition: TGLFBO.h:30
UInt_t fMSFrameBuffer
Definition: TGLFBO.h:27