Warning, file /include/root/TGLFBO.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGLFBO
0013 #define ROOT_TGLFBO
0014
0015 #include "Rtypes.h"
0016
0017 class TGLFBO
0018 {
0019 private:
0020 TGLFBO(const TGLFBO&) = delete;
0021 TGLFBO& operator=(const TGLFBO&) = delete;
0022
0023 protected:
0024 UInt_t fFrameBuffer;
0025 UInt_t fColorTexture;
0026 UInt_t fDepthBuffer;
0027 UInt_t fMSFrameBuffer;
0028 UInt_t fMSColorBuffer;
0029
0030 Int_t fW, fH, fReqW, fReqH, fMSSamples, fMSCoverageSamples;
0031
0032 Float_t fWScale, fHScale;
0033 Bool_t fIsRescaled;
0034
0035 static Bool_t fgRescaleToPow2;
0036 static Bool_t fgMultiSampleNAWarned;
0037
0038 void InitStandard();
0039 void InitMultiSample();
0040
0041 UInt_t CreateAndAttachRenderBuffer(Int_t format, Int_t type);
0042 UInt_t CreateAndAttachColorTexture();
0043
0044 public:
0045 TGLFBO();
0046 virtual ~TGLFBO();
0047
0048 void Init(int w, int h, int ms_samples=0);
0049 void Release();
0050
0051 void Bind();
0052 void Unbind();
0053
0054 void BindTexture();
0055 void UnbindTexture();
0056
0057 void SetAsReadBuffer();
0058
0059 Int_t GetW() const { return fW; }
0060 Int_t GetH() const { return fH; }
0061 Int_t GetReqW() const { return fReqW; }
0062 Int_t GetReqH() const { return fReqH; }
0063 Int_t GetMSSamples() const { return fMSSamples; }
0064 Int_t GetMSCoverageSamples() const { return fMSCoverageSamples; }
0065
0066 Float_t GetWScale() const { return fWScale; }
0067 Float_t GetHScale() const { return fHScale; }
0068
0069 Bool_t GetIsRescaled() const { return fIsRescaled; }
0070
0071 static Bool_t GetRescaleToPow2();
0072 static void SetRescaleToPow2(Bool_t r);
0073
0074 ClassDef(TGLFBO, 0);
0075 };
0076
0077 #endif