summaryrefslogtreecommitdiff
path: root/main/main.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-06-24 22:24:07 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 11:53:28 +0100
commite1b3444415054c21b274546876642af7292c0937 (patch)
tree88266bd6c646c70366f2b7796e681d7b64655527 /main/main.cpp
parent1b4281b895f3046ea972256182b18696a25f8316 (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.cpp10
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;