Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 40 additions & 12 deletions editor/editor_build_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,17 @@
const char *EditorBuildProfile::build_option_identifiers[BUILD_OPTION_MAX] = {
// This maps to SCons build options.
"disable_3d",
"disable_2d_physics",
"disable_3d_physics",
"disable_navigation",
"disable_physics_2d",
"disable_physics_3d",
"disable_navigation_2d",
"disable_navigation_3d",
"disable_xr",
"rendering_device", // FIXME: there's no scons option to disable rendering device
Copy link
Member Author

@akien-mga akien-mga Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this PR is merged, #103100 should be rebased and amended to solve this FIXME, and add the rendering method options here too.

It might also start being a bit heavy UI wise, so maybe rendering features should be moved to their own category, like the text handling features.

And while at it maybe 2D and 3D could be categories too? That would be for a separate PR though, not #103100.

"opengl3",
"vulkan",
"d3d12",
"metal",
"disable_advanced_gui",
"module_text_server_fb_enabled",
"module_text_server_adv_enabled",
"module_freetype_enabled",
Expand All @@ -63,11 +67,15 @@ const bool EditorBuildProfile::build_option_disabled_by_default[BUILD_OPTION_MAX
false, // 3D
false, // PHYSICS_2D
false, // PHYSICS_3D
false, // NAVIGATION
false, // NAVIGATION_2D
false, // NAVIGATION_3D
false, // XR
false, // RENDERING_DEVICE
false, // OPENGL
false, // VULKAN
false, // D3D12
false, // METAL
false, // ADVANCED_GUI
true, // TEXT_SERVER_FALLBACK
false, // TEXT_SERVER_COMPLEX
false, // DYNAMIC_FONTS
Expand All @@ -81,11 +89,15 @@ const bool EditorBuildProfile::build_option_disable_values[BUILD_OPTION_MAX] = {
true, // 3D
true, // PHYSICS_2D
true, // PHYSICS_3D
true, // NAVIGATION
true, // NAVIGATION_2D
true, // NAVIGATION_3D
true, // XR
false, // RENDERING_DEVICE
false, // OPENGL
false, // VULKAN
false, // D3D12
false, // METAL
false, // ADVANCED_GUI
false, // TEXT_SERVER_FALLBACK
false, // TEXT_SERVER_COMPLEX
false, // DYNAMIC_FONTS
Expand All @@ -98,11 +110,15 @@ const EditorBuildProfile::BuildOptionCategory EditorBuildProfile::build_option_c
BUILD_OPTION_CATEGORY_GENERAL, // 3D
BUILD_OPTION_CATEGORY_GENERAL, // PHYSICS_2D
BUILD_OPTION_CATEGORY_GENERAL, // PHYSICS_3D
BUILD_OPTION_CATEGORY_GENERAL, // NAVIGATION
BUILD_OPTION_CATEGORY_GENERAL, // NAVIGATION_2D
BUILD_OPTION_CATEGORY_GENERAL, // NAVIGATION_3D
BUILD_OPTION_CATEGORY_GENERAL, // XR
BUILD_OPTION_CATEGORY_GENERAL, // RENDERING_DEVICE
BUILD_OPTION_CATEGORY_GENERAL, // OPENGL
BUILD_OPTION_CATEGORY_GENERAL, // VULKAN
BUILD_OPTION_CATEGORY_GENERAL, // D3D12
BUILD_OPTION_CATEGORY_GENERAL, // METAL
BUILD_OPTION_CATEGORY_GENERAL, // ADVANCED_GUI
BUILD_OPTION_CATEGORY_TEXT_SERVER, // TEXT_SERVER_FALLBACK
BUILD_OPTION_CATEGORY_TEXT_SERVER, // TEXT_SERVER_COMPLEX
BUILD_OPTION_CATEGORY_TEXT_SERVER, // DYNAMIC_FONTS
Expand Down Expand Up @@ -172,11 +188,15 @@ String EditorBuildProfile::get_build_option_name(BuildOption p_build_option) {
TTRC("3D Engine"),
TTRC("2D Physics"),
TTRC("3D Physics"),
TTRC("Navigation"),
TTRC("2D Navigation"),
TTRC("3D Navigation"),
TTRC("XR"),
TTRC("RenderingDevice"),
TTRC("OpenGL"),
TTRC("Vulkan"),
TTRC("Direct3D 12"),
TTRC("Metal"),
TTRC("Advanced GUI"),
TTRC("Text Server: Fallback"),
TTRC("Text Server: Advanced"),
TTRC("TTF, OTF, Type 1, WOFF1 Fonts"),
Expand All @@ -194,11 +214,15 @@ String EditorBuildProfile::get_build_option_description(BuildOption p_build_opti
TTRC("3D Nodes as well as RenderingServer access to 3D features."),
TTRC("2D Physics nodes and PhysicsServer2D."),
TTRC("3D Physics nodes and PhysicsServer3D."),
TTRC("Navigation, both 2D and 3D."),
TTRC("2D Navigation nodes and NavigationServer2D."),
TTRC("3D Navigation nodes and NavigationServer3D."),
TTRC("XR (AR and VR)."),
TTRC("RenderingDevice based rendering (if disabled, the OpenGL back-end is required)."),
TTRC("OpenGL back-end (if disabled, the RenderingDevice back-end is required)."),
TTRC("Vulkan back-end of RenderingDevice."),
TTRC("RenderingDevice based rendering (if disabled, the OpenGL backend is required)."),
TTRC("OpenGL backend (if disabled, the RenderingDevice backend is required)."),
TTRC("Vulkan backend of RenderingDevice."),
TTRC("Direct3D 12 backend of RenderingDevice (Windows)."),
TTRC("Metal backend of RenderingDevice (macOS and iOS)."),
TTRC("Advanced GUI nodes: Dialogs, Tree, RichTextLabel, TextEdit, GraphEdit, and more."),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need better documentation on this somewhere, currently you need to read the source code to know what this impacts. It also seems pretty arbitrary and removing stuff like RichTextLabel likely makes it unusable for most games, even if they aren't UI heavy.

TTRC("Fallback implementation of Text Server\nSupports basic text layouts."),
TTRC("Text Server implementation powered by ICU and HarfBuzz libraries.\nSupports complex text layouts, BiDi, and contextual OpenType font features."),
TTRC("TrueType, OpenType, Type 1, and WOFF1 font format support using FreeType library (if disabled, WOFF2 support is also disabled)."),
Expand Down Expand Up @@ -333,11 +357,15 @@ void EditorBuildProfile::_bind_methods() {
BIND_ENUM_CONSTANT(BUILD_OPTION_3D);
BIND_ENUM_CONSTANT(BUILD_OPTION_PHYSICS_2D);
BIND_ENUM_CONSTANT(BUILD_OPTION_PHYSICS_3D);
BIND_ENUM_CONSTANT(BUILD_OPTION_NAVIGATION);
BIND_ENUM_CONSTANT(BUILD_OPTION_NAVIGATION_2D);
BIND_ENUM_CONSTANT(BUILD_OPTION_NAVIGATION_3D);
BIND_ENUM_CONSTANT(BUILD_OPTION_XR);
BIND_ENUM_CONSTANT(BUILD_OPTION_RENDERING_DEVICE);
BIND_ENUM_CONSTANT(BUILD_OPTION_OPENGL);
BIND_ENUM_CONSTANT(BUILD_OPTION_VULKAN);
BIND_ENUM_CONSTANT(BUILD_OPTION_D3D12);
BIND_ENUM_CONSTANT(BUILD_OPTION_METAL);
BIND_ENUM_CONSTANT(BUILD_OPTION_ADVANCED_GUI);
BIND_ENUM_CONSTANT(BUILD_OPTION_TEXT_SERVER_FALLBACK);
BIND_ENUM_CONSTANT(BUILD_OPTION_TEXT_SERVER_ADVANCED);
BIND_ENUM_CONSTANT(BUILD_OPTION_DYNAMIC_FONTS);
Expand Down
6 changes: 5 additions & 1 deletion editor/editor_build_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ class EditorBuildProfile : public RefCounted {
BUILD_OPTION_3D,
BUILD_OPTION_PHYSICS_2D,
BUILD_OPTION_PHYSICS_3D,
BUILD_OPTION_NAVIGATION,
BUILD_OPTION_NAVIGATION_2D,
BUILD_OPTION_NAVIGATION_3D,
BUILD_OPTION_XR,
BUILD_OPTION_RENDERING_DEVICE,
BUILD_OPTION_OPENGL,
BUILD_OPTION_VULKAN,
BUILD_OPTION_D3D12,
BUILD_OPTION_METAL,
BUILD_OPTION_ADVANCED_GUI,
BUILD_OPTION_TEXT_SERVER_FALLBACK,
BUILD_OPTION_TEXT_SERVER_ADVANCED,
BUILD_OPTION_DYNAMIC_FONTS,
Expand Down