00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
00064 bool initGL();
00065
00066 Camera m_camera;
00067
00068 bool m_init;
00069
00070 long int m_vert_cp;
00071
00072 static bool m_GLSL;
00073
00074 bool m_grid;
00075 int m_gridx, m_gridz;
00076 };
00077
00078
00079
00080
00081 }
00082 }
00083 #endif