mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 20:54:59 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
3
gl/ubo.h
3
gl/ubo.h
@@ -7,6 +7,7 @@
|
||||
#include <cstddef>
|
||||
#include <array>
|
||||
#include <utility>
|
||||
#include <span>
|
||||
|
||||
#define UBS_PAD(x) uint8_t PAD[x]
|
||||
|
||||
@@ -30,6 +31,8 @@ namespace gl
|
||||
void bind_uniform();
|
||||
|
||||
void update(const uint8_t *data, int offset, GLsizeiptr size);
|
||||
// the bytes given, put from the offset on
|
||||
void update(std::span<std::byte const> Data, int Offset);
|
||||
template <typename T> void update(const T &data, size_t offset = 0)
|
||||
{
|
||||
update(reinterpret_cast<const uint8_t*>(&data), static_cast<int>(offset), sizeof(data));
|
||||
|
||||
Reference in New Issue
Block a user