ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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
 
 ClassDef (TGLFBO, 0)
 

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::TGLFBO ( const TGLFBO )
private
TGLFBO::TGLFBO ( )

Constructor.

Definition at line 44 of file TGLFBO.cxx.

TGLFBO::~TGLFBO ( )
virtual

Destructor.

Definition at line 65 of file TGLFBO.cxx.

Member Function Documentation

void TGLFBO::Bind ( )

Bind the frame-buffer object.

Definition at line 198 of file TGLFBO.cxx.

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

void TGLFBO::BindTexture ( )

Bind texture.

Definition at line 230 of file TGLFBO.cxx.

TGLFBO::ClassDef ( TGLFBO  ,
 
)
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().

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

Definition at line 299 of file TGLFBO.cxx.

Referenced by InitMultiSample(), and InitStandard().

Int_t TGLFBO::GetH ( ) const
inline

Definition at line 60 of file TGLFBO.h.

Float_t TGLFBO::GetHScale ( ) const
inline

Definition at line 67 of file TGLFBO.h.

Bool_t TGLFBO::GetIsRescaled ( ) const
inline

Definition at line 69 of file TGLFBO.h.

Int_t TGLFBO::GetMSCoverageSamples ( ) const
inline

Definition at line 64 of file TGLFBO.h.

Int_t TGLFBO::GetMSSamples ( ) const
inline

Definition at line 63 of file TGLFBO.h.

Int_t TGLFBO::GetReqH ( ) const
inline

Definition at line 62 of file TGLFBO.h.

Int_t TGLFBO::GetReqW ( ) const
inline

Definition at line 61 of file TGLFBO.h.

Bool_t TGLFBO::GetRescaleToPow2 ( )
static

Return state of fgRescaleToPow2 static member.

Definition at line 349 of file TGLFBO.cxx.

Int_t TGLFBO::GetW ( ) const
inline

Definition at line 59 of file TGLFBO.h.

Float_t TGLFBO::GetWScale ( ) const
inline

Definition at line 66 of file TGLFBO.h.

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().

void TGLFBO::InitMultiSample ( )
protected

Definition at line 282 of file TGLFBO.cxx.

Referenced by Init().

void TGLFBO::InitStandard ( )
protected

Definition at line 271 of file TGLFBO.cxx.

Referenced by Init().

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

Release the allocated GL resources.

Definition at line 181 of file TGLFBO.cxx.

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

void TGLFBO::SetAsReadBuffer ( )

Definition at line 262 of file TGLFBO.cxx.

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

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.

void TGLFBO::Unbind ( )

Unbind the frame-buffer object.

Definition at line 215 of file TGLFBO.cxx.

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

void TGLFBO::UnbindTexture ( )

Unbind texture.

Definition at line 248 of file TGLFBO.cxx.

Member Data Documentation

UInt_t TGLFBO::fColorTexture
protected

Definition at line 25 of file TGLFBO.h.

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

UInt_t TGLFBO::fDepthBuffer
protected

Definition at line 26 of file TGLFBO.h.

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

UInt_t TGLFBO::fFrameBuffer
protected

Definition at line 24 of file TGLFBO.h.

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

Bool_t TGLFBO::fgMultiSampleNAWarned = kFALSE
staticprotected

Definition at line 36 of file TGLFBO.h.

Referenced by Init().

Bool_t TGLFBO::fgRescaleToPow2 = kTRUE
staticprotected

Definition at line 35 of file TGLFBO.h.

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

Int_t TGLFBO::fH
protected
Float_t TGLFBO::fHScale
protected

Definition at line 32 of file TGLFBO.h.

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

Bool_t TGLFBO::fIsRescaled
protected

Definition at line 33 of file TGLFBO.h.

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

UInt_t TGLFBO::fMSColorBuffer
protected

Definition at line 28 of file TGLFBO.h.

Referenced by InitMultiSample(), and Release().

Int_t TGLFBO::fMSCoverageSamples
protected

Definition at line 30 of file TGLFBO.h.

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

UInt_t TGLFBO::fMSFrameBuffer
protected

Definition at line 27 of file TGLFBO.h.

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

Int_t TGLFBO::fMSSamples
protected

Definition at line 30 of file TGLFBO.h.

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

Int_t TGLFBO::fReqH
protected

Definition at line 30 of file TGLFBO.h.

Referenced by GetReqH(), and Init().

Int_t TGLFBO::fReqW
protected

Definition at line 30 of file TGLFBO.h.

Referenced by GetReqW(), and Init().

Int_t TGLFBO::fW
protected
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: