From 4f163972bbd9c7379b01a1f9aa5310646ca7865e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 10 Jun 2019 12:38:51 -0300 Subject: Refactored RID/RID_Owner to always use O(1) allocation. * Implements a growing chunked allocator * Removed redudant methods get and getptr, only getornull is supported now. --- main/main.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 162d5568d4..b74ae36434 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -352,7 +352,6 @@ void Main::print_help(const char *p_binary) { */ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_phase) { - RID_OwnerBase::init_rid(); OS::get_singleton()->initialize_core(); -- cgit v1.2.3 From 3f335ce3d446372eeb9ed87f7e117099c4d2dd6a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 11 Jun 2019 15:43:37 -0300 Subject: Texture refactor -Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD --- main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index b74ae36434..e63f65f56a 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1350,7 +1350,7 @@ Error Main::setup2(Thread::ID p_main_tid_override) { if (String(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")) != String()) { - Ref cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")); + Ref cursor = ResourceLoader::load(ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image")); if (cursor.is_valid()) { Vector2 hotspot = ProjectSettings::get_singleton()->get("display/mouse_cursor/custom_image_hotspot"); Input::get_singleton()->set_custom_mouse_cursor(cursor, Input::CURSOR_ARROW, hotspot); -- cgit v1.2.3 From e1b3444415054c21b274546876642af7292c0937 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Mon, 24 Jun 2019 22:24:07 -0300 Subject: Bugfixes and ability to better specify filter and repeat modes everywhere. Removes antialiased flag for draw_* methods. --- main/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'main/main.cpp') 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; -- cgit v1.2.3 From 4fe3ee1730167b90ec8ae70c871c1dad032981d5 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 28 Jul 2019 19:58:32 -0300 Subject: Moved the shader source compilation code outside RenderingDevice and Vulkan --- main/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index d1b1c1198e..b401cd4233 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1207,6 +1207,8 @@ error: Error Main::setup2(Thread::ID p_main_tid_override) { + preregister_module_types(); + // Print engine name and version print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); -- cgit v1.2.3 From eb48be51dbe97aa4fbbbe0d0ebd8a98bee6b263e Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sat, 22 Jun 2019 19:34:26 +0300 Subject: Add static Vulkan loader. Initial Vulkan support for Windows. Initial Vulkan support for macOS. --- main/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index b401cd4233..8b44984014 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -991,7 +991,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->set_cmdline(execpath, main_args); GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3"); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES2,GLES3")); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES2,GLES3,Vulkan")); if (video_driver == "") { video_driver = GLOBAL_GET("rendering/quality/driver/driver_name"); } -- cgit v1.2.3 From b456bfad5cee3922f55621bf7c133cc67337636a Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 12 Jul 2019 16:18:30 +0300 Subject: Add runtime GLES2 / Vulkan context selection. --- main/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 8b44984014..9aebc17a65 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -990,8 +990,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph OS::get_singleton()->set_cmdline(execpath, main_args); - GLOBAL_DEF("rendering/quality/driver/driver_name", "GLES3"); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "GLES2,GLES3,Vulkan")); + GLOBAL_DEF("rendering/quality/driver/driver_name", "Vulkan"); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/quality/driver/driver_name", PropertyInfo(Variant::STRING, "rendering/quality/driver/driver_name", PROPERTY_HINT_ENUM, "Vulkan,GLES2")); if (video_driver == "") { video_driver = GLOBAL_GET("rendering/quality/driver/driver_name"); } -- cgit v1.2.3 From 449df8f688080c02bfbbfafc45421875b77deb1b Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 18 Aug 2019 19:40:52 -0300 Subject: Base 3D engine done, still untested, though. --- main/main.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 9aebc17a65..fff652edc8 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1795,8 +1795,6 @@ bool Main::start() { sml->get_root()->set_shadow_atlas_quadrant_subdiv(1, Viewport::ShadowAtlasQuadrantSubdiv(shadow_atlas_q1_subdiv)); sml->get_root()->set_shadow_atlas_quadrant_subdiv(2, Viewport::ShadowAtlasQuadrantSubdiv(shadow_atlas_q2_subdiv)); sml->get_root()->set_shadow_atlas_quadrant_subdiv(3, Viewport::ShadowAtlasQuadrantSubdiv(shadow_atlas_q3_subdiv)); - Viewport::Usage usage = Viewport::Usage(int(GLOBAL_GET("rendering/quality/intended_usage/framebuffer_allocation"))); - sml->get_root()->set_usage(usage); bool snap_controls = GLOBAL_DEF("gui/common/snap_controls_to_pixels", true); sml->get_root()->set_snap_controls_to_pixels(snap_controls); @@ -1929,8 +1927,6 @@ bool Main::start() { ProgressDialog *progress_dialog = memnew(ProgressDialog); pmanager->add_child(progress_dialog); sml->get_root()->add_child(pmanager); - // Speed up rendering slightly by disabling 3D features while in the project manager. - sml->get_root()->set_usage(Viewport::USAGE_2D_NO_SAMPLING); OS::get_singleton()->set_context(OS::CONTEXT_PROJECTMAN); project_manager = true; } -- cgit v1.2.3 From 8cee7703a6673f9505332de1581055c821b756f0 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Tue, 20 Aug 2019 17:54:03 -0300 Subject: Yay very basic 3D (only white) finally shows. --- main/main.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index fff652edc8..02c90ce1ee 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1208,6 +1208,7 @@ error: Error Main::setup2(Thread::ID p_main_tid_override) { preregister_module_types(); + preregister_server_types(); // Print engine name and version print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); -- cgit v1.2.3 From 920db604d26e2e82b6289807ad8a0607b310eef6 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 6 Sep 2019 22:51:27 -0300 Subject: Rewrote large part of rendering, omni and spot shadows now work. --- main/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index 02c90ce1ee..fdc94fd896 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -1753,6 +1753,12 @@ bool Main::start() { } #endif + { + + int directional_atlas_size = GLOBAL_GET("rendering/quality/directional_shadow/size"); + VisualServer::get_singleton()->directional_shadow_atlas_set_size(directional_atlas_size); + } + if (!editor && !project_manager) { //standard helpers that can be changed from main config -- cgit v1.2.3 From 6ee2f5e6b6663f5a4987954d43bb6df6d1f62d2a Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 5 Oct 2019 10:27:43 -0300 Subject: More GIProbe work and fixes --- main/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'main/main.cpp') diff --git a/main/main.cpp b/main/main.cpp index fdc94fd896..1b8b95c4c3 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -286,6 +286,7 @@ void Main::print_help(const char *p_binary) { OS::get_singleton()->print(" -d, --debug Debug (local stdout debugger).\n"); OS::get_singleton()->print(" -b, --breakpoints Breakpoint list as source::line comma-separated pairs, no spaces (use %%20 instead).\n"); OS::get_singleton()->print(" --profiling Enable profiling in the script debugger.\n"); + OS::get_singleton()->print(" --gpu-abort Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes.\n"); OS::get_singleton()->print(" --remote-debug
Remote debug (: address).\n"); #if defined(DEBUG_ENABLED) && !defined(SERVER_ENABLED) OS::get_singleton()->print(" --debug-collisions Show collision shapes when running the scene.\n"); @@ -548,6 +549,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get() == "-w" || I->get() == "--windowed") { // force windowed window init_windowed = true; + } else if (I->get() == "--gpu-abort") { // force windowed window + + Engine::singleton->abort_on_gpu_errors = true; } else if (I->get() == "-t" || I->get() == "--always-on-top") { // force always-on-top window init_always_on_top = true; -- cgit v1.2.3