TETRIS: only change textures in the main thread

This commit is contained in:
2021-01-30 23:01:36 +01:00
parent ff091a66b9
commit 79557e9edc
5 changed files with 26 additions and 7 deletions
+9
View File
@@ -147,6 +147,15 @@ int main() {
updateSize();
g_update_size = false;
}
for(size_t i = 0; i < g_update_scenes.size(); i++) {
g_update_scenes.back()->updateSizeAndPosition();
g_update_scenes.pop_back();
}
for(size_t i = 0; i < g_update_objects.size(); i++) {
g_update_objects.back()->updateSizeAndPosition();
g_update_objects.pop_back();
}
renderer->clearRenderer();
for ( auto &x : g_active_scenes ) {