feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -30,11 +30,18 @@
|
|||
|
||||
#include "rendering_server_default.h"
|
||||
|
||||
#include "core/object/callable_mp.h"
|
||||
#include "core/os/os.h"
|
||||
#include "core/profiling/profiling.h"
|
||||
#include "renderer_canvas_cull.h"
|
||||
#include "renderer_scene_cull.h"
|
||||
#include "rendering_server_globals.h"
|
||||
#include "servers/display/display_server.h"
|
||||
#include "servers/rendering/renderer_canvas_cull.h"
|
||||
#include "servers/rendering/renderer_scene_cull.h"
|
||||
#include "servers/rendering/rendering_device.h"
|
||||
#include "servers/rendering/rendering_server_globals.h"
|
||||
|
||||
#ifndef XR_DISABLED
|
||||
#include "servers/xr/xr_server.h"
|
||||
#endif
|
||||
|
||||
// careful, these may run in different threads than the rendering server
|
||||
|
||||
|
|
@ -128,7 +135,7 @@ void RenderingServerDefault::_draw(bool p_swap_buffers, double frame_step) {
|
|||
|
||||
if (RSG::utilities->get_captured_timestamps_count()) {
|
||||
GodotProfileZoneGrouped(_profile_zone, "frame_profile");
|
||||
Vector<FrameProfileArea> new_profile;
|
||||
Vector<RenderingServerTypes::FrameProfileArea> new_profile;
|
||||
if (RSG::utilities->capturing_timestamps) {
|
||||
new_profile.resize(RSG::utilities->get_captured_timestamps_count());
|
||||
}
|
||||
|
|
@ -297,28 +304,28 @@ void RenderingServerDefault::finish() {
|
|||
|
||||
/* STATUS INFORMATION */
|
||||
|
||||
uint64_t RenderingServerDefault::get_rendering_info(RenderingInfo p_info) {
|
||||
if (p_info == RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME) {
|
||||
uint64_t RenderingServerDefault::get_rendering_info(RSE::RenderingInfo p_info) {
|
||||
if (p_info == RSE::RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME) {
|
||||
return RSG::viewport->get_total_objects_drawn();
|
||||
} else if (p_info == RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME) {
|
||||
} else if (p_info == RSE::RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME) {
|
||||
return RSG::viewport->get_total_primitives_drawn();
|
||||
} else if (p_info == RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME) {
|
||||
} else if (p_info == RSE::RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME) {
|
||||
return RSG::viewport->get_total_draw_calls_used();
|
||||
} else if (p_info == RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(PIPELINE_SOURCE_CANVAS);
|
||||
} else if (p_info == RENDERING_INFO_PIPELINE_COMPILATIONS_MESH) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(PIPELINE_SOURCE_MESH) + RSG::scene->get_pipeline_compilations(PIPELINE_SOURCE_MESH);
|
||||
} else if (p_info == RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE) {
|
||||
return RSG::scene->get_pipeline_compilations(PIPELINE_SOURCE_SURFACE);
|
||||
} else if (p_info == RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(PIPELINE_SOURCE_DRAW) + RSG::scene->get_pipeline_compilations(PIPELINE_SOURCE_DRAW);
|
||||
} else if (p_info == RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(PIPELINE_SOURCE_SPECIALIZATION) + RSG::scene->get_pipeline_compilations(PIPELINE_SOURCE_SPECIALIZATION);
|
||||
} else if (p_info == RSE::RENDERING_INFO_PIPELINE_COMPILATIONS_CANVAS) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(RSE::PIPELINE_SOURCE_CANVAS);
|
||||
} else if (p_info == RSE::RENDERING_INFO_PIPELINE_COMPILATIONS_MESH) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(RSE::PIPELINE_SOURCE_MESH) + RSG::scene->get_pipeline_compilations(RSE::PIPELINE_SOURCE_MESH);
|
||||
} else if (p_info == RSE::RENDERING_INFO_PIPELINE_COMPILATIONS_SURFACE) {
|
||||
return RSG::scene->get_pipeline_compilations(RSE::PIPELINE_SOURCE_SURFACE);
|
||||
} else if (p_info == RSE::RENDERING_INFO_PIPELINE_COMPILATIONS_DRAW) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(RSE::PIPELINE_SOURCE_DRAW) + RSG::scene->get_pipeline_compilations(RSE::PIPELINE_SOURCE_DRAW);
|
||||
} else if (p_info == RSE::RENDERING_INFO_PIPELINE_COMPILATIONS_SPECIALIZATION) {
|
||||
return RSG::canvas_render->get_pipeline_compilations(RSE::PIPELINE_SOURCE_SPECIALIZATION) + RSG::scene->get_pipeline_compilations(RSE::PIPELINE_SOURCE_SPECIALIZATION);
|
||||
}
|
||||
return RSG::utilities->get_rendering_info(p_info);
|
||||
}
|
||||
|
||||
RenderingDevice::DeviceType RenderingServerDefault::get_video_adapter_type() const {
|
||||
RenderingDeviceEnums::DeviceType RenderingServerDefault::get_video_adapter_type() const {
|
||||
return RSG::utilities->get_video_adapter_type();
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +337,7 @@ uint64_t RenderingServerDefault::get_frame_profile_frame() {
|
|||
return frame_profile_frame;
|
||||
}
|
||||
|
||||
Vector<RenderingServer::FrameProfileArea> RenderingServerDefault::get_frame_profile() {
|
||||
Vector<RenderingServerTypes::FrameProfileArea> RenderingServerDefault::get_frame_profile() {
|
||||
return frame_profile;
|
||||
}
|
||||
|
||||
|
|
@ -345,7 +352,7 @@ void RenderingServerDefault::set_default_clear_color(const Color &p_color) {
|
|||
}
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
bool RenderingServerDefault::has_feature(Features p_feature) const {
|
||||
bool RenderingServerDefault::has_feature(RSE::Features p_feature) const {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -406,7 +413,7 @@ void RenderingServerDefault::_thread_exit() {
|
|||
}
|
||||
|
||||
void RenderingServerDefault::_thread_loop() {
|
||||
DisplayServer::get_singleton()->gl_window_make_current(DisplayServer::MAIN_WINDOW_ID); // Move GL to this thread.
|
||||
DisplayServer::get_singleton()->gl_window_make_current(DisplayServerEnums::MAIN_WINDOW_ID); // Move GL to this thread.
|
||||
|
||||
while (!exit) {
|
||||
WorkerThreadPool::get_singleton()->yield();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue