TGLFBO.h

Go to the documentation of this file.
00001 // @(#)root/gl:$Id: TGLFBO.h 36675 2010-11-15 20:33:58Z matevz $
00002 // Author: Matevz Tadel, Aug 2009
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGLFBO
00013 #define ROOT_TGLFBO
00014 
00015 #include "Rtypes.h"
00016 
00017 class TGLFBO
00018 {
00019 private:
00020    TGLFBO(const TGLFBO&);            // Not implemented
00021    TGLFBO& operator=(const TGLFBO&); // Not implemented
00022 
00023 protected:
00024    UInt_t  fFrameBuffer;
00025    UInt_t  fColorTexture;
00026    UInt_t  fDepthBuffer;
00027    UInt_t  fMSFrameBuffer;
00028    UInt_t  fMSColorBuffer;
00029 
00030    Int_t   fW, fH, fMSSamples, fMSCoverageSamples;
00031 
00032    Float_t fWScale, fHScale;
00033    Bool_t  fIsRescaled;
00034 
00035    static Bool_t fgRescaleToPow2;
00036    static Bool_t fgMultiSampleNAWarned;
00037 
00038    void InitStandard();
00039    void InitMultiSample();
00040 
00041    UInt_t CreateAndAttachRenderBuffer(Int_t format, Int_t type);
00042    UInt_t CreateAndAttachColorTexture();
00043 
00044 public:
00045    TGLFBO();
00046    virtual ~TGLFBO();
00047 
00048    void Init(int w, int h, int ms_samples=0);
00049    void Release();
00050 
00051    void Bind();
00052    void Unbind();
00053 
00054    void BindTexture();
00055    void UnbindTexture();
00056 
00057    void SetAsReadBuffer();
00058 
00059    ClassDef(TGLFBO, 0); // Frame-buffer object.
00060 };
00061 
00062 #endif

Generated on Tue Jul 5 14:16:44 2011 for ROOT_528-00b_version by  doxygen 1.5.1