Equalizer 1.0

accum.h

00001 
00002 /* Copyright (c) 2009-2010, 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/gl.h>  // for GLEW
00023 #include <eq/types.h>
00024 
00025 namespace eq
00026 {
00027 namespace util
00028 {
00029     class AccumBufferObject;
00030 
00040     class Accum
00041     {
00042     public: 
00044         EQ_API Accum( const GLEWContext* const glewContext );
00045 
00047         EQ_API ~Accum();
00048 
00057         EQ_API bool init( const PixelViewport& pvp, GLuint textureFormat );
00058 
00060         EQ_API void exit();
00061 
00070         EQ_API bool resize( const int width, const int height );
00071 
00073         EQ_API void clear();
00074 
00079         EQ_API void accum();
00080 
00085         EQ_API void display();
00086 
00093         EQ_API uint32_t getMaxSteps() const;
00094 
00101         uint32_t getNumSteps() const { return _numSteps; }
00102 
00112         void setTotalSteps( uint32_t totalSteps )
00113             { _totalSteps = totalSteps; }
00114 
00116         uint32_t getTotalSteps() { return _totalSteps; }
00117 
00124         EQ_API bool usesFBO() const;
00125 
00133         EQ_API static bool usesFBO( const GLEWContext* glewContext );
00134 
00135         const GLEWContext* glewGetContext() const { return _glewContext; }
00136 
00137     private:
00138         const GLEWContext* const _glewContext;
00139 
00140         int _width;
00141         int _height;
00142 
00143         AccumBufferObject* _abo;
00144         uint32_t _numSteps;
00145         uint32_t _totalSteps;
00146     };
00147 }
00148 }
00149 
00150 #endif // EQUTIL_ACCUM_H
Generated on Sun May 8 2011 19:11:04 for Equalizer 1.0 by  doxygen 1.7.3