mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-13 13:35:14 +01:00
gl_rasterizer: Use alignas(16) instead of explicit padding.
This commit is contained in:
parent
aaa7beeda8
commit
c4d318f691
@ -289,16 +289,11 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LightSrc {
|
struct LightSrc {
|
||||||
GLvec3 specular_0;
|
alignas(16) GLvec3 specular_0;
|
||||||
INSERT_PADDING_WORDS(1);
|
alignas(16) GLvec3 specular_1;
|
||||||
GLvec3 specular_1;
|
alignas(16) GLvec3 diffuse;
|
||||||
INSERT_PADDING_WORDS(1);
|
alignas(16) GLvec3 ambient;
|
||||||
GLvec3 diffuse;
|
alignas(16) GLvec3 position;
|
||||||
INSERT_PADDING_WORDS(1);
|
|
||||||
GLvec3 ambient;
|
|
||||||
INSERT_PADDING_WORDS(1);
|
|
||||||
GLvec3 position;
|
|
||||||
INSERT_PADDING_WORDS(1);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Uniform structure for the Uniform Buffer Object, all members must be 16-byte aligned
|
/// Uniform structure for the Uniform Buffer Object, all members must be 16-byte aligned
|
||||||
@ -308,9 +303,7 @@ private:
|
|||||||
GLvec4 tev_combiner_buffer_color;
|
GLvec4 tev_combiner_buffer_color;
|
||||||
GLint alphatest_ref;
|
GLint alphatest_ref;
|
||||||
GLfloat depth_offset;
|
GLfloat depth_offset;
|
||||||
INSERT_PADDING_WORDS(2);
|
alignas(16) GLvec3 lighting_global_ambient;
|
||||||
GLvec3 lighting_global_ambient;
|
|
||||||
INSERT_PADDING_WORDS(1);
|
|
||||||
LightSrc light_src[8];
|
LightSrc light_src[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user