Mercurial > hg > Game > Cerium
view Renderer/Engine/SgChange.h @ 682:b215da88416d draft
debug , aligned light_xyz
author | hiroki@localhost.localdomain |
---|---|
date | Tue, 08 Dec 2009 19:44:20 +0900 |
parents | 4f7512038ced |
children | 8397aa75c902 |
line wrap: on
line source
#ifndef INCLUDED_SG_CHANGE #define INCLUDED_SG_CHANGE #include <SDL.h> #include "viewer_types.h" #include "TaskManager.h" #include "KeyStat.h" #include "MainLoop.h" #include "Application.h" #include "SceneGraphRoot.h" class SceneGraphRoot; class Application; class SgChange : public MainLoop { public: SgChange(int bpp, int width, int height, int spenum); virtual ~SgChange() {} Application *app; TaskManager *manager; key_stat *keyPtr; HTaskPtr draw_dummy; SceneGraphRoot *sgroot_A; SceneGraphRoot *sgroot_B; /* screen info */ int width; int height; int bpp; int spe_num; float light_xyz[4] __attribute__((aligned(16))); float *light_xyz_stock; int rgb_size[3]; Uint32 video_flags; Uint32 *pixels; virtual void video_init(TaskManager *manager) = 0; void init(); int get_ticks(); bool quit_check(); void quit(); virtual void swap_buffers(); virtual void clean_pixels() {} virtual void run_init(TaskManager *manager, Application *app); virtual void run_loop(HTaskPtr task_next); virtual void run_finish(); virtual void run_draw(HTaskPtr task_next); virtual void exchange_sgroot(); virtual void rendering(HTaskPtr task_next); virtual void common_draw(HTaskPtr task_next); virtual void common_rendering(HTaskPtr task_next); void mainLoop(); void createFromXMLfile(const char *file) { sgroot_A->createFromXMLfile(manager, file); } SceneGraph * createSceneGraph(int id) { return sgroot_A->createSceneGraph(id); } SceneGraph * createSceneGraph(const char *id) { return sgroot_A->createSceneGraph(id); } int getSgid(const char *id) { return sgroot_A->getSgid(id); } SceneGraph * createSceneGraph() { return sgroot_A->createSceneGraph(); } void setSceneData(SceneGraph *g) { sgroot_A->setSceneData(g); } int getLast() { return sgroot_A->getLast(); } private: HTaskPtr initLoop(); }; #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK #endif