Merge pull request #29764 from Calinou/boot-splash-no-filter-option
Add an option to disable boot splash filtering
This commit is contained in:
commit
6ba1b4e371
13 changed files with 19 additions and 16 deletions
|
|
@ -782,7 +782,7 @@ public:
|
|||
RasterizerCanvas *get_canvas() { return &canvas; }
|
||||
RasterizerScene *get_scene() { return &scene; }
|
||||
|
||||
void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {}
|
||||
void set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter = true) {}
|
||||
|
||||
void initialize() {}
|
||||
void begin_frame(double frame_step) {}
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ void RasterizerGLES2::clear_render_target(const Color &p_color) {
|
|||
storage->frame.clear_request_color = p_color;
|
||||
}
|
||||
|
||||
void RasterizerGLES2::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
|
||||
void RasterizerGLES2::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter) {
|
||||
|
||||
if (p_image.is_null() || p_image->empty())
|
||||
return;
|
||||
|
|
@ -360,7 +360,7 @@ void RasterizerGLES2::set_boot_image(const Ref<Image> &p_image, const Color &p_c
|
|||
canvas->canvas_begin();
|
||||
|
||||
RID texture = storage->texture_create();
|
||||
storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), 0, p_image->get_format(), VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_FILTER);
|
||||
storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), 0, p_image->get_format(), VS::TEXTURE_TYPE_2D, p_use_filter ? VS::TEXTURE_FLAG_FILTER : 0);
|
||||
storage->texture_set_data(texture, p_image);
|
||||
|
||||
Rect2 imgrect(0, 0, p_image->get_width(), p_image->get_height());
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
virtual RasterizerCanvas *get_canvas();
|
||||
virtual RasterizerScene *get_scene();
|
||||
|
||||
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 initialize();
|
||||
virtual void begin_frame(double frame_step);
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ void RasterizerGLES3::clear_render_target(const Color &p_color) {
|
|||
storage->frame.clear_request_color = p_color;
|
||||
}
|
||||
|
||||
void RasterizerGLES3::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale) {
|
||||
void RasterizerGLES3::set_boot_image(const Ref<Image> &p_image, const Color &p_color, bool p_scale, bool p_use_filter) {
|
||||
|
||||
if (p_image.is_null() || p_image->empty())
|
||||
return;
|
||||
|
|
@ -296,7 +296,7 @@ void RasterizerGLES3::set_boot_image(const Ref<Image> &p_image, const Color &p_c
|
|||
canvas->canvas_begin();
|
||||
|
||||
RID texture = storage->texture_create();
|
||||
storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), 0, p_image->get_format(), VS::TEXTURE_TYPE_2D, VS::TEXTURE_FLAG_FILTER);
|
||||
storage->texture_allocate(texture, p_image->get_width(), p_image->get_height(), 0, p_image->get_format(), VS::TEXTURE_TYPE_2D, p_use_filter ? VS::TEXTURE_FLAG_FILTER : 0);
|
||||
storage->texture_set_data(texture, p_image);
|
||||
|
||||
Rect2 imgrect(0, 0, p_image->get_width(), p_image->get_height());
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
virtual RasterizerCanvas *get_canvas();
|
||||
virtual RasterizerScene *get_scene();
|
||||
|
||||
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 initialize();
|
||||
virtual void begin_frame(double frame_step);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue