From 3a9669df3820f655b41c8c4bebf2a753ff253963 Mon Sep 17 00:00:00 2001 From: falsycat Date: Wed, 16 Oct 2019 00:00:00 +0000 Subject: [PATCH] [update] Replaced dummy variables with alignment specifications. --- src/sj/CubeProgram.d | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/sj/CubeProgram.d b/src/sj/CubeProgram.d index fbb26e9..c76264e 100644 --- a/src/sj/CubeProgram.d +++ b/src/sj/CubeProgram.d @@ -14,23 +14,18 @@ class CubeProgram { static struct Material { public: /// - vec3 diffuse_color = vec3(1, 1, 1); - private float padding0_; + align(16) vec3 diffuse_color = vec3(1, 1, 1); /// - vec3 specular_color = vec3(1, 1, 1); - private float padding1_; + align(16) vec3 specular_color = vec3(1, 1, 1); /// - vec3 light_color = vec3(1, 1, 1); - private float padding2_; + align(16) vec3 light_color = vec3(1, 1, 1); /// - vec3 light_power = vec3(20, 20, 20); - private float padding3_; + align(16) vec3 light_power = vec3(20, 20, 20); /// - vec3 ambient_color = vec3(0.3, 0.3, 0.3); - private float padding4_; + align(16) vec3 ambient_color = vec3(0.3, 0.3, 0.3); } ///