summaryrefslogtreecommitdiff
path: root/servers/rendering_server.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2021-08-26 10:24:48 -0300
committerGitHub <noreply@github.com>2021-08-26 10:24:48 -0300
commit227ab247386e5561fcb369acc6d34d5f4038c1cf (patch)
treebf110dec6a4267ec3f0624bbeb99248480625bda /servers/rendering_server.h
parenteb940ca2a02b507fc0e98da483b5a2da9ecd912d (diff)
parent64626cc435448037c3d0045f57771ff9912d146c (diff)
Merge pull request #51870 from BastiaanOlij/half_resolution_3d
Optionally render 3D content at scaled resolution
Diffstat (limited to 'servers/rendering_server.h')
-rw-r--r--servers/rendering_server.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/servers/rendering_server.h b/servers/rendering_server.h
index 545270dcd9..6f80b52faa 100644
--- a/servers/rendering_server.h
+++ b/servers/rendering_server.h
@@ -752,9 +752,19 @@ public:
CANVAS_ITEM_TEXTURE_REPEAT_MAX,
};
+ enum ViewportScale3D {
+ VIEWPORT_SCALE_3D_DISABLED,
+ VIEWPORT_SCALE_3D_75_PERCENT,
+ VIEWPORT_SCALE_3D_50_PERCENT,
+ VIEWPORT_SCALE_3D_33_PERCENT,
+ VIEWPORT_SCALE_3D_25_PERCENT,
+ VIEWPORT_SCALE_3D_MAX,
+ };
+
virtual RID viewport_create() = 0;
virtual void viewport_set_use_xr(RID p_viewport, bool p_use_xr) = 0;
+ virtual void viewport_set_scale_3d(RID p_viewport, ViewportScale3D p_scale_3d) = 0;
virtual void viewport_set_size(RID p_viewport, int p_width, int p_height) = 0;
virtual void viewport_set_active(RID p_viewport, bool p_active) = 0;
virtual void viewport_set_parent_viewport(RID p_viewport, RID p_parent_viewport) = 0;
@@ -1542,6 +1552,7 @@ VARIANT_ENUM_CAST(RenderingServer::ViewportDebugDraw);
VARIANT_ENUM_CAST(RenderingServer::ViewportOcclusionCullingBuildQuality);
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFOversize);
VARIANT_ENUM_CAST(RenderingServer::ViewportSDFScale);
+VARIANT_ENUM_CAST(RenderingServer::ViewportScale3D);
VARIANT_ENUM_CAST(RenderingServer::SkyMode);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentBG);
VARIANT_ENUM_CAST(RenderingServer::EnvironmentAmbientSource);