Mercurial > hg > Game > Cerium
diff Renderer/Engine/viewer.h @ 1405:aafad9d18a2c draft
sepalate light
author | taiki |
---|---|
date | Fri, 17 Feb 2012 15:34:15 +0900 |
parents | 90efd2aac2cb |
children | 3778a1eda68d |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.h Wed Feb 15 17:45:24 2012 +0900 +++ b/Renderer/Engine/viewer.h Fri Feb 17 15:34:15 2012 +0900 @@ -10,29 +10,34 @@ #include "Application.h" #include "SceneGraphRoot.h" #include "ViewerDevice.h" +#include "Light.h" class SceneGraphRoot; class Application; -typedef struct rendering_data { - PolygonPack *ppack; - SpanPackPtr spackList; - SpanPackPtr *spackList_ptr; - - int spackList_length; - int spackList_length_align; -} RenderingData ; - -extern RenderingData r[2]; - -extern int ppi, spi; - class Viewer : public MainLoop { public: - Viewer(){ profile = 0;}; + Light *light; +/* measure for FPS (Frame Per Second) */ + int start_time; + int this_time; + int frames; + + typedef struct rendering_data { + PolygonPack *ppack; + SpanPackPtr spackList; + SpanPackPtr *spackList_ptr; + + int spackList_length; + int spackList_length_align; + } RenderingData ; + RenderingData r[2]; + + int ppi, spi; + Viewer(){ profile = 0; ppi = spi = 0;}; Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum); virtual ~Viewer() {} @@ -108,6 +113,8 @@ // void setSceneData(SceneGraph *g); virtual void mainLoop(); + // In Application::init, SceneGraphRoot API is called bia viewer + void createStringFont(SceneGraphPtr root, const char *string, int pixels, int screen_w, int screen_h, Uint32 color) { sgroot -> createStringFont(manager, root, string, pixels, screen_w, screen_h, color);