mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #111185 from WhalesState/vp-disable-xr
More XR disable for Viewport and export.
This commit is contained in:
commit
d3285f5468
9 changed files with 30 additions and 0 deletions
|
|
@ -955,6 +955,7 @@ void RendererViewport::viewport_initialize(RID p_rid) {
|
|||
viewport->fsr_enabled = !RSG::rasterizer->is_low_end() && !viewport->disable_3d;
|
||||
}
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
|
||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||
ERR_FAIL_NULL(viewport);
|
||||
|
|
@ -972,6 +973,7 @@ void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) {
|
|||
_configure_3d_render_buffers(viewport);
|
||||
}
|
||||
}
|
||||
#endif // !XR_DISABLED
|
||||
|
||||
void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) {
|
||||
Viewport *viewport = viewport_owner.get_or_null(p_viewport);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,9 @@ public:
|
|||
RID viewport_allocate();
|
||||
void viewport_initialize(RID p_rid);
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
void viewport_set_use_xr(RID p_viewport, bool p_use_xr);
|
||||
#endif // XR_DISABLED
|
||||
|
||||
void viewport_set_size(RID p_viewport, int p_width, int p_height);
|
||||
|
||||
|
|
|
|||
|
|
@ -2823,7 +2823,9 @@ void RenderingServer::_bind_methods() {
|
|||
/* VIEWPORT */
|
||||
|
||||
ClassDB::bind_method(D_METHOD("viewport_create"), &RenderingServer::viewport_create);
|
||||
#ifndef XR_DISABLED
|
||||
ClassDB::bind_method(D_METHOD("viewport_set_use_xr", "viewport", "use_xr"), &RenderingServer::viewport_set_use_xr);
|
||||
#endif // XR_DISABLED
|
||||
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);
|
||||
|
|
@ -3760,7 +3762,9 @@ void RenderingServer::init() {
|
|||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/limits/opengl/max_renderable_lights", PROPERTY_HINT_RANGE, "2,256,1"), 32);
|
||||
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/limits/opengl/max_lights_per_object", PROPERTY_HINT_RANGE, "2,1024,1"), 8);
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
GLOBAL_DEF_RST_BASIC("xr/shaders/enabled", false);
|
||||
#endif // XR_DISABLED
|
||||
|
||||
GLOBAL_DEF("debug/shader_language/warnings/enable", true);
|
||||
GLOBAL_DEF("debug/shader_language/warnings/treat_warnings_as_errors", false);
|
||||
|
|
|
|||
|
|
@ -980,7 +980,10 @@ public:
|
|||
return VIEWPORT_SCALING_3D_TYPE_NONE;
|
||||
}
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
virtual void viewport_set_use_xr(RID p_viewport, bool p_use_xr) = 0;
|
||||
#endif // !XR_DISABLED
|
||||
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -693,7 +693,10 @@ public:
|
|||
|
||||
FUNCRIDSPLIT(viewport)
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
FUNC2(viewport_set_use_xr, RID, bool)
|
||||
#endif // XR_DISABLED
|
||||
|
||||
FUNC3(viewport_set_size, RID, int, int)
|
||||
|
||||
FUNC2(viewport_set_active, RID, bool)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue