Equalizer  1.4.1
accum.h
00001 
00002 /* Copyright (c) 2009-2012, Stefan Eilemann <eile@equalizergraphics.com>
00003  *                    2009, Sarah Amsellem <sarah.amsellem@gmail.com>
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef EQUTIL_ACCUM_H
00020 #define EQUTIL_ACCUM_H
00021 
00022 #include <eq/util/types.h>
00023 
00024 namespace eq
00025 {
00026 namespace util
00027 {
00037     class Accum
00038     {
00039     public: 
00041         EQ_API Accum( const GLEWContext* const glewContext );
00042 
00044         EQ_API ~Accum();
00045 
00054         EQ_API bool init( const PixelViewport& pvp, unsigned textureFormat );
00055 
00057         EQ_API void exit();
00058 
00067         EQ_API bool resize( const int width, const int height );
00068 
00070         EQ_API void clear();
00071 
00076         EQ_API void accum();
00077 
00082         EQ_API void display();
00083 
00090         EQ_API uint32_t getMaxSteps() const;
00091 
00098         uint32_t getNumSteps() const { return _numSteps; }
00099 
00109         void setTotalSteps( uint32_t totalSteps )
00110             { _totalSteps = totalSteps; }
00111 
00113         uint32_t getTotalSteps() { return _totalSteps; }
00114 
00121         EQ_API bool usesFBO() const;
00122 
00130         EQ_API static bool usesFBO( const GLEWContext* glewContext );
00131 
00132         const GLEWContext* glewGetContext() const { return _glewContext; }
00133 
00134     private:
00135         const GLEWContext* const _glewContext;
00136 
00137         int _width;
00138         int _height;
00139 
00140         AccumBufferObject* _abo;
00141         uint32_t _numSteps;
00142         uint32_t _totalSteps;
00143     };
00144 }
00145 }
00146 
00147 #endif // EQUTIL_ACCUM_H
Generated on Mon Nov 26 2012 14:41:48 for Equalizer 1.4.1 by  doxygen 1.7.6.1