work on layers
This commit is contained in:
@@ -143,6 +143,14 @@ namespace Archimedes {
|
||||
}
|
||||
|
||||
virtual void unload(std::string name) {
|
||||
|
||||
//unload modules that depend on the one we are unloading
|
||||
for(std::string s : runOrder) {
|
||||
if(modules[s]->deps.find(name) != modules[s]->deps.end()) {
|
||||
unload(s);
|
||||
}
|
||||
}
|
||||
|
||||
Module* m = modules[name];
|
||||
void* h = m->getHandle();
|
||||
|
||||
|
||||
@@ -16,9 +16,11 @@ namespace Archimedes {
|
||||
}
|
||||
}
|
||||
|
||||
void push(Layer* l) {
|
||||
lstack.push_front(l);
|
||||
l->onAttach();
|
||||
void push(Layer* l) {
|
||||
if(l) {
|
||||
lstack.push_front(l);
|
||||
l->onAttach();
|
||||
}
|
||||
}
|
||||
|
||||
void pop() {
|
||||
|
||||
@@ -21,13 +21,13 @@ namespace Archimedes {
|
||||
return glewInit() == GLEW_OK;
|
||||
};
|
||||
|
||||
void render(std::list<renderCmd*> cmdList, int& w, int& h) {
|
||||
void render(std::list<std::function<void()>> cmdList, int& w, int& h) {
|
||||
|
||||
glViewport(0, 0, w, h);
|
||||
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
for(auto* f : cmdList)
|
||||
for(auto f : cmdList)
|
||||
f();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user