Browse code

Change in copy constructor to work, test accordingly

oscar authored on 11/02/2021 22:35:08
Showing 2 changed files

... ...
@@ -14,7 +14,16 @@
14 14
 class Shader {
15 15
 public:
16 16
 
17
-    Shader() = default;
17
+    Shader() : 
18
+    paths_         {},
19
+    name_          {},
20
+    program_       {},
21
+    location_cache_{},
22
+    index_cache_   {}
23
+    { 
24
+    };
25
+
26
+    
18 27
     Shader(std::vector<std::string> paths, std::string name = "");
19 28
     Shader(Shader &&);
20 29
     Shader(Shader const &);
... ...
@@ -85,10 +85,12 @@ void test() {
85 85
     Shader shaderCopy;
86 86
 
87 87
     std::cout << "Moving shader" << std::endl;
88
-    shaderMove = Shader({"test.vert", "test.frag"});
88
+    shaderMove = Shader({"good.vert", "good.frag"});
89
+    std::cout << "Moving shader done" << std::endl;
89 90
 
90 91
     std::cout << "Copying shader" << std::endl;
91 92
     shaderCopy = shaderMove;
93
+    std::cout << "Copying shader done" << std::endl;
92 94
 
93 95
     shader.use();
94 96
     shader.validate();