Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/viewer.h @ 760:24a37fe8419a
first of all commit, not work Rendering/Test/create_task
author | hiroki |
---|---|
date | Thu, 04 Feb 2010 14:46:09 +0900 |
parents | b7376415fa5f |
children | 4455e7b0caf3 |
line wrap: on
line source
#ifndef INCLUDED_VIEWER #define INCLUDED_VIEWER #include <SDL.h> #include "viewer_types.h" #include "TaskManager.h" #include "KeyStat.h" #include "MainLoop.h" #include "Application.h" #include "SceneGraphRoot.h" #include "ViewerDevice.h" class SceneGraphRoot; class Application; class Viewer : public MainLoop { public: Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum); virtual ~Viewer() {} BASE_NEW_DELETE(Viewer); ViewerDevice *dev; Application *app; TaskManager *manager; key_stat *keyPtr; HTaskPtr draw_dummy; /* screen info */ int bpp; int rgb_size[3]; int spe_num; int width; int height; //float light_xyz[4] __attribute__((aligned(16))); float *light_xyz; float *light_xyz_stock; Uint32 video_flags; Uint32 *pixels; SceneGraphRoot *sgroot; //Uint32 *video_init(TaskManager *manager, int bpp, int width, int height); void init(); int get_ticks(); bool quit_check(); void quit(); HTaskPtr initLoop(); void clean_pixels() {} void run_init(TaskManager *manager, Application *app); void run_loop(HTaskPtr task_next); void run_draw(HTaskPtr task_next); void run_finish(); void run_move(HTaskPtr task_next); void run_collision(); void rendering(HTaskPtr task_next); void common_draw(HTaskPtr task_next); void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot); void spe_rendering(HTaskPtr task_next); void spe_draw(HTaskPtr task_next); // void exchange_sgroot(TaskManager *manager); void getKey(); void get_send_controll(); // void createFromXMLfile(const char *file); // SceneGraph *createSceneGraph(int id); // SceneGraph *createSceneGraph(); // void setSceneData(SceneGraph *g); void mainLoop(); void createFromXMLmemory(SceneGraph * node, char *data, int len) { sgroot->createFromXMLmemory(manager, node, data, len); } void createFromXMLfile(const char *file) { sgroot->createFromXMLfile(manager, file); } SceneGraph * createSceneGraph(int id) { return sgroot->createSceneGraph(id); } SceneGraph * createSceneGraph(const char *id) { return sgroot->createSceneGraph(id); } int getSgid(const char *id) { return sgroot->getSgid(id); } SceneGraph * createSceneGraph() { return sgroot->createSceneGraph(); } void setSceneData(SceneGraph *g) { sgroot->setSceneData(g); } int getLast() { return sgroot->getLast(); } }; #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK #endif