Refactor bindings to allow for eliminating duplicates... (#1831)
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
@@ -68,13 +68,18 @@ public:
|
||||
std::shared_ptr<UniformBuffer> uniformBuffer);
|
||||
|
||||
/// Create and add a new buffer or update an existing one
|
||||
void createOrUpdate(const StringIdentity id, const std::vector<uint8_t>& data, gfx::Context&);
|
||||
void createOrUpdate(const StringIdentity id, const void* data, std::size_t size, gfx::Context&);
|
||||
void createOrUpdate(const StringIdentity id,
|
||||
const std::vector<uint8_t>& data,
|
||||
gfx::Context&,
|
||||
bool persistent = false);
|
||||
void createOrUpdate(
|
||||
const StringIdentity id, const void* data, std::size_t size, gfx::Context&, bool persistent = false);
|
||||
template <typename T>
|
||||
std::enable_if_t<!std::is_pointer_v<T>> createOrUpdate(const StringIdentity id,
|
||||
const T* data,
|
||||
gfx::Context& context) {
|
||||
createOrUpdate(id, data, sizeof(T), context);
|
||||
gfx::Context& context,
|
||||
bool persistent = false) {
|
||||
createOrUpdate(id, data, sizeof(T), context, persistent);
|
||||
}
|
||||
|
||||
UniformBufferArray& operator=(UniformBufferArray&&);
|
||||
|
||||
Reference in New Issue
Block a user