accum.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef EQUTIL_ACCUM_H
00020 #define EQUTIL_ACCUM_H
00021
00022 #include <eq/client/os.h>
00023
00024 namespace eq
00025 {
00026 class PixelViewport;
00027
00028 namespace util
00029 {
00030 class AccumBufferObject;
00031
00040 class Accum
00041 {
00042 public:
00044 EQ_EXPORT Accum( GLEWContext* const glewContext );
00045
00047 EQ_EXPORT ~Accum();
00048
00055 EQ_EXPORT bool init( const PixelViewport& pvp, GLuint textureFormat );
00056
00060 EQ_EXPORT void exit();
00061
00069 EQ_EXPORT bool resize( const int width, const int height );
00070
00074 EQ_EXPORT void clear();
00075
00079 EQ_EXPORT void accum();
00080
00084 EQ_EXPORT void display();
00085
00092 EQ_EXPORT uint32_t getMaxSteps() const;
00093
00099 EQ_EXPORT uint32_t getNumSteps() const { return _numSteps; }
00100
00109 EQ_EXPORT void setTotalSteps( uint32_t totalSteps )
00110 { _totalSteps = totalSteps; }
00111 EQ_EXPORT uint32_t getTotalSteps() { return _totalSteps; }
00112
00119 EQ_EXPORT bool usesFBO() const;
00120
00127 EQ_EXPORT static bool usesFBO( const GLEWContext* glewContext );
00128
00129 GLEWContext* glewGetContext() { return _glewContext; }
00130 const GLEWContext* glewGetContext() const { return _glewContext; }
00131
00132 private:
00133 GLEWContext* const _glewContext;
00134
00135 int _width;
00136 int _height;
00137
00138 AccumBufferObject* _abo;
00139 uint32_t _numSteps;
00140 uint32_t _totalSteps;
00141 };
00142 }
00143 }
00144
00145 #endif //EQUTIL_ACCUMULATION_H