summaryrefslogtreecommitdiffstats
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-10-02 09:59:25 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-10-02 10:00:15 -0300
commitbad991ea83fc2b0ae8e1dd58add9ed7802d61045 (patch)
tree52a0db96285afebc15c049a672e3d794787a34be /scene
parent0b73a9e403a99af7c909908866d2b7822ddf3d44 (diff)
downloadredot-engine-bad991ea83fc2b0ae8e1dd58add9ed7802d61045.tar.gz
Many more fixes for GLES2 mobile export. Also added ability to turn on OpenGL debugging on Android export.
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/voxel_light_baker.cpp3
-rw-r--r--scene/3d/voxel_light_baker.h10
2 files changed, 12 insertions, 1 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index 651a057392..68359eac52 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -734,7 +734,8 @@ void VoxelLightBaker::_check_init_light() {
leaf_voxel_count = 0;
_fixup_plot(0, 0); //pre fixup, so normal, albedo, emission, etc. work for lighting.
bake_light.resize(bake_cells.size());
- zeromem(bake_light.ptrw(), bake_light.size() * sizeof(Light));
+ print_line("bake light size: " + itos(bake_light.size()));
+ //zeromem(bake_light.ptrw(), bake_light.size() * sizeof(Light));
first_leaf = -1;
_init_light_plot(0, 0, 0, 0, 0, CHILD_EMPTY);
}
diff --git a/scene/3d/voxel_light_baker.h b/scene/3d/voxel_light_baker.h
index 6a1f1253a3..3d55c053f3 100644
--- a/scene/3d/voxel_light_baker.h
+++ b/scene/3d/voxel_light_baker.h
@@ -92,6 +92,16 @@ private:
float accum[6][3]; //rgb anisotropic
float direct_accum[6][3]; //for direct bake
int next_leaf;
+ Light() {
+ x = y = z = 0;
+ for (int i = 0; i < 6; i++) {
+ for (int j = 0; j < 3; j++) {
+ accum[i][j] = 0;
+ direct_accum[i][j] = 0;
+ }
+ }
+ next_leaf = 0;
+ }
};
int first_leaf;