ROOT
6.06/09
Reference Guide
|
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
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... | |
Static Protected Attributes | |
static Bool_t | fgRescaleToPow2 = kTRUE |
static Bool_t | fgMultiSampleNAWarned = kFALSE |
Private Member Functions | |
TGLFBO (const TGLFBO &) | |
TGLFBO & | operator= (const TGLFBO &) |
#include <TGLFBO.h>
|
private |
TGLFBO::TGLFBO | ( | ) |
Constructor.
Definition at line 44 of file TGLFBO.cxx.
|
virtual |
Destructor.
Definition at line 65 of file TGLFBO.cxx.
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 | , |
0 | |||
) |
|
protected |
Initialize color-texture and attach it to current FB.
Definition at line 326 of file TGLFBO.cxx.
Referenced by InitMultiSample(), and InitStandard().
Definition at line 299 of file TGLFBO.cxx.
Referenced by InitMultiSample(), and InitStandard().
|
static |
Return state of fgRescaleToPow2 static member.
Definition at line 349 of file TGLFBO.cxx.
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().
|
protected |
Definition at line 282 of file TGLFBO.cxx.
Referenced by Init().
|
protected |
Definition at line 271 of file TGLFBO.cxx.
Referenced by Init().
void TGLFBO::Release | ( | ) |
Release the allocated GL resources.
Definition at line 181 of file TGLFBO.cxx.
void TGLFBO::SetAsReadBuffer | ( | ) |
Definition at line 262 of file TGLFBO.cxx.
Referenced by TGLViewer::GetPictureUsingFBO(), and TGLViewer::SavePictureUsingFBO().
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.
|
protected |
Definition at line 25 of file TGLFBO.h.
Referenced by BindTexture(), InitMultiSample(), InitStandard(), and Release().
|
protected |
Definition at line 26 of file TGLFBO.h.
Referenced by InitMultiSample(), InitStandard(), and Release().
|
protected |
Definition at line 24 of file TGLFBO.h.
Referenced by Bind(), Init(), InitMultiSample(), InitStandard(), Release(), SetAsReadBuffer(), and Unbind().
Definition at line 35 of file TGLFBO.h.
Referenced by GetRescaleToPow2(), Init(), and SetRescaleToPow2().
|
protected |
Definition at line 30 of file TGLFBO.h.
Referenced by CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), GetH(), Init(), Release(), and Unbind().
|
protected |
Definition at line 32 of file TGLFBO.h.
Referenced by BindTexture(), GetHScale(), and Init().
|
protected |
Definition at line 33 of file TGLFBO.h.
Referenced by BindTexture(), GetIsRescaled(), Init(), and UnbindTexture().
|
protected |
Definition at line 28 of file TGLFBO.h.
Referenced by InitMultiSample(), and Release().
|
protected |
Definition at line 30 of file TGLFBO.h.
Referenced by CreateAndAttachRenderBuffer(), GetMSCoverageSamples(), Init(), and Release().
|
protected |
|
protected |
Definition at line 30 of file TGLFBO.h.
Referenced by Bind(), CreateAndAttachRenderBuffer(), GetMSSamples(), Init(), Release(), and Unbind().
|
protected |
|
protected |
|
protected |
Definition at line 30 of file TGLFBO.h.
Referenced by CreateAndAttachColorTexture(), CreateAndAttachRenderBuffer(), GetW(), Init(), Release(), and Unbind().
|
protected |
Definition at line 32 of file TGLFBO.h.
Referenced by BindTexture(), GetWScale(), and Init().