Kaynağa Gözat

Merge pull request #3072 from Chaosus/shader_array_construct

Added missing constructor for shader arrays
Yuri Roubinsky 5 yıl önce
ebeveyn
işleme
350e0bb26c

+ 4 - 2
tutorials/shading/shading_reference/shading_language.rst

@@ -211,9 +211,11 @@ They can be initialized at the beginning like:
 
       float arr[3] = float[3] (1.0, 0.5, 0.0); // first constructor
 
-      vec2 arr_v2[2] = { vec2(0.0, 0.0), vec2(1.0, 1.0) }; // second constructor
+      float arr_v2[3] = float[] (1.0, 0.5, 0.0); // second constructor
 
-      bool bvec_arr[] = { false, false, true, true }; // third constructor - size is defined automatically from the argument count
+      vec2 arr_v3[2] = { vec2(0.0, 0.0), vec2(1.0, 1.0) }; // third constructor
+
+      bool bvec_arr[] = { false, false, true, true }; // fourth constructor - size is defined automatically from the argument count
 
 You can declare multiple arrays (even with different sizes) in one expression: