#include "renderer_viewport.h"
#include "core/config/project_settings.h"
#include "core/math/transform_interpolator.h"
#include "core/object/worker_thread_pool.h"
#include "renderer_canvas_cull.h"
#include "renderer_scene_cull.h"
#include "rendering_server_globals.h"
#include "storage/texture_storage.h"
static Transform2D _canvas_get_transform(RendererViewport::Viewport *p_viewport, RendererCanvasCull::Canvas *p_canvas, RendererViewport::Viewport::CanvasData *p_canvas_data, const Vector2 &p_vp_size) { … }
Vector<RendererViewport::Viewport *> RendererViewport::_sort_active_viewports() { … }
void RendererViewport::_configure_3d_render_buffers(Viewport *p_viewport) { … }
void RendererViewport::_draw_3d(Viewport *p_viewport) { … }
void RendererViewport::_draw_viewport(Viewport *p_viewport) { … }
void RendererViewport::draw_viewports(bool p_swap_buffers) { … }
RID RendererViewport::viewport_allocate() { … }
void RendererViewport::viewport_initialize(RID p_rid) { … }
void RendererViewport::viewport_set_use_xr(RID p_viewport, bool p_use_xr) { … }
void RendererViewport::viewport_set_scaling_3d_mode(RID p_viewport, RS::ViewportScaling3DMode p_mode) { … }
void RendererViewport::viewport_set_fsr_sharpness(RID p_viewport, float p_sharpness) { … }
void RendererViewport::viewport_set_texture_mipmap_bias(RID p_viewport, float p_mipmap_bias) { … }
void RendererViewport::viewport_set_scaling_3d_scale(RID p_viewport, float p_scaling_3d_scale) { … }
void RendererViewport::viewport_set_size(RID p_viewport, int p_width, int p_height) { … }
void RendererViewport::_viewport_set_size(Viewport *p_viewport, int p_width, int p_height, uint32_t p_view_count) { … }
bool RendererViewport::_viewport_requires_motion_vectors(Viewport *p_viewport) { … }
void RendererViewport::viewport_set_active(RID p_viewport, bool p_active) { … }
void RendererViewport::viewport_set_parent_viewport(RID p_viewport, RID p_parent_viewport) { … }
void RendererViewport::viewport_set_clear_mode(RID p_viewport, RS::ViewportClearMode p_clear_mode) { … }
void RendererViewport::viewport_attach_to_screen(RID p_viewport, const Rect2 &p_rect, DisplayServer::WindowID p_screen) { … }
void RendererViewport::viewport_set_render_direct_to_screen(RID p_viewport, bool p_enable) { … }
void RendererViewport::viewport_set_update_mode(RID p_viewport, RS::ViewportUpdateMode p_mode) { … }
RS::ViewportUpdateMode RendererViewport::viewport_get_update_mode(RID p_viewport) const { … }
RID RendererViewport::viewport_get_render_target(RID p_viewport) const { … }
RID RendererViewport::viewport_get_texture(RID p_viewport) const { … }
RID RendererViewport::viewport_get_occluder_debug_texture(RID p_viewport) const { … }
void RendererViewport::viewport_set_prev_camera_data(RID p_viewport, const RendererSceneRender::CameraData *p_camera_data) { … }
const RendererSceneRender::CameraData *RendererViewport::viewport_get_prev_camera_data(RID p_viewport) { … }
void RendererViewport::viewport_set_disable_2d(RID p_viewport, bool p_disable) { … }
void RendererViewport::viewport_set_environment_mode(RID p_viewport, RS::ViewportEnvironmentMode p_mode) { … }
bool RendererViewport::viewport_is_environment_disabled(Viewport *viewport) { … }
void RendererViewport::viewport_set_disable_3d(RID p_viewport, bool p_disable) { … }
void RendererViewport::viewport_attach_camera(RID p_viewport, RID p_camera) { … }
void RendererViewport::viewport_set_scenario(RID p_viewport, RID p_scenario) { … }
void RendererViewport::viewport_attach_canvas(RID p_viewport, RID p_canvas) { … }
void RendererViewport::viewport_remove_canvas(RID p_viewport, RID p_canvas) { … }
void RendererViewport::viewport_set_canvas_transform(RID p_viewport, RID p_canvas, const Transform2D &p_offset) { … }
void RendererViewport::viewport_set_transparent_background(RID p_viewport, bool p_enabled) { … }
void RendererViewport::viewport_set_global_canvas_transform(RID p_viewport, const Transform2D &p_transform) { … }
void RendererViewport::viewport_set_canvas_stacking(RID p_viewport, RID p_canvas, int p_layer, int p_sublayer) { … }
void RendererViewport::viewport_set_positional_shadow_atlas_size(RID p_viewport, int p_size, bool p_16_bits) { … }
void RendererViewport::viewport_set_positional_shadow_atlas_quadrant_subdivision(RID p_viewport, int p_quadrant, int p_subdiv) { … }
void RendererViewport::viewport_set_msaa_2d(RID p_viewport, RS::ViewportMSAA p_msaa) { … }
void RendererViewport::viewport_set_msaa_3d(RID p_viewport, RS::ViewportMSAA p_msaa) { … }
void RendererViewport::viewport_set_use_hdr_2d(RID p_viewport, bool p_use_hdr_2d) { … }
bool RendererViewport::viewport_is_using_hdr_2d(RID p_viewport) const { … }
void RendererViewport::viewport_set_screen_space_aa(RID p_viewport, RS::ViewportScreenSpaceAA p_mode) { … }
void RendererViewport::viewport_set_use_taa(RID p_viewport, bool p_use_taa) { … }
void RendererViewport::viewport_set_use_debanding(RID p_viewport, bool p_use_debanding) { … }
void RendererViewport::viewport_set_use_occlusion_culling(RID p_viewport, bool p_use_occlusion_culling) { … }
void RendererViewport::viewport_set_occlusion_rays_per_thread(int p_rays_per_thread) { … }
void RendererViewport::viewport_set_occlusion_culling_build_quality(RS::ViewportOcclusionCullingBuildQuality p_quality) { … }
void RendererViewport::viewport_set_mesh_lod_threshold(RID p_viewport, float p_pixels) { … }
int RendererViewport::viewport_get_render_info(RID p_viewport, RS::ViewportRenderInfoType p_type, RS::ViewportRenderInfo p_info) { … }
void RendererViewport::viewport_set_debug_draw(RID p_viewport, RS::ViewportDebugDraw p_draw) { … }
void RendererViewport::viewport_set_measure_render_time(RID p_viewport, bool p_enable) { … }
float RendererViewport::viewport_get_measured_render_time_cpu(RID p_viewport) const { … }
float RendererViewport::viewport_get_measured_render_time_gpu(RID p_viewport) const { … }
void RendererViewport::viewport_set_snap_2d_transforms_to_pixel(RID p_viewport, bool p_enabled) { … }
void RendererViewport::viewport_set_snap_2d_vertices_to_pixel(RID p_viewport, bool p_enabled) { … }
void RendererViewport::viewport_set_default_canvas_item_texture_filter(RID p_viewport, RS::CanvasItemTextureFilter p_filter) { … }
void RendererViewport::viewport_set_default_canvas_item_texture_repeat(RID p_viewport, RS::CanvasItemTextureRepeat p_repeat) { … }
void RendererViewport::viewport_set_sdf_oversize_and_scale(RID p_viewport, RS::ViewportSDFOversize p_size, RS::ViewportSDFScale p_scale) { … }
RID RendererViewport::viewport_find_from_screen_attachment(DisplayServer::WindowID p_id) const { … }
void RendererViewport::viewport_set_vrs_mode(RID p_viewport, RS::ViewportVRSMode p_mode) { … }
void RendererViewport::viewport_set_vrs_update_mode(RID p_viewport, RS::ViewportVRSUpdateMode p_mode) { … }
void RendererViewport::viewport_set_vrs_texture(RID p_viewport, RID p_texture) { … }
bool RendererViewport::free(RID p_rid) { … }
void RendererViewport::handle_timestamp(String p_timestamp, uint64_t p_cpu_time, uint64_t p_gpu_time) { … }
void RendererViewport::viewport_set_canvas_cull_mask(RID p_viewport, uint32_t p_canvas_cull_mask) { … }
void RendererViewport::call_set_vsync_mode(DisplayServer::VSyncMode p_mode, DisplayServer::WindowID p_window) { … }
int RendererViewport::get_total_objects_drawn() const { … }
int RendererViewport::get_total_primitives_drawn() const { … }
int RendererViewport::get_total_draw_calls_used() const { … }
int RendererViewport::get_num_viewports_with_motion_vectors() const { … }
RendererViewport::RendererViewport() { … }