examples/eVolve/channel.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EVOLVE_CHANNEL_H
00019 #define EVOLVE_CHANNEL_H
00020 
00021 #include "eVolve.h"
00022 #include "frameData.h"
00023 
00024 #include <eq/eq.h>
00025 #include <eq/client/types.h>
00026 
00027 namespace eVolve
00028 {
00029     class InitData;
00030 
00031     class Channel : public eq::Channel
00032     {
00033     public:
00034         Channel( eq::Window* parent );
00035 
00036     protected:
00037         virtual ~Channel() {}
00038 
00039         virtual bool configInit( const uint32_t initID );
00040 
00041         virtual void frameStart( const uint32_t frameID, 
00042                                  const uint32_t frameNumber );
00043 
00044         virtual void frameDraw( const uint32_t frameID );
00045         virtual void frameAssemble( const uint32_t frameID );
00046         virtual void frameReadback( const uint32_t frameID );
00047         virtual void frameViewFinish( const uint32_t frameID );
00048 
00050         virtual void applyFrustum() const;
00051 
00052         void clearViewport( const eq::PixelViewport &pvp );
00053 
00054         void frameClear( const uint32_t frameID );
00055 
00056     private:
00057         void _startAssemble();
00058 
00059         void _orderFrames( eq::FrameVector& frames );
00060 
00061         void _calcMVandITMV( eq::Matrix4f& modelviewM, 
00062                              eq::Matrix3f& modelviewITM ) const;
00063 
00064         const FrameData::Data& _getFrameData() const;
00065 
00066         eq::Vector3f _bgColor; 
00067         eq::Frame _frame;     
00068         eq::Range _drawRange; 
00069     };
00070 
00071 }
00072 
00073 #endif // EVOLVE_CHANNEL_H
00074 
Generated on Mon Aug 10 18:58:31 2009 for Equalizer 0.9 by  doxygen 1.5.8