Share identical uniform buffers across drawables for background, line. (#1346)

This commit is contained in:
Tim Sylvester
2023-07-12 09:58:01 -07:00
committed by Bart Louwers
parent 3056f28756
commit 4eef2e3529
18 changed files with 158 additions and 111 deletions

View File

@@ -62,7 +62,9 @@ public:
void createOrUpdate(std::string_view name, const std::vector<uint8_t>& data, gfx::Context&);
void createOrUpdate(std::string_view name, const void* data, std::size_t size, gfx::Context&);
template <typename T>
void createOrUpdate(std::string_view name, const T* data, gfx::Context& context) {
std::enable_if_t<!std::is_pointer_v<T>> createOrUpdate(std::string_view name,
const T* data,
gfx::Context& context) {
createOrUpdate(name, data, sizeof(T), context);
}