Prechádzať zdrojové kódy

fix 3D scene not rendered on GLES3 HTML5 export

fix pad size of SceneDataUBO
uuuuuup 4 rokov pred
rodič
commit
0dc0a4a523
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      drivers/gles3/rasterizer_scene_gles3.h

+ 2 - 1
drivers/gles3/rasterizer_scene_gles3.h

@@ -157,9 +157,10 @@ public:
 			uint32_t view_index;
 
 			// make sure this struct is padded to be a multiple of 16 bytes for webgl
-			float pad[1];
+			float pad[3];
 
 		} ubo_data;
+		static_assert(sizeof(SceneDataUBO) % 16 == 0, "SceneDataUBO size must be a multiple of 16 bytes");
 
 		GLuint scene_ubo;