Moved the RenderingServer to core.

This commit is contained in:
Relintai 2023-12-10 19:04:24 +01:00
parent 049440aaf1
commit 238bf1b331
107 changed files with 123 additions and 118 deletions

View File

@ -201,6 +201,7 @@ SConscript("object/SCsub")
SConscript("input/SCsub")
SConscript("bind/SCsub")
SConscript("scene/SCsub")
SConscript("servers/SCsub")
# Build it all as a library
lib = env.add_library("core", env.core_sources)

View File

@ -80,6 +80,8 @@
#include "core/bind/logger_bind.h"
#include "core/log/logger_backend.h"
#include "core/servers/rendering/rendering_server.h"
static Ref<ResourceFormatSaverBinary> resource_saver_binary;
static Ref<ResourceFormatLoaderBinary> resource_loader_binary;
static Ref<ResourceFormatImporter> resource_format_importer;
@ -110,6 +112,16 @@ extern void unregister_global_constants();
extern void register_variant_methods();
extern void unregister_variant_methods();
static bool has_server_feature_callback(const String &p_feature) {
if (RenderingServer::get_singleton()) {
if (RenderingServer::get_singleton()->has_os_feature(p_feature)) {
return true;
}
}
return false;
}
void register_core_types() {
OS::get_singleton()->benchmark_begin_measure("register_core_types");
@ -265,6 +277,8 @@ void register_core_settings() {
}
void register_core_singletons() {
OS::get_singleton()->set_has_server_feature_callback(has_server_feature_callback);
ClassDB::register_class<ProjectSettings>();
ClassDB::register_virtual_class<IP>();
ClassDB::register_class<_Geometry>();
@ -285,6 +299,7 @@ void register_core_singletons() {
ClassDB::register_class<ThreadPoolExecuteJob>();
ClassDB::register_class<ThreadPool>();
ClassDB::register_class<_ScriptServer>();
ClassDB::register_virtual_class<RenderingServer>();
Engine::get_singleton()->add_singleton(Engine::Singleton("ProjectSettings", ProjectSettings::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("IP", IP::get_singleton()));
@ -303,6 +318,7 @@ void register_core_singletons() {
Engine::get_singleton()->add_singleton(Engine::Singleton("PLogger", _PLogger::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("ThreadPool", ThreadPool::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("ScriptServer", _ScriptServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton()));
}
void unregister_core_types() {

6
core/servers/SCsub Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env python
Import("env")
env.add_source_files(env.core_sources, "rendering/*.cpp")
#env.add_source_files(env.core_sources, "*.cpp")

View File

@ -34,10 +34,6 @@
#include "core/config/project_settings.h"
#include "core/object/method_bind_ext.gen.inc"
#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
#endif
RenderingServer *RenderingServer::singleton = nullptr;
RenderingServer *(*RenderingServer::create_func)() = nullptr;

View File

@ -34,7 +34,7 @@
#include "core/containers/self_list.h"
#include "scene/resources/mesh/mesh.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class RasterizerSceneDummy : public RasterizerScene {
public:

View File

@ -34,7 +34,7 @@
#include "core/string/string_builder.h"
#include "servers/rendering/shader_language.h"
#include "servers/rendering/shader_types.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class ShaderCompilerGLES2 {
public:

View File

@ -38,7 +38,7 @@
#include "drivers/unix/net_socket_posix.h"
#include "drivers/unix/sub_process_unix.h"
#include "drivers/unix/thread_posix.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef __APPLE__
#include <mach-o/dyld.h>

View File

@ -52,7 +52,7 @@
#include "core/containers/vector.h"
#include "scene/animation/animation.h"
#include "scene/resources/font/font.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
/// BOOL ///
int AnimationTrackEditBool::get_key_height() const {

View File

@ -66,7 +66,7 @@
#include "scene/resources/font/font.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/style_box.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Size2 EditorProperty::get_minimum_size() const {
Size2 ms;

View File

@ -190,7 +190,7 @@
#include "servers/navigation_server.h"
#include "servers/physics_2d_server.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -72,7 +72,7 @@
#include "scene/gui/tab_container.h"
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -49,7 +49,7 @@
#include "core/object/script_language.h"
#include "core/typedefs.h"
#include "scene/main/control.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool EditorResourcePreviewGenerator::handles(const String &p_type) const {
if (get_script_instance() && get_script_instance()->has_method("handles")) {

View File

@ -81,7 +81,7 @@
#include "scene/main/viewport.h"
#include "scene/animation/animation.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void AnimationPlayerEditor::_node_removed(Node *p_node) {
if (player && player == p_node) {

View File

@ -52,7 +52,7 @@
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "servers/audio/audio_stream.h"
void AudioStreamEditor::_notification(int p_what) {

View File

@ -98,7 +98,7 @@
#include "scene/resources/font/font.h"
#include "scene/resources/packed_scene.h"
#include "scene/resources/theme.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -66,7 +66,7 @@
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
#include "servers/audio_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void post_process_preview(Ref<Image> p_image) {
if (p_image->get_format() != Image::FORMAT_RGBA8) {

View File

@ -61,7 +61,7 @@
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/shader.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class EditorNode;

View File

@ -76,7 +76,7 @@
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class EditorNode;
class Node2D;

View File

@ -62,7 +62,7 @@
#include "scene/gui/spin_box.h"
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
/**
@author Mariano Suligoy

View File

@ -97,7 +97,7 @@
#include "scene/resources/font/font.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void EditorResourceConversionPlugin::_bind_methods() {
MethodInfo mi;

View File

@ -104,7 +104,7 @@
#include "scene/resources/mesh/surface_tool.h"
#include "scene/resources/world_3d.h"
#include "servers/navigation_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef MODULE_SKELETON_3D_ENABLED
#include "modules/skeleton_3d/nodes/skeleton.h"

View File

@ -64,7 +64,7 @@
#include "scene/gui/resources/syntax_highlighter.h"
#include "servers/rendering/shader_language.h"
#include "servers/rendering/shader_types.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "editor_code_editor/editor_find_replace_bar.h"
#include "editor_code_editor/editor_goto_line_dialog.h"

View File

@ -35,7 +35,7 @@
#include "core/os/os.h"
#include "core/config/project_settings.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef DEV_ENABLED
#include "core/os/thread.h"

View File

@ -70,7 +70,7 @@
#include "servers/physics_2d_server.h"
#include "servers/physics_server.h"
#include "servers/register_server_types.h"
#include "servers/rendering_server_callbacks.h"
#include "core/servers/rendering/rendering_server_callbacks.h"
#ifdef TOOLS_ENABLED
#include "editor/doc/doc_data.h"

View File

@ -38,7 +38,7 @@
#include "servers/navigation_server.h"
#include "servers/physics_2d_server.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Performance *Performance::singleton = nullptr;

View File

@ -37,7 +37,7 @@
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class TestPhysicsMainLoop : public MainLoop {
GDCLASS(TestPhysicsMainLoop, MainLoop);

File diff suppressed because one or more lines are too long

View File

@ -36,7 +36,7 @@
#include "core/os/main_loop.h"
#include "core/os/os.h"
#include "core/string/print_string.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#define OBJECT_COUNT 50

View File

@ -39,7 +39,7 @@
#include "scene/resources/mesh/surface_tool.h"
#include "scene/main/scene_string_names.h"
#include "servers/navigation_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "scene/resources/navigation/navigation_mesh.h"
#include "scene/resources/world_3d.h"

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "core/variant/variant.h"
#include "scene/resources/mesh/mesh.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "xatlas/xatlas.h"

View File

@ -32,7 +32,7 @@
#include <map>
#include <vector>
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
namespace Simplify {

View File

@ -72,7 +72,7 @@
#include "scene/gui/tool_button.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "../paint_polygon_2d.h"

View File

@ -5,7 +5,7 @@
//#include "../thread_pool/thread_pool.h"
#include "scene/resources/world_3d.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "core/config/engine.h"
@ -16,7 +16,7 @@
} \
return r;
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -19,7 +19,7 @@
} \
return r;
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "modules/modules_enabled.gen.h"

View File

@ -27,7 +27,7 @@ SOFTWARE.
#include "../../defines.h"
#include "scene/3d/mesh_instance.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
_FORCE_INLINE_ int TerrainMesherDefault::get_build_flags() const {
return _build_flags;

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "../../defines.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "../../../opensimplex/open_simplex_noise.h"
#include "../../meshers/default/terrain_mesher_default.h"

View File

@ -28,7 +28,7 @@ SOFTWARE.
#include "../../defines.h"
#include "scene/3d/mesh_instance.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "scene/resources/world_2d.h"
#include "servers/physics_2d_server.h"

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "../../defines.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "../../../opensimplex/open_simplex_noise.h"
#include "../../meshers/default/terrain_2d_mesher_default.h"

View File

@ -26,7 +26,7 @@ SOFTWARE.
#include "../../defines.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void VoxelMesherCubic::_add_chunk(Ref<VoxelChunk> p_chunk) {
Ref<VoxelChunkDefault> chunk = p_chunk;

View File

@ -27,7 +27,7 @@ SOFTWARE.
#include "../../defines.h"
#include "scene/3d/mesh_instance.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
_FORCE_INLINE_ int VoxelMesherDefault::get_build_flags() const {
return _build_flags;

View File

@ -30,7 +30,7 @@ SOFTWARE.
#include "../../world/jobs/voxel_job.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void VoxelMesherMarchingCubes::get_voxel_type_array(int *arr, Ref<VoxelChunk> chunk, const int x, const int y, const int z, const int size) {
uint8_t *channel_type = chunk->channel_get(_channel_index_type);

View File

@ -25,7 +25,7 @@ SOFTWARE.
#include "../../defines.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "../../../opensimplex/open_simplex_noise.h"
#include "../../meshers/default/voxel_mesher_default.h"

View File

@ -35,7 +35,7 @@
#include "core/input/input.h"
#include "core/os/file_access.h"
#include "drivers/unix/os_unix.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/audio/audio_driver_dummy.h"
#include "servers/rendering/rendering_server_raster.h"

View File

@ -17,7 +17,7 @@
#pragma GCC diagnostic ignored "-Wvolatile"
#include "servers/audio_server.h"
#pragma GCC diagnostic pop
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "servers/rendering/rendering_server_wrap_mt.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering/rendering_server_raster.h"

View File

@ -41,7 +41,7 @@
#include "main/input_default.h"
#include "servers/audio_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class OSIPhone : public OS_Unix {
private:

View File

@ -43,7 +43,7 @@
#include "servers/audio_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering/rendering_server_wrap_mt.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include <AppKit/AppKit.h>
#include <AppKit/NSCursor.h>

View File

@ -42,7 +42,7 @@
#endif
#include "servers/audio_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#undef CursorShape

View File

@ -43,7 +43,7 @@
#include "power_windows.h"
#include "servers/audio_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef XAUDIO2_ENABLED
#include "drivers/xaudio2/audio_driver_xaudio2.h"
#endif

View File

@ -43,7 +43,7 @@
#include "power_x11.h"
#include "servers/audio_server.h"
#include "servers/rendering/rasterizer.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include <X11/Xcursor/Xcursor.h>
#include <X11/Xlib.h>

View File

@ -34,7 +34,7 @@
#include "core/math/math_funcs.h"
#include "scene/main/viewport.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void Camera2D::_update_scroll() {
if (!is_inside_tree()) {

View File

@ -38,7 +38,7 @@
#include "scene/main/canvas_item.h"
#include "scene/resources/material/particles_material.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void CPUParticles2D::set_emitting(bool p_emitting) {
if (emitting == p_emitting) {

View File

@ -31,7 +31,7 @@
#include "light_2d.h"
#include "core/config/engine.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
Dictionary Light2D::_edit_get_state() const {

View File

@ -42,7 +42,7 @@
#include "scene/resources/shapes/ray_shape.h"
#include "scene/resources/shapes/shape.h"
#include "scene/resources/shapes/sphere_shape.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void CollisionShape::make_convex_from_brothers() {
Node *p = get_parent();

View File

@ -37,7 +37,7 @@
#include "scene/resources/gradient.h"
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/material/particles_material.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
AABB CPUParticles::get_aabb() const {
return AABB();

View File

@ -31,7 +31,7 @@
/*************************************************************************/
#include "scene/3d/visual_instance.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Light : public VisualInstance {
GDCLASS(Light, VisualInstance);

View File

@ -40,7 +40,7 @@
#include "scene/resources/shapes/shape.h"
#include "scene/resources/world_3d.h"
#include "servers/navigation_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void NavigationObstacle::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_rid"), &NavigationObstacle::get_rid);

View File

@ -34,7 +34,7 @@
#include "scene/resources/occluder_shape.h"
#include "scene/resources/world_3d.h"
#include "servers/rendering/portals/portal_occlusion_culler.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void Occluder::resource_changed(RES res) {
update_gizmos();

View File

@ -35,7 +35,7 @@
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/world_3d.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Path::Path() {
SceneTree *st = SceneTree::get_singleton();

View File

@ -38,7 +38,7 @@
#include "scene/main/viewport.h"
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/world_3d.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool Portal::_portal_plane_convention = false;
bool Portal::_settings_gizmo_show_margins = true;

View File

@ -31,7 +31,7 @@
#include "reflection_probe.h"
#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void ReflectionProbe::set_intensity(float p_intensity) {
intensity = p_intensity;

View File

@ -34,7 +34,7 @@
#include "room_group.h"
#include "room_manager.h"
#include "scene/resources/world_3d.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void Room::SimplifyInfo::set_simplify(real_t p_value, real_t p_room_size) {
_plane_simplify = CLAMP(p_value, 0.0, 1.0);

View File

@ -35,7 +35,7 @@
#include "room_manager.h"
#include "scene/resources/mesh/mesh.h"
#include "scene/resources/world_3d.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void RoomGroup::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_roomgroup_priority", "p_priority"), &RoomGroup::set_roomgroup_priority);

View File

@ -33,7 +33,7 @@
#include "scene/resources/material/material.h"
#include "scene/resources/world_3d.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
//#include "skeleton.h"
AABB VisualInstance::get_transformed_aabb() const {

View File

@ -34,7 +34,7 @@
#include "core/math/face3.h"
#include "core/object/reference.h"
#include "scene/3d/cull_instance.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Material;

View File

@ -42,7 +42,7 @@
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"
#include "scene/resources/packed_scene.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void ScriptDebuggerRemote::_send_video_memory() {
List<ResourceUsage> usage;

View File

@ -31,7 +31,7 @@
#include "button.h"
#include "core/string/translation.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "scene/main/scene_string_names.h"
Size2 Button::get_minimum_size() const {

View File

@ -30,7 +30,7 @@
#include "check_box.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Size2 CheckBox::get_icon_size() const {
Ref<Texture> checked = Control::get_theme_icon("checked");

View File

@ -31,7 +31,7 @@
#include "check_button.h"
#include "core/string/print_string.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Size2 CheckButton::get_icon_size() const {
Ref<Texture> on = Control::get_theme_icon(is_disabled() ? "on_disabled" : "on");

View File

@ -31,7 +31,7 @@
#include "nine_patch_rect.h"
#include "core/config/project_settings.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void NinePatchRect::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {

View File

@ -30,7 +30,7 @@
#include "texture_rect.h"
#include "core/core_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void TextureRect::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW) {

View File

@ -43,7 +43,7 @@
#include "scene/main/scene_string_names.h"
#include "servers/rendering/rendering_server_constants.h"
#include "servers/rendering/rendering_server_raster.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "scene/main/scene_tree.h"
#include "scene/resources/mesh/multimesh.h"

View File

@ -43,7 +43,7 @@
#include "scene/main/timer.h"
#include "scene/main/viewport.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"

View File

@ -34,7 +34,7 @@
#include "scene/main/control.h"
#include "scene/main/viewport.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
Dictionary Node2D::_edit_get_state() const {

View File

@ -37,7 +37,7 @@
#include "scene/main/world.h"
#include "scene/resources/world_3d.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering_server_callbacks.h"
#include "core/servers/rendering/rendering_server_callbacks.h"
/*

View File

@ -35,7 +35,7 @@
#include "core/math/transform_2d.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "world.h"
class Camera;

View File

@ -33,7 +33,7 @@
#include "core/config/project_settings.h"
#include "scene/resources/sky.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "texture.h"
RID Environment3D::get_rid() const {

View File

@ -33,7 +33,7 @@
#include "core/object/resource.h"
#include "core/containers/self_list.h"
#include "scene/resources/shader.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Texture;

View File

@ -36,7 +36,7 @@
#include "scene/resources/material/material.h"
#include "scene/resources/shapes/shape.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Mesh : public Resource {
GDCLASS(Mesh, Resource);

View File

@ -30,7 +30,7 @@
#include "multimesh.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void MultiMesh::_set_transform_array(const PoolVector<Vector3> &p_array) {
if (transform_format != TRANSFORM_3D) {

View File

@ -31,7 +31,7 @@
/*************************************************************************/
#include "scene/resources/mesh/mesh.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class MultiMesh : public Resource {
GDCLASS(MultiMesh, Resource);

View File

@ -29,7 +29,7 @@
/*************************************************************************/
#include "primitive_meshes.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "core/core_string_names.h"
#include "core/os/main_loop.h"

View File

@ -32,7 +32,7 @@
#include "core/config/engine.h"
#include "core/math/transform.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"

View File

@ -30,7 +30,7 @@
#include "occluder_shape_polygon.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#ifdef TOOLS_ENABLED
void OccluderShapePolygon::_update_aabb() {

View File

@ -32,7 +32,7 @@
#include "core/os/file_access.h"
#include "scene/main/scene_string_names.h"
#include "servers/rendering/shader_language.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
#include "texture.h"
Shader::Mode Shader::get_mode() const {

View File

@ -31,7 +31,7 @@
#include "capsule_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
Vector<Vector2> CapsuleShape2D::get_points() const {
Vector<Vector2> points;

View File

@ -31,7 +31,7 @@
#include "circle_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool CircleShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
return p_point.length() < get_radius() + p_tolerance;

View File

@ -31,7 +31,7 @@
#include "concave_polygon_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool ConcavePolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
PoolVector<Vector2> s = get_segments();

View File

@ -32,7 +32,7 @@
#include "core/math/geometry.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool ConvexPolygonShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
return Geometry::is_point_in_polygon(p_point, points);

View File

@ -31,7 +31,7 @@
#include "line_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool LineShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
Vector2 point = get_d() * get_normal();

View File

@ -31,7 +31,7 @@
#include "rectangle_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
void RectangleShape2D::_update_shape() {
Physics2DServer::get_singleton()->shape_set_data(get_rid(), extents);
emit_changed();

View File

@ -31,7 +31,7 @@
#include "segment_shape_2d.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
bool SegmentShape2D::_edit_is_selected_on_click(const Point2 &p_point, double p_tolerance) const {
Vector2 l[2] = { a, b };

View File

@ -32,7 +32,7 @@
#include "core/object/resource.h"
#include "scene/resources/texture.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class CanvasItem;

View File

@ -38,7 +38,7 @@
#include "core/os/thread_safe.h"
#include "scene/resources/curve.h"
#include "scene/resources/gradient.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Texture : public Resource {
GDCLASS(Texture, Resource);

View File

@ -37,7 +37,7 @@
#include "scene/main/world.h"
#include "servers/navigation_2d_server.h"
#include "servers/physics_2d_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
struct SpatialIndexer2D {
struct CellRef {

View File

@ -34,7 +34,7 @@
#include "core/object/resource.h"
#include "scene/resources/environment_3d.h"
#include "servers/physics_server.h"
#include "servers/rendering_server.h"
#include "core/servers/rendering/rendering_server.h"
class Camera;
class VisibilityNotifier;

View File

@ -65,7 +65,6 @@
#include "physics_2d_server.h"
#include "physics_server.h"
#include "rendering/shader_types.h"
#include "rendering_server.h"
#include "scene/debugger/script_debugger_remote.h"
static void _debugger_get_resource_usage(List<ScriptDebuggerRemote::ResourceUsage> *r_usage) {
@ -97,20 +96,8 @@ Physics2DServer *_createPandemoniumPhysics2DCallback() {
return Physics2DServerWrapMT::init_server<Physics2DServerSW>();
}
static bool has_server_feature_callback(const String &p_feature) {
if (RenderingServer::get_singleton()) {
if (RenderingServer::get_singleton()->has_os_feature(p_feature)) {
return true;
}
}
return false;
}
void register_server_types() {
OS::get_singleton()->set_has_server_feature_callback(has_server_feature_callback);
ClassDB::register_virtual_class<RenderingServer>();
ClassDB::register_class<AudioServer>();
ClassDB::register_virtual_class<PhysicsServer>();
ClassDB::register_virtual_class<Physics2DServer>();
@ -221,7 +208,6 @@ void unregister_server_types() {
}
void register_server_singletons() {
Engine::get_singleton()->add_singleton(Engine::Singleton("RenderingServer", RenderingServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("AudioServer", AudioServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("PhysicsServer", PhysicsServer::get_singleton()));
Engine::get_singleton()->add_singleton(Engine::Singleton("Physics2DServer", Physics2DServer::get_singleton()));

View File

@ -31,7 +31,7 @@
/*************************************************************************/
#include "core/containers/local_vector.h"
#include "servers/rendering_server_callbacks.h"
#include "core/servers/rendering/rendering_server_callbacks.h"
#include <stdint.h>

Some files were not shown because too many files have changed in this diff Show More