summaryrefslogtreecommitdiff
path: root/servers/visual/visual_server_raster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/visual_server_raster.cpp')
-rw-r--r--servers/visual/visual_server_raster.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 7be3bc562d..7aded4e816 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -33,9 +33,9 @@
#include "core/io/marshalls.h"
#include "core/os/os.h"
#include "core/project_settings.h"
-#include "core/sort.h"
+#include "core/sort_array.h"
#include "visual_server_canvas.h"
-#include "visual_server_global.h"
+#include "visual_server_globals.h"
#include "visual_server_scene.h"
// careful, these may run in different threads than the visual server
@@ -77,6 +77,8 @@ void VisualServerRaster::free(RID p_rid) {
return;
if (VSG::scene->free(p_rid))
return;
+ if (VSG::scene_render->free(p_rid))
+ return;
}
/* EVENT QUEUING */
@@ -123,7 +125,6 @@ void VisualServerRaster::draw(bool p_swap_buffers, double frame_step) {
frame_drawn_callbacks.pop_front();
}
-
VS::get_singleton()->emit_signal("frame_post_draw");
}
void VisualServerRaster::sync() {
@@ -154,10 +155,10 @@ int VisualServerRaster::get_render_info(RenderInfo p_info) {
/* TESTING */
-void VisualServerRaster::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
+void VisualServerRaster::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter) {
redraw_request();
- VSG::rasterizer->set_boot_image(p_image, p_color, p_scale);
+ VSG::rasterizer->set_boot_image(p_image, p_color, p_scale, p_use_filter);
}
void VisualServerRaster::set_default_clear_color(const Color &p_color) {
VSG::viewport->set_default_clear_color(p_color);
@@ -202,8 +203,10 @@ VisualServerRaster::VisualServerRaster() {
VSG::canvas_render = VSG::rasterizer->get_canvas();
VSG::scene_render = VSG::rasterizer->get_scene();
- for (int i = 0; i < 4; i++)
+ for (int i = 0; i < 4; i++) {
black_margin[i] = 0;
+ black_image[i] = RID();
+ }
}
VisualServerRaster::~VisualServerRaster() {