Move RenderingServer enums to a dedicated RenderingServerEnums (RSE) namespace

A number of headers in the codebase included `rendering_server.h` just for
some enum definitions. This means that any change to `rendering_server.h` or
one of its dependencies would trigger a massive incremental rebuild.

With this change, we decouple a number of classes from `rendering_server.h`,
greatly speeding up incremental rebuilds for that area.

On my machine, this reduces incremental compilation time after an edit of
`rendering_server.h` by 60s (from 2m57s).
This commit is contained in:
Rémi Verschelde 2026-02-17 18:36:21 +01:00
parent 16f5289f42
commit f5a290ac46
No known key found for this signature in database
GPG key ID: C3336907360768E1
343 changed files with 6732 additions and 6432 deletions

View file

@ -32,6 +32,7 @@
#include "scene/main/viewport.h"
#include "scene/resources/environment.h"
#include "servers/rendering/rendering_server.h"
///////////////////////////
@ -49,7 +50,7 @@ void FogVolume::_bind_methods() {
}
void FogVolume::_validate_property(PropertyInfo &p_property) const {
if (p_property.name == "size" && shape == RS::FOG_VOLUME_SHAPE_WORLD) {
if (p_property.name == "size" && shape == RSE::FOG_VOLUME_SHAPE_WORLD) {
p_property.usage = PROPERTY_USAGE_NONE;
}
}
@ -83,15 +84,15 @@ Vector3 FogVolume::get_size() const {
return size;
}
void FogVolume::set_shape(RS::FogVolumeShape p_type) {
void FogVolume::set_shape(RSE::FogVolumeShape p_type) {
shape = p_type;
RS::get_singleton()->fog_volume_set_shape(_get_volume(), shape);
RS::get_singleton()->instance_set_ignore_culling(get_instance(), shape == RS::FOG_VOLUME_SHAPE_WORLD);
RS::get_singleton()->instance_set_ignore_culling(get_instance(), shape == RSE::FOG_VOLUME_SHAPE_WORLD);
update_gizmos();
notify_property_list_changed();
}
RS::FogVolumeShape FogVolume::get_shape() const {
RSE::FogVolumeShape FogVolume::get_shape() const {
return shape;
}
@ -110,7 +111,7 @@ Ref<Material> FogVolume::get_material() const {
}
AABB FogVolume::get_aabb() const {
if (shape != RS::FOG_VOLUME_SHAPE_WORLD) {
if (shape != RSE::FOG_VOLUME_SHAPE_WORLD) {
return AABB(-size / 2, size);
}
return AABB();
@ -135,7 +136,7 @@ PackedStringArray FogVolume::get_configuration_warnings() const {
FogVolume::FogVolume() {
volume = RS::get_singleton()->fog_volume_create();
RS::get_singleton()->fog_volume_set_shape(volume, RS::FOG_VOLUME_SHAPE_BOX);
RS::get_singleton()->fog_volume_set_shape(volume, RSE::FOG_VOLUME_SHAPE_BOX);
set_base(volume);
}