00001 #ifndef __DEMOMANAGER__H__
00002 #define __DEMOMANAGER__H__
00003
00004 #include <Windows.h>
00005 #include <vector>
00006
00007 #include "../Util/Singleton.h"
00008 #include "../Util/Matrix4.h"
00009 #include "../Util/Vector2.h"
00010 #include "../Util/Color.h"
00011 #include "../Util/AntTweakBar.h"
00012
00013 #include "../Main/GraphManager.h"
00014
00015 #include <IL/il.h>
00016 #include <IL/ilu.h>
00017 #include <IL/ilut.h>
00018
00019 class DemoManager : public Singleton<DemoManager>
00020 {
00021 friend class Singleton<DemoManager>;
00022
00023 public:
00024
00025 DemoManager(void);
00026
00028 void Init(void);
00029
00031 void Exit(void);
00032
00034 void Reshape(int& w, int& h);
00035
00037 void Update(void);
00038
00040 void Render(void);
00041
00043 void RenderText(int x, int y, char* text);
00044
00046 TwBar* GetBar(void) const { return bar; }
00047
00049 void SaveImage(const char* fileName, int setIdx);
00050
00051 private:
00053 void RenderScreenQuad(void);
00054
00056 void ProcessInput(void);
00057
00059 Color HSVtoRGB(float h, float s, float v, float alpha);
00060
00062 LARGE_INTEGER lastTime;
00063 LARGE_INTEGER frequency;
00064 double framesPerSeconds;
00065 double elapsedTime;
00066
00067
00068 unsigned int gameProjection;
00069
00070
00071 float timeSum;
00072 LONG frameCount;
00073 float frameRate;
00074
00076 TwBar* bar;
00077
00078 float beta;
00079 TreeLayout treeLayout;
00080
00081 int currentWidth;
00082 int currentHeight;
00083 };
00084
00085 #endif