13#include "TGLIncludes.h"
54 fMSCoverageSamples (0),
75 static const std::string
eh(
"TGLFBO::Init ");
80 throw std::runtime_error(
eh +
"GL_EXT_framebuffer_object extension required for FBO.");
103 Info(
eh.c_str(),
"GL implementation does not support multi-sampling for FBOs.");
120 throw std::runtime_error(
eh +
Form(
"maximum size supported by GL implementation is %d.",
maxSize));
134 for (
int i = 0; i <
n_modes; ++i)
150 Info(
eh.c_str(),
"InitStandard (no multi-sampling).");
164 printf(
"%sConstructed TGLFBO ... all fine.\n",
eh.c_str());
168 throw std::runtime_error(
eh +
"Constructed TGLFBO not supported, choose different formats.");
172 throw std::runtime_error(
eh +
"Constructed TGLFBO is not complete, unexpected error.");
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t format
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
static Bool_t fgMultiSampleNAWarned
void Unbind()
Unbind the frame-buffer object.
void UnbindTexture()
Unbind texture.
UInt_t CreateAndAttachRenderBuffer(Int_t format, Int_t type)
virtual ~TGLFBO()
Destructor.
void Init(int w, int h, int ms_samples=0)
Acquire GL resources for given width, height and number of multi-sampling samples.
UInt_t CreateAndAttachColorTexture()
Initialize color-texture and attach it to current FB.
void Bind()
Bind the frame-buffer object.
static void SetRescaleToPow2(Bool_t r)
Set state of fgRescaleToPow2 static member.
static Bool_t GetRescaleToPow2()
Return state of fgRescaleToPow2 static member.
void Release()
Release the allocated GL resources.
void BindTexture()
Bind texture.
static Bool_t fgRescaleToPow2
Double_t Log2(Double_t x)
Returns the binary (base-2) logarithm of x.
Int_t CeilNint(Double_t x)
Returns the nearest integer of TMath::Ceil(x).