Finish companion controls and retain panel textures during manipulation

This commit is contained in:
baketnk committed 2026-10-04 21:43:55 -04:00
1 parent b0767d1b36
commit bcd330d42c
28 files changed
+906 -158

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
#pragma once
#include <utility>
namespace frameyap {
// Follow docs/rendering-performance.md: retain initialized images throughout
// manipulation, leaving content invalidation pending until the next refresh.
template<class Render, class Upload>
bool refresh_texture(bool manipulating, bool initialized, Render&& render, Upload&& upload) {
if (manipulating && initialized) return false;
if (!std::forward<Render>(render)()) return false;
std::forward<Upload>(upload)();
return true;
}
}