16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 16:19:19 +02:00
This commit is contained in:
milek7
2018-07-11 00:30:33 +02:00
parent a13fc4e500
commit 94712f5c77
16 changed files with 297 additions and 91 deletions

View File

@@ -1,3 +1,5 @@
#pragma once
#include "object.h"
#include "bindable.h"
@@ -16,7 +18,11 @@ namespace gl
using bindable::bind;
static void bind(GLuint i);
void update(void *data, int offset, int size);
void update(const uint8_t *data, int offset, int size);
template <typename T> void update(const T &data, size_t offset = 0)
{
update(reinterpret_cast<const uint8_t*>(&data), offset, sizeof(data));
}
};
// layout std140