TGLFBO Class Reference

#include <TGLFBO.h>

List of all members.

Public Member Functions

 TGLFBO ()
virtual ~TGLFBO ()
void Init (int w, int h, int ms_samples=0)
void Release ()
void Bind ()
void Unbind ()
void BindTexture ()
void UnbindTexture ()
void SetAsReadBuffer ()
 ClassDef (TGLFBO, 0)
 TGLFBO ()
virtual ~TGLFBO ()
void Init (int w, int h, int ms_samples=0)
void Release ()
void Bind ()
void Unbind ()
void BindTexture ()
void UnbindTexture ()
void SetAsReadBuffer ()
 ClassDef (TGLFBO, 0)

Protected Member Functions

void InitStandard ()
void InitMultiSample ()
UInt_t CreateAndAttachRenderBuffer (Int_t format, Int_t type)
UInt_t CreateAndAttachColorTexture ()
void InitStandard ()
void InitMultiSample ()
UInt_t CreateAndAttachRenderBuffer (Int_t format, Int_t type)
UInt_t CreateAndAttachColorTexture ()

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 fMSSamples
Int_t fMSCoverageSamples
Float_t fWScale
Float_t fHScale
Bool_t fIsRescaled

Static Protected Attributes

static Bool_t fgRescaleToPow2
static Bool_t fgMultiSampleNAWarned

Private Member Functions

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


Detailed Description

Definition at line 17 of file TGLFBO.h.


Constructor & Destructor Documentation

TGLFBO::TGLFBO ( const TGLFBO  )  [private]

TGLFBO::TGLFBO (  ) 

Definition at line 37 of file TGLFBO.cxx.

TGLFBO::~TGLFBO (  )  [virtual]

Definition at line 55 of file TGLFBO.cxx.

References Release().

TGLFBO::TGLFBO ( const TGLFBO  )  [private]

TGLFBO::TGLFBO (  ) 

virtual TGLFBO::~TGLFBO (  )  [virtual]


Member Function Documentation

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

void TGLFBO::InitStandard (  )  [protected]

Definition at line 255 of file TGLFBO.cxx.

References CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), fColorTexture, fDepthBuffer, fFrameBuffer, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24, GL_FRAMEBUFFER_EXT, glBindFramebufferEXT, and glGenFramebuffersEXT.

Referenced by Init().

void TGLFBO::InitMultiSample (  )  [protected]

Definition at line 265 of file TGLFBO.cxx.

References CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), fColorTexture, fDepthBuffer, fFrameBuffer, fMSColorBuffer, fMSFrameBuffer, GL_COLOR_ATTACHMENT0, GL_DEPTH_ATTACHMENT, GL_DEPTH_COMPONENT24, GL_FRAMEBUFFER_EXT, GL_RGBA8, glBindFramebufferEXT, and glGenFramebuffersEXT.

Referenced by Init().

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

Definition at line 281 of file TGLFBO.cxx.

References fH, fMSCoverageSamples, fMSSamples, fW, GL_FRAMEBUFFER_EXT, GL_RENDERBUFFER_EXT, glBindRenderbufferEXT, glFramebufferRenderbufferEXT, glGenRenderbuffersEXT, glRenderbufferStorageEXT, glRenderbufferStorageMultisampleCoverageNV, and glRenderbufferStorageMultisampleEXT.

Referenced by InitMultiSample(), and InitStandard().

UInt_t TGLFBO::CreateAndAttachColorTexture (  )  [protected]

Definition at line 306 of file TGLFBO.cxx.

References fH, fW, GL_COLOR_ATTACHMENT0_EXT, GL_FRAMEBUFFER_EXT, GL_NEAREST, GL_REPEAT, GL_RGBA, GL_RGBA8, GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_UNSIGNED_BYTE, glBindTexture(), glFramebufferTexture2DEXT, glGenTextures(), glTexImage2D(), glTexParameteri(), and NULL.

Referenced by InitMultiSample(), and InitStandard().

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

Definition at line 63 of file TGLFBO.cxx.

References TMath::CeilNint(), fFrameBuffer, fgMultiSampleNAWarned, fgRescaleToPow2, fH, fHScale, fIsRescaled, fMSCoverageSamples, fMSSamples, Form(), fW, fWScale, gDebug, GL_FRAMEBUFFER_COMPLETE_EXT, GL_FRAMEBUFFER_EXT, GL_FRAMEBUFFER_UNSUPPORTED_EXT, GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV, GL_MAX_RENDERBUFFER_SIZE_EXT, GL_MULTISAMPLE_COVERAGE_MODES_NV, GL_TEXTURE_2D, glBindFramebufferEXT, glBindTexture(), glCheckFramebufferStatusEXT, GLEW_EXT_framebuffer_multisample, GLEW_EXT_framebuffer_object, GLEW_NV_framebuffer_multisample_coverage, glGetIntegerv(), i, Info, InitMultiSample(), InitStandard(), kFALSE, kTRUE, TMath::Log2(), nh, and Release().

Referenced by TGLViewer::SavePictureUsingFBO().

void TGLFBO::Release (  ) 

Definition at line 165 of file TGLFBO.cxx.

References fColorTexture, fDepthBuffer, fFrameBuffer, fH, fMSColorBuffer, fMSCoverageSamples, fMSFrameBuffer, fMSSamples, fW, glDeleteFramebuffersEXT, glDeleteRenderbuffersEXT, and glDeleteTextures().

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

void TGLFBO::Bind (  ) 

Definition at line 182 of file TGLFBO.cxx.

References fFrameBuffer, fMSFrameBuffer, fMSSamples, GL_FRAMEBUFFER_EXT, and glBindFramebufferEXT.

Referenced by TGLViewer::SavePictureUsingFBO().

void TGLFBO::Unbind (  ) 

Definition at line 199 of file TGLFBO.cxx.

References fFrameBuffer, fH, fMSFrameBuffer, fMSSamples, fW, GL_COLOR_BUFFER_BIT, GL_DRAW_FRAMEBUFFER_EXT, GL_FRAMEBUFFER_EXT, GL_NEAREST, GL_READ_FRAMEBUFFER_EXT, glBindFramebufferEXT, and glBlitFramebufferEXT.

Referenced by TGLViewer::SavePictureUsingFBO().

void TGLFBO::BindTexture (  ) 

Definition at line 214 of file TGLFBO.cxx.

References fColorTexture, fHScale, fIsRescaled, fWScale, GL_MODELVIEW, GL_TEXTURE, GL_TEXTURE_2D, GL_TEXTURE_BIT, glBindTexture(), glEnable(), glMatrixMode(), glPushAttrib(), glPushMatrix(), and glScalef().

void TGLFBO::UnbindTexture (  ) 

Definition at line 232 of file TGLFBO.cxx.

References fIsRescaled, GL_MODELVIEW, GL_TEXTURE, glMatrixMode(), glPopAttrib(), and glPopMatrix().

void TGLFBO::SetAsReadBuffer (  ) 

Definition at line 247 of file TGLFBO.cxx.

References fFrameBuffer, GL_READ_FRAMEBUFFER_EXT, and glBindFramebufferEXT.

Referenced by TGLViewer::SavePictureUsingFBO().

TGLFBO::ClassDef ( TGLFBO  ,
 
)

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

void TGLFBO::InitStandard (  )  [protected]

void TGLFBO::InitMultiSample (  )  [protected]

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

UInt_t TGLFBO::CreateAndAttachColorTexture (  )  [protected]

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

void TGLFBO::Release (  ) 

void TGLFBO::Bind (  ) 

void TGLFBO::Unbind (  ) 

void TGLFBO::BindTexture (  ) 

void TGLFBO::UnbindTexture (  ) 

void TGLFBO::SetAsReadBuffer (  ) 

TGLFBO::ClassDef ( TGLFBO  ,
 
)


Member Data Documentation

UInt_t TGLFBO::fFrameBuffer [protected]

Definition at line 24 of file TGLFBO.h.

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

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::fMSFrameBuffer [protected]

Definition at line 27 of file TGLFBO.h.

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

UInt_t TGLFBO::fMSColorBuffer [protected]

Definition at line 28 of file TGLFBO.h.

Referenced by InitMultiSample(), and Release().

Int_t TGLFBO::fW [protected]

Definition at line 30 of file TGLFBO.h.

Referenced by CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), Init(), Release(), and Unbind().

Int_t TGLFBO::fH [protected]

Definition at line 30 of file TGLFBO.h.

Referenced by CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), Init(), Release(), and Unbind().

Int_t TGLFBO::fMSSamples [protected]

Definition at line 30 of file TGLFBO.h.

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

Int_t TGLFBO::fMSCoverageSamples [protected]

Definition at line 30 of file TGLFBO.h.

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

Float_t TGLFBO::fWScale [protected]

Definition at line 32 of file TGLFBO.h.

Referenced by BindTexture(), and Init().

Float_t TGLFBO::fHScale [protected]

Definition at line 32 of file TGLFBO.h.

Referenced by BindTexture(), and Init().

Bool_t TGLFBO::fIsRescaled [protected]

Definition at line 33 of file TGLFBO.h.

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

static Bool_t TGLFBO::fgRescaleToPow2 [static, protected]

Definition at line 35 of file TGLFBO.h.

Referenced by Init().

static Bool_t TGLFBO::fgMultiSampleNAWarned [static, protected]

Definition at line 36 of file TGLFBO.h.

Referenced by Init().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:40:00 2011 for ROOT_528-00b_version by  doxygen 1.5.1