Equalizer  1.4.1
include/seq/renderer.h
00001 
00002 /* Copyright (c) 2011, Stefan Eilemann <eile@eyescale.ch> 
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 EQSEQUEL_RENDERER_H
00019 #define EQSEQUEL_RENDERER_H
00020 
00021 #include <co/objectFactory.h> // interface
00022 #include <seq/types.h>
00023 
00024 namespace seq
00025 {
00032     class Renderer : public co::ObjectFactory
00033     {
00034     public:
00036         SEQ_API Renderer( Application& application );
00037 
00039         SEQ_API virtual ~Renderer();
00040 
00054         SEQ_API virtual bool init( co::Object* initData ) { return true; }
00055 
00065         SEQ_API virtual bool exit() { return true; }
00066 
00078         SEQ_API virtual bool initContext( co::Object* initData );
00079 
00087         SEQ_API virtual bool exitContext();
00088 
00096         SEQ_API virtual void clear( co::Object* frameData );
00097 
00105         virtual void draw( co::Object* frameData ) = 0;
00106 
00116         SEQ_API virtual void applyRenderContext();
00117 
00119         SEQ_API const RenderContext& getRenderContext() const;
00120 
00130         SEQ_API virtual void applyModelMatrix();
00132 
00135         detail::Renderer* getImpl() { return _impl; } 
00136         co::Object* getFrameData(); // @warning experimental
00137 
00139         Application& getApplication() { return _app; }
00140 
00142         const Application& getApplication() const { return _app; }
00143 
00154         SEQ_API virtual ViewData* createViewData();
00155 
00157         SEQ_API virtual void destroyViewData( ViewData* viewData );
00158 
00172         SEQ_API const GLEWContext* glewGetContext() const;
00173 
00175         SEQ_API const Frustumf& getFrustum() const;
00176 
00178         SEQ_API const Matrix4f& getViewMatrix() const;
00179 
00181         SEQ_API const Matrix4f& getModelMatrix() const;
00183 
00186         SEQ_API virtual co::Object* createObject( const uint32_t type );
00187         SEQ_API virtual void destroyObject( co::Object* object,
00188                                             const uint32_t type );
00190 
00191     private:
00192         detail::Renderer* _impl;
00193         Application& _app;
00194     };
00195 }
00196 #endif // EQSEQUEL_RENDERER_H
Generated on Mon Nov 26 2012 14:41:49 for Equalizer 1.4.1 by  doxygen 1.7.6.1