From bee6e14b086f98875b853a8fd2c2dfb60a769f83 Mon Sep 17 00:00:00 2001 From: MrLetsplay2003 Date: Wed, 13 Sep 2023 16:32:56 +0200 Subject: [PATCH] Fix struct packing --- .gitignore | 1 + src/kekengine/include/shader.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f23c456..e632abd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ build.win/ .vscode/ +.cache/ \ No newline at end of file diff --git a/src/kekengine/include/shader.h b/src/kekengine/include/shader.h index aee3dd5..cee8995 100644 --- a/src/kekengine/include/shader.h +++ b/src/kekengine/include/shader.h @@ -7,7 +7,7 @@ namespace kek { -#pragma pack(1) +#pragma pack(push, 1) struct ShaderLight { float color[3]; float pad; @@ -21,7 +21,7 @@ struct ShaderLight { //float lightSpaceMatrix[16]; // mat4 float padding[2]; }; -#pragma pack(0) +#pragma pack(pop) // Lighting data for shader struct LightingData {