ROOT  6.06/08
Reference Guide
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
TGLFBO Class Reference

Frame-buffer object.

Requires GL-1.5.

Taken from Gled project, see:

http://www.gled.org/cgi-bin/viewcvs.cgi/trunk/libsets/GledCore/Pupils/

See also:

http://www.opengl.org/registry/specs/EXT/framebuffer_object.txt

Definition at line 17 of file TGLFBO.h.

Public Member Functions

 TGLFBO ()
 Constructor. More...
 
virtual ~TGLFBO ()
 Destructor. More...
 
void Init (int w, int h, int ms_samples=0)
 Acquire GL resources for given width, height and number of multi-sampling samples. More...
 
void Release ()
 Release the allocated GL resources. More...
 
void Bind ()
 Bind the frame-buffer object. More...
 
void Unbind ()
 Unbind the frame-buffer object. More...
 
void BindTexture ()
 Bind texture. More...
 
void UnbindTexture ()
 Unbind texture. More...
 
void SetAsReadBuffer ()
 
Int_t GetW () const
 
Int_t GetH () const
 
Int_t GetReqW () const
 
Int_t GetReqH () const
 
Int_t GetMSSamples () const
 
Int_t GetMSCoverageSamples () const
 
Float_t GetWScale () const
 
Float_t GetHScale () const
 
Bool_t GetIsRescaled () const
 

Static Public Member Functions

static Bool_t GetRescaleToPow2 ()
 Return state of fgRescaleToPow2 static member. More...
 
static void SetRescaleToPow2 (Bool_t r)
 Set state of fgRescaleToPow2 static member. More...
 

Protected Member Functions

void InitStandard ()
 
void InitMultiSample ()
 
UInt_t CreateAndAttachRenderBuffer (Int_t format, Int_t type)
 
UInt_t CreateAndAttachColorTexture ()
 Initialize color-texture and attach it to current FB. More...
 

Protected Attributes

UInt_t fFrameBuffer
 
UInt_t fColorTexture
 
UInt_t fDepthBuffer
 
UInt_t fMSFrameBuffer
 
UInt_t fMSColorBuffer
 
Int_t fW
 
Int_t fH
 
Int_t fReqW
 
Int_t fReqH
 
Int_t fMSSamples
 
Int_t fMSCoverageSamples
 
Float_t fWScale
 
Float_t fHScale
 
Bool_t fIsRescaled
 

Static Protected Attributes

static Bool_t fgRescaleToPow2 = kTRUE
 
static Bool_t fgMultiSampleNAWarned = kFALSE
 

Private Member Functions

 TGLFBO (const TGLFBO &)
 
TGLFBOoperator= (const TGLFBO &)
 

#include <TGLFBO.h>

Constructor & Destructor Documentation

§ TGLFBO() [1/2]

TGLFBO::TGLFBO ( const TGLFBO )
private

§ TGLFBO() [2/2]

TGLFBO::TGLFBO ( )

Constructor.

Definition at line 44 of file TGLFBO.cxx.

§ ~TGLFBO()

TGLFBO::~TGLFBO ( )
virtual

Destructor.

Definition at line 65 of file TGLFBO.cxx.

Member Function Documentation

§ Bind()

void TGLFBO::Bind ( )

Bind the frame-buffer object.

Definition at line 198 of file TGLFBO.cxx.

Referenced by TGLViewer::GetPictureUsingFBO(), and TGLViewer::SavePictureUsingFBO().

§ BindTexture()

void TGLFBO::BindTexture ( )

Bind texture.

Definition at line 230 of file TGLFBO.cxx.

§ CreateAndAttachColorTexture()

UInt_t TGLFBO::CreateAndAttachColorTexture ( )
protected

Initialize color-texture and attach it to current FB.

Definition at line 326 of file TGLFBO.cxx.

Referenced by InitMultiSample(), and InitStandard().

§ CreateAndAttachRenderBuffer()

UInt_t TGLFBO::CreateAndAttachRenderBuffer ( Int_t  format,
Int_t  type 
)
protected

Definition at line 299 of file TGLFBO.cxx.

Referenced by InitMultiSample(), and InitStandard().

§ GetH()

Int_t TGLFBO::GetH ( ) const
inline

Definition at line 60 of file TGLFBO.h.

§ GetHScale()

Float_t TGLFBO::GetHScale ( ) const
inline

Definition at line 67 of file TGLFBO.h.

§ GetIsRescaled()

Bool_t TGLFBO::GetIsRescaled ( ) const
inline

Definition at line 69 of file TGLFBO.h.

§ GetMSCoverageSamples()

Int_t TGLFBO::GetMSCoverageSamples ( ) const
inline

Definition at line 64 of file TGLFBO.h.

§ GetMSSamples()

Int_t TGLFBO::GetMSSamples ( ) const
inline

Definition at line 63 of file TGLFBO.h.

§ GetReqH()

Int_t TGLFBO::GetReqH ( ) const
inline

Definition at line 62 of file TGLFBO.h.

§ GetReqW()

Int_t TGLFBO::GetReqW ( ) const
inline

Definition at line 61 of file TGLFBO.h.

§ GetRescaleToPow2()

Bool_t TGLFBO::GetRescaleToPow2 ( )
static

Return state of fgRescaleToPow2 static member.

Definition at line 349 of file TGLFBO.cxx.

Referenced by GetIsRescaled().

§ GetW()

Int_t TGLFBO::GetW ( ) const
inline

Definition at line 59 of file TGLFBO.h.

§ GetWScale()

Float_t TGLFBO::GetWScale ( ) const
inline

Definition at line 66 of file TGLFBO.h.

§ Init()

void TGLFBO::Init ( int  w,
int  h,
int  ms_samples = 0 
)

Acquire GL resources for given width, height and number of multi-sampling samples.

Definition at line 74 of file TGLFBO.cxx.

Referenced by TGLViewer::GetPictureUsingFBO(), and TGLViewer::SavePictureUsingFBO().

§ InitMultiSample()

void TGLFBO::InitMultiSample ( )
protected

Definition at line 282 of file TGLFBO.cxx.

Referenced by Init().

§ InitStandard()

void TGLFBO::InitStandard ( )
protected

Definition at line 271 of file TGLFBO.cxx.

Referenced by Init().

§ operator=()

TGLFBO& TGLFBO::operator= ( const TGLFBO )
private

§ Release()

void TGLFBO::Release ( )

Release the allocated GL resources.

Definition at line 181 of file TGLFBO.cxx.

Referenced by Init(), and ~TGLFBO().

§ SetAsReadBuffer()

void TGLFBO::SetAsReadBuffer ( )

Definition at line 262 of file TGLFBO.cxx.

Referenced by TGLViewer::GetPictureUsingFBO(), and TGLViewer::SavePictureUsingFBO().

§ SetRescaleToPow2()

void TGLFBO::SetRescaleToPow2 ( Bool_t  r)
static

Set state of fgRescaleToPow2 static member.

Default is kTRUE as this works better on older hardware, especially ATI.

Definition at line 358 of file TGLFBO.cxx.

Referenced by GetIsRescaled().

§ Unbind()

void TGLFBO::Unbind ( )

Unbind the frame-buffer object.

Definition at line 215 of file TGLFBO.cxx.

Referenced by TGLViewer::GetPictureUsingFBO(), and TGLViewer::SavePictureUsingFBO().

§ UnbindTexture()

void TGLFBO::UnbindTexture ( )

Unbind texture.

Definition at line 248 of file TGLFBO.cxx.

Member Data Documentation

§ fColorTexture

UInt_t TGLFBO::fColorTexture
protected

Definition at line 25 of file TGLFBO.h.

Referenced by BindTexture(), InitMultiSample(), InitStandard(), and Release().

§ fDepthBuffer

UInt_t TGLFBO::fDepthBuffer
protected

Definition at line 26 of file TGLFBO.h.

Referenced by InitMultiSample(), InitStandard(), and Release().

§ fFrameBuffer

UInt_t TGLFBO::fFrameBuffer
protected

Definition at line 24 of file TGLFBO.h.

Referenced by Bind(), Init(), InitMultiSample(), InitStandard(), Release(), SetAsReadBuffer(), and Unbind().

§ fgMultiSampleNAWarned

Bool_t TGLFBO::fgMultiSampleNAWarned = kFALSE
staticprotected

Definition at line 36 of file TGLFBO.h.

Referenced by Init().

§ fgRescaleToPow2

Bool_t TGLFBO::fgRescaleToPow2 = kTRUE
staticprotected

Definition at line 35 of file TGLFBO.h.

Referenced by GetRescaleToPow2(), Init(), and SetRescaleToPow2().

§ fH

Int_t TGLFBO::fH
protected

§ fHScale

Float_t TGLFBO::fHScale
protected

Definition at line 32 of file TGLFBO.h.

Referenced by BindTexture(), GetHScale(), and Init().

§ fIsRescaled

Bool_t TGLFBO::fIsRescaled
protected

Definition at line 33 of file TGLFBO.h.

Referenced by BindTexture(), GetIsRescaled(), Init(), and UnbindTexture().

§ fMSColorBuffer

UInt_t TGLFBO::fMSColorBuffer
protected

Definition at line 28 of file TGLFBO.h.

Referenced by InitMultiSample(), and Release().

§ fMSCoverageSamples

Int_t TGLFBO::fMSCoverageSamples
protected

Definition at line 30 of file TGLFBO.h.

Referenced by CreateAndAttachRenderBuffer(), GetMSCoverageSamples(), Init(), and Release().

§ fMSFrameBuffer

UInt_t TGLFBO::fMSFrameBuffer
protected

Definition at line 27 of file TGLFBO.h.

Referenced by Bind(), InitMultiSample(), Release(), and Unbind().

§ fMSSamples

Int_t TGLFBO::fMSSamples
protected

Definition at line 30 of file TGLFBO.h.

Referenced by Bind(), CreateAndAttachRenderBuffer(), GetMSSamples(), Init(), Release(), and Unbind().

§ fReqH

Int_t TGLFBO::fReqH
protected

Definition at line 30 of file TGLFBO.h.

Referenced by GetReqH(), and Init().

§ fReqW

Int_t TGLFBO::fReqW
protected

Definition at line 30 of file TGLFBO.h.

Referenced by GetReqW(), and Init().

§ fW

Int_t TGLFBO::fW
protected

§ fWScale

Float_t TGLFBO::fWScale
protected

Definition at line 32 of file TGLFBO.h.

Referenced by BindTexture(), GetWScale(), and Init().


The documentation for this class was generated from the following files: