16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 13:59:19 +02:00
This commit is contained in:
milek7
2018-07-15 00:46:01 +02:00
parent 4566375faa
commit 794093dad4
17 changed files with 346 additions and 184 deletions

View File

@@ -31,14 +31,17 @@ namespace gl
#pragma pack(push, 1)
const size_t MAX_TEXTURES = 4;
struct scene_ubs
{
glm::mat4 projection;
glm::mat4 lightview;
float time;
UBS_PAD(12)
};
static_assert(sizeof(scene_ubs) == 132, "bad size of ubs");
static_assert(sizeof(scene_ubs) == 144, "bad size of ubs");
const size_t MAX_PARAMS = 3;
@@ -51,6 +54,7 @@ namespace gl
glm::vec3 velocity;
float opacity;
float emission;
UBS_PAD(12)
void set_modelview(const glm::mat4 &mv)
{
@@ -59,7 +63,7 @@ namespace gl
}
};
static_assert(sizeof(model_ubs) == 156 + 8 * MAX_PARAMS, "bad size of ubs");
static_assert(sizeof(model_ubs) == 144 + 16 * MAX_PARAMS, "bad size of ubs");
struct light_element_ubs
{