Equalizer  1.2.1
accum.h
00001 
00002 /* Copyright (c) 2009-2011, 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/client/gl.h>  // for GLEW
00023 #include <eq/util/types.h>
00024 
00025 namespace eq
00026 {
00027 namespace util
00028 {
00038     class Accum
00039     {
00040     public: 
00042         EQ_API Accum( const GLEWContext* const glewContext );
00043 
00045         EQ_API ~Accum();
00046 
00055         EQ_API bool init( const PixelViewport& pvp, GLuint textureFormat );
00056 
00058         EQ_API void exit();
00059 
00068         EQ_API bool resize( const int width, const int height );
00069 
00071         EQ_API void clear();
00072 
00077         EQ_API void accum();
00078 
00083         EQ_API void display();
00084 
00091         EQ_API uint32_t getMaxSteps() const;
00092 
00099         uint32_t getNumSteps() const { return _numSteps; }
00100 
00110         void setTotalSteps( uint32_t totalSteps )
00111             { _totalSteps = totalSteps; }
00112 
00114         uint32_t getTotalSteps() { return _totalSteps; }
00115 
00122         EQ_API bool usesFBO() const;
00123 
00131         EQ_API static bool usesFBO( const GLEWContext* glewContext );
00132 
00133         const GLEWContext* glewGetContext() const { return _glewContext; }
00134 
00135     private:
00136         const GLEWContext* const _glewContext;
00137 
00138         int _width;
00139         int _height;
00140 
00141         AccumBufferObject* _abo;
00142         uint32_t _numSteps;
00143         uint32_t _totalSteps;
00144     };
00145 }
00146 }
00147 
00148 #endif // EQUTIL_ACCUM_H
Generated on Fri Jun 8 2012 15:44:29 for Equalizer 1.2.1 by  doxygen 1.8.0