Page principale | Hiérarchie des classes | Liste alphabétique | Liste des classes | Liste des fichiers | Membres de classe

C:/Projects/ngn/include/renderer.h

00001 /***************************************************************************
00002  *            renderer.h
00003  *
00004  *  Mon Sep 13 18:25:57 2004
00005  *  Copyright  2004  thierry schartz
00006  *  thierry.schartz@bluebottle.com
00007  ****************************************************************************/
00008 
00009 /*
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU Library General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00023  */
00024  
00025 #ifndef _RENDERER_H
00026 #define _RENDERER_H
00027 
00028 #ifdef WIN32
00029 #include <windows.h>
00030 #endif
00031 
00032 
00033 #include <vector>
00034 #include "fps.h"
00035 #include "camera.h"
00036 
00037 namespace ngn {
00038 
00039         class Object3d; 
00040         class Object2d;
00041         class Vertex;
00042         class Model;
00043         class Light;
00044         class Billboard;
00045         
00046         namespace gl {
00047 
00048                 class Renderer
00049                 {
00050                         public:
00051                                 Renderer();
00052                                 virtual ~Renderer();
00053                                 
00054                                 void render( const std::vector<Object3d*>& vec3d, const std::vector<Object2d*>& vec2d, const std::vector<Model*>& models, const std::vector<Light*>& lights, const std::vector<Billboard*>& billboards );
00055                                 void setGrid( int x, int z );
00056                                 void showGrid( bool state );
00057 
00058                                 Camera& getCamera();
00059                                 static bool GLSL();
00060                                 void resizeGL();
00061                                 
00062                         private:
00063                                 // init OpenGL
00064                                 bool initGL();  
00065                                 // camera
00066                                 Camera m_camera;
00067                                 // initialized ?
00068                                 bool m_init;
00069                                 // vertices counter
00070                                 long int m_vert_cp;
00071                                 // GLSL support ?
00072                                 static bool m_GLSL;
00073                                 // draw grid
00074                                 bool m_grid;
00075                                 int m_gridx, m_gridz;
00076                 };
00077                 
00078                 
00079                 
00080                 
00081         }//gl
00082 }//ngn
00083 #endif /* _RENDERER_H */

Généré le Fri Nov 19 14:20:29 2004 pour NGN par  doxygen 1.3.9.1