diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-11 14:12:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 14:12:18 +0200 |
commit | 5613ac37d658820fd0e4c3162f24a3b68414d3f9 (patch) | |
tree | 533d5ed29331e94be8f6978fd98137844376d55b /scene/3d/lightmap_gi.cpp | |
parent | 2ec68599a45231767bb970e7bf06a3bf7ed5fc91 (diff) | |
parent | 9381acb6a42da653cb6dfd9e610dfccead11aa98 (diff) |
Merge pull request #59440 from bruvzg/fd_ref_counted
Diffstat (limited to 'scene/3d/lightmap_gi.cpp')
-rw-r--r-- | scene/3d/lightmap_gi.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index 191a04b6a0..3461caf638 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -1101,7 +1101,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa //#define DEBUG_SIMPLICES_AS_OBJ_FILE #ifdef DEBUG_SIMPLICES_AS_OBJ_FILE { - FileAccessRef f = FileAccess::open("res://bsp.obj", FileAccess::WRITE); + Ref<FileAccess> f = FileAccess::open("res://bsp.obj", FileAccess::WRITE); for (uint32_t i = 0; i < bsp_simplices.size(); i++) { f->store_line("o Simplex" + itos(i)); for (int j = 0; j < 4; j++) { @@ -1118,7 +1118,6 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa f->store_line(vformat("f %d %d %d", 4 * i + face_order[j][0], 4 * i + face_order[j][1], 4 * i + face_order[j][2])); } } - f->close(); } #endif @@ -1150,7 +1149,7 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa } //#define DEBUG_BSP_TREE #ifdef DEBUG_BSP_TREE - FileAccessRef f = FileAccess::open("res://bsp.txt", FileAccess::WRITE); + Ref<FileAccess> f = FileAccess::open("res://bsp.txt", FileAccess::WRITE); for (uint32_t i = 0; i < bsp_nodes.size(); i++) { f->store_line(itos(i) + " - plane: " + bsp_nodes[i].plane + " over: " + itos(bsp_nodes[i].over) + " under: " + itos(bsp_nodes[i].under)); } |