examples/eVolve/channel.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com>
00003  *               2007-2009, Maxim Makhinya
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 EVOLVE_CHANNEL_H
00020 #define EVOLVE_CHANNEL_H
00021 
00022 #include "eVolve.h"
00023 #include "frameData.h"
00024 
00025 #include <eq/eq.h>
00026 #include <eq/client/types.h>
00027 
00028 namespace eVolve
00029 {
00030     class InitData;
00031 
00032     class Channel : public eq::Channel
00033     {
00034     public:
00035         Channel( eq::Window* parent );
00036 
00037     protected:
00038         virtual ~Channel() {}
00039 
00040         virtual bool configInit( const uint32_t initID );
00041 
00042         virtual void frameStart( const uint32_t frameID, 
00043                                  const uint32_t frameNumber );
00044 
00045         virtual void frameDraw( const uint32_t frameID );
00046         virtual void frameAssemble( const uint32_t frameID );
00047         virtual void frameReadback( const uint32_t frameID );
00048         virtual void frameViewFinish( const uint32_t frameID );
00049 
00051         virtual void applyFrustum() const;
00052 
00053         void clearViewport( const eq::PixelViewport &pvp );
00054 
00055         void frameClear( const uint32_t frameID );
00056 
00057     private:
00058         void _startAssemble();
00059 
00060         void _orderFrames( eq::FrameVector& frames );
00061 
00062         void _calcMVandITMV( eq::Matrix4f& modelviewM, 
00063                              eq::Matrix3f& modelviewITM ) const;
00064 
00065         const FrameData& _getFrameData() const;
00066 
00067         void _drawLogo();
00068         void _drawHelp();
00069 
00070         eq::Vector3f _bgColor; 
00071         eq::Frame _frame;     
00072         eq::Range _drawRange; 
00073     };
00074 
00075 }
00076 
00077 #endif // EVOLVE_CHANNEL_H
00078 
Generated on Sat Feb 6 12:59:45 2010 for Equalizer 0.9.1 by  doxygen 1.6.1