persist module render commands

This commit is contained in:
2025-03-30 10:44:01 -05:00
parent 64636c2771
commit 03776d16bc
5 changed files with 26 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ namespace Archimedes {
protected:
Window* window;
//Renderer* renderer;
};
}

View File

@@ -17,7 +17,16 @@ namespace Archimedes {
void render();
void addRenderCmd(renderCmd* cmd) { rc.push_back(cmd); }
std::list<renderCmd*>::iterator addRenderCmd(renderCmd* cmd) {
auto it = rc.end();
rc.push_back(cmd);
return it;
}
void removeRenderCmd(std::list<renderCmd*>::iterator cmd) {
rc.erase(cmd);
}
private:
std::list<renderCmd*> rc;

View File

@@ -27,7 +27,6 @@ namespace Archimedes {
for(auto* f : cmdList)
f();
cmdList.clear();
}
};