class Main : public Application, public EventListener { public: virtual int main(const List<String>& args) { root = Root::instance(); video = root->videoManager(); input = root->inputManager(); video->init(Size(640, 480), 32, "Hello World", false); while (root->running()) { input->capture(); video->beginDraw(); // draw everthing video->endDraw(); } return 0; } protected: virtual void quitEvent() { root->shutdown(); } private: Root* root; VideoManager* video; InputManager* input; } app;