mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Optionally scale 3D render content
This commit is contained in:
parent
6e87d62873
commit
64626cc435
15 changed files with 184 additions and 34 deletions
|
@ -2138,6 +2138,7 @@ void RenderingServer::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("viewport_create"), &RenderingServer::viewport_create);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_use_xr", "viewport", "use_xr"), &RenderingServer::viewport_set_use_xr);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_scale_3d", "viewport", "scale"), &RenderingServer::viewport_set_scale_3d);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_size", "viewport", "width", "height"), &RenderingServer::viewport_set_size);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_active", "viewport", "active"), &RenderingServer::viewport_set_active);
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_parent_viewport", "viewport", "parent_viewport"), &RenderingServer::viewport_set_parent_viewport);
|
||||
|
@ -2255,6 +2256,12 @@ void RenderingServer::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES);
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_DEBUG_DRAW_OCCLUDERS);
|
||||
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_DISABLED);
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_75_PERCENT);
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_50_PERCENT);
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_33_PERCENT);
|
||||
BIND_ENUM_CONSTANT(VIEWPORT_SCALE_3D_25_PERCENT);
|
||||
|
||||
/* SKY API */
|
||||
|
||||
ClassDB::bind_method(D_METHOD("sky_create"), &RenderingServer::sky_create);
|
||||
|
@ -2795,6 +2802,12 @@ RenderingServer::RenderingServer() {
|
|||
"rendering/vulkan/rendering/back_end",
|
||||
PROPERTY_HINT_ENUM, "Forward Clustered (Supports Desktop Only),Forward Mobile (Supports Desktop and Mobile)"));
|
||||
|
||||
GLOBAL_DEF("rendering/3d/viewport/scale", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("rendering/3d/viewport/scale",
|
||||
PropertyInfo(Variant::INT,
|
||||
"rendering/3d/viewport/scale",
|
||||
PROPERTY_HINT_ENUM, "Disabled,75%,50%,33%,25%"));
|
||||
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/enabled", true);
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/compress", true);
|
||||
GLOBAL_DEF("rendering/shader_compiler/shader_cache/use_zstd_compression", true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue