diff options
Diffstat (limited to 'servers/rendering/renderer_compositor.h')
-rw-r--r-- | servers/rendering/renderer_compositor.h | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/servers/rendering/renderer_compositor.h b/servers/rendering/renderer_compositor.h index 41aaba0f4c..eabdebf4b3 100644 --- a/servers/rendering/renderer_compositor.h +++ b/servers/rendering/renderer_compositor.h @@ -40,7 +40,31 @@ #include "servers/rendering/renderer_storage.h" #include "servers/rendering_server.h" +struct BlitToScreen { + RID render_target; + Rect2i rect; + + struct { + bool use_layer = false; + uint32_t layer = 0; + } multi_view; + + struct { + //lens distorted parameters for VR + bool apply = false; + Vector2 eye_center; + float k1 = 0.0; + float k2 = 0.0; + + float upscale = 1.0; + float aspect_ratio = 1.0; + } lens_distortion; +}; + class RendererCompositor { +private: + bool xr_enabled = false; + protected: static RendererCompositor *(*_create_func)(); @@ -56,27 +80,6 @@ public: virtual void initialize() = 0; virtual void begin_frame(double frame_step) = 0; - struct BlitToScreen { - RID render_target; - Rect2i rect; - - struct { - bool use_layer = false; - uint32_t layer = 0; - } multi_view; - - struct { - //lens distorted parameters for VR - bool apply = false; - Vector2 eye_center; - float k1 = 0.0; - float k2 = 0.0; - - float upscale = 1.0; - float aspect_ratio = 1.0; - } lens_distortion; - }; - virtual void prepare_for_blitting_render_targets() = 0; virtual void blit_render_targets_to_screen(DisplayServer::WindowID p_screen, const BlitToScreen *p_render_targets, int p_amount) = 0; @@ -86,7 +89,9 @@ public: virtual float get_frame_delta_time() const = 0; virtual bool is_low_end() const = 0; + virtual bool is_xr_enabled() const; + RendererCompositor(); virtual ~RendererCompositor() {} }; |