Equalizer  1.2.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 <seq/objectFactory.h> // interface
00022 #include <seq/types.h>
00023 
00024 namespace seq
00025 {
00032     class Renderer : public 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 
00127         SEQ_API virtual void applyModelMatrix();
00129 
00132         detail::Renderer* getImpl() { return _impl; } 
00133         co::Object* getFrameData(); // @warning experimental
00134 
00136         Application& getApplication() { return _app; }
00137 
00139         const Application& getApplication() const { return _app; }
00140 
00151         SEQ_API virtual ViewData* createViewData();
00152 
00154         SEQ_API virtual void destroyViewData( ViewData* viewData );
00155 
00169         SEQ_API const GLEWContext* glewGetContext() const;
00170 
00172         SEQ_API const Frustumf& getFrustum() const;
00173 
00175         SEQ_API const Matrix4f& getViewMatrix() const;
00176 
00178         SEQ_API const Matrix4f& getModelMatrix() const;
00180 
00183         SEQ_API virtual eq::Config* getConfig();
00184         SEQ_API virtual co::Object* createObject( const uint32_t type );
00185         SEQ_API virtual void destroyObject( co::Object* object,
00186                                             const uint32_t type );
00188 
00189     private:
00190         detail::Renderer* _impl;
00191         Application& _app;
00192     };
00193 }
00194 #endif // EQSEQUEL_RENDERER_H
Generated on Fri Jun 8 2012 15:44:32 for Equalizer 1.2.1 by  doxygen 1.8.0