diff options
author | Juan Linietsky <reduzio@gmail.com> | 2019-06-24 22:24:07 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-02-11 11:53:28 +0100 |
commit | e1b3444415054c21b274546876642af7292c0937 (patch) | |
tree | 88266bd6c646c70366f2b7796e681d7b64655527 /main/main.cpp | |
parent | 1b4281b895f3046ea972256182b18696a25f8316 (diff) |
Bugfixes and ability to better specify filter and repeat modes everywhere.
Removes antialiased flag for draw_* methods.
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp index e63f65f56a..d1b1c1198e 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1802,6 +1802,11 @@ bool Main::start() { bool font_oversampling = GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true); sml->set_use_font_oversampling(font_oversampling); + int texture_filter = GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1); + int texture_repeat = GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0); + sml->get_root()->set_default_canvas_item_texture_filter(Viewport::DefaultCanvasItemTextureFilter(texture_filter)); + sml->get_root()->set_default_canvas_item_texture_repeat(Viewport::DefaultCanvasItemTextureRepeat(texture_repeat)); + } else { GLOBAL_DEF("display/window/stretch/mode", "disabled"); @@ -1814,6 +1819,11 @@ bool Main::start() { sml->set_quit_on_go_back(GLOBAL_DEF("application/config/quit_on_go_back", true)); GLOBAL_DEF("gui/common/snap_controls_to_pixels", true); GLOBAL_DEF("rendering/quality/dynamic_fonts/use_oversampling", true); + + GLOBAL_DEF("rendering/canvas_textures/default_texture_filter", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/canvas_textures/default_texture_filter", PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,MipmapLinear,MipmapNearest")); + GLOBAL_DEF("rendering/canvas_textures/default_texture_repeat", 0); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/canvas_textures/default_texture_repeat", PropertyInfo(Variant::INT, "rendering/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror")); } String local_game_path; |