+ if (fixIt) stackIt = --stack.begin();
+
+ return popped.back();
+ }
+ }
+
+ return LayerP();
+ }
+
+ void clear()
+ {
+ stack.clear();
+ stackIt = stack.begin();
+ logInfo("clear: %d", stack.size());
+ }
+
+
+ Engine& interface;
+
+ VideoP video;
+
+ std::list<LayerP> stack;
+ std::list<LayerP>::iterator stackIt;
+
+ Scalar timestep;
+ Scalar drawRate;
+
+ long fps;
+ bool printFps;
+};
+
+
+static Engine* instance = 0;
+
+Engine::Engine(int argc, char* argv[], const std::string& name,
+ const std::string& iconFile, const std::string& configFile) :
+ impl_(new Engine::Impl(argc, argv, name, iconFile, configFile, *this))