diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-06-13 22:37:19 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-06-15 23:53:39 +0200 |
commit | 786a7341a7443390e2c98ff7fe00a995f4d8cf67 (patch) | |
tree | 826e249ec431e737f89569dd3b7ede3ba56afc19 /servers | |
parent | bd937ea397e23e5462cd8dd606dab1432d702d0c (diff) |
Add an option to disable boot splash filtering
Disabling filtering is usually desired in projects using a pixel art style.
This closes #19415.
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/rasterizer.h | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 4 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.h | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_wrap_mt.h | 2 | ||||
-rw-r--r-- | servers/visual_server.cpp | 2 | ||||
-rw-r--r-- | servers/visual_server.h | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h index 31888261ec..77ab1b5548 100644 --- a/servers/visual/rasterizer.h +++ b/servers/visual/rasterizer.h @@ -1103,7 +1103,7 @@ public: virtual RasterizerCanvas *get_canvas() = 0; virtual RasterizerScene *get_scene() = 0; - virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) = 0; + virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) = 0; virtual void initialize() = 0; virtual void begin_frame(double frame_step) = 0; diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index 310aa16130..d45bda72b7 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -153,10 +153,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); diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index 921d55556d..81010c32d3 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -685,7 +685,7 @@ public: /* TESTING */ - virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale); + virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true); virtual void set_default_clear_color(const Color &p_color); virtual bool has_feature(Features p_feature) const; diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h index cd24deb60c..d6da914c37 100644 --- a/servers/visual/visual_server_wrap_mt.h +++ b/servers/visual/visual_server_wrap_mt.h @@ -602,7 +602,7 @@ public: return visual_server->get_render_info(p_info); } - FUNC3(set_boot_image, const Ref<Image> &, const Color &, bool) + FUNC4(set_boot_image, const Ref<Image> &, const Color &, bool, bool) FUNC1(set_default_clear_color, const Color &) FUNC0R(RID, get_test_cube) diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index 0fe00ad61a..27288768eb 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -2047,7 +2047,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_test_texture"), &VisualServer::get_test_texture); ClassDB::bind_method(D_METHOD("get_white_texture"), &VisualServer::get_white_texture); - ClassDB::bind_method(D_METHOD("set_boot_image", "image", "color", "scale"), &VisualServer::set_boot_image); + ClassDB::bind_method(D_METHOD("set_boot_image", "image", "color", "scale", "use_filter"), &VisualServer::set_boot_image, DEFVAL(true)); ClassDB::bind_method(D_METHOD("set_default_clear_color", "color"), &VisualServer::set_default_clear_color); ClassDB::bind_method(D_METHOD("has_feature", "feature"), &VisualServer::has_feature); diff --git a/servers/visual_server.h b/servers/visual_server.h index 01be996bfc..8be8c1c1f1 100644 --- a/servers/visual_server.h +++ b/servers/visual_server.h @@ -1029,7 +1029,7 @@ public: virtual void mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry::MeshData &p_mesh_data); virtual void mesh_add_surface_from_planes(RID p_mesh, const PoolVector<Plane> &p_planes); - virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) = 0; + virtual void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) = 0; virtual void set_default_clear_color(const Color &p_color) = 0; enum Features { |