You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
This commit is contained in:
@@ -157,7 +157,7 @@ RendererRD::MaterialStorage::ShaderData *Fog::_create_fog_shader_func() {
|
||||
|
||||
RendererRD::MaterialStorage::ShaderData *Fog::_create_fog_shader_funcs() {
|
||||
return Fog::get_singleton()->_create_fog_shader_func();
|
||||
};
|
||||
}
|
||||
|
||||
RendererRD::MaterialStorage::MaterialData *Fog::_create_fog_material_func(FogShaderData *p_shader) {
|
||||
FogMaterialData *material_data = memnew(FogMaterialData);
|
||||
@@ -168,7 +168,7 @@ RendererRD::MaterialStorage::MaterialData *Fog::_create_fog_material_func(FogSha
|
||||
|
||||
RendererRD::MaterialStorage::MaterialData *Fog::_create_fog_material_funcs(RendererRD::MaterialStorage::ShaderData *p_shader) {
|
||||
return Fog::get_singleton()->_create_fog_material_func(static_cast<FogShaderData *>(p_shader));
|
||||
};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// FOG VOLUMES INSTANCE
|
||||
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
|
||||
/* FOG VOLUMES */
|
||||
|
||||
bool owns_fog_volume(RID p_rid) { return fog_volume_owner.owns(p_rid); };
|
||||
bool owns_fog_volume(RID p_rid) { return fog_volume_owner.owns(p_rid); }
|
||||
|
||||
virtual RID fog_volume_allocate() override;
|
||||
virtual void fog_volume_initialize(RID p_rid) override;
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
|
||||
/* FOG VOLUMES INSTANCE */
|
||||
|
||||
bool owns_fog_volume_instance(RID p_rid) { return fog_volume_instance_owner.owns(p_rid); };
|
||||
bool owns_fog_volume_instance(RID p_rid) { return fog_volume_instance_owner.owns(p_rid); }
|
||||
|
||||
RID fog_volume_instance_create(RID p_fog_volume);
|
||||
void fog_instance_free(RID p_rid);
|
||||
|
||||
@@ -467,7 +467,7 @@ public:
|
||||
|
||||
/* VOXEL GI API */
|
||||
|
||||
bool owns_voxel_gi(RID p_rid) { return voxel_gi_owner.owns(p_rid); };
|
||||
bool owns_voxel_gi(RID p_rid) { return voxel_gi_owner.owns(p_rid); }
|
||||
|
||||
virtual RID voxel_gi_allocate() override;
|
||||
virtual void voxel_gi_free(RID p_voxel_gi) override;
|
||||
@@ -524,14 +524,14 @@ public:
|
||||
VoxelGIInstance *voxel_gi = voxel_gi_instance_owner.get_or_null(p_probe);
|
||||
ERR_FAIL_NULL_V(voxel_gi, RID());
|
||||
return voxel_gi->texture;
|
||||
};
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ void voxel_gi_instance_set_render_index(RID p_probe, uint32_t p_index) {
|
||||
VoxelGIInstance *voxel_gi = voxel_gi_instance_owner.get_or_null(p_probe);
|
||||
ERR_FAIL_NULL(voxel_gi);
|
||||
|
||||
voxel_gi->render_index = p_index;
|
||||
};
|
||||
}
|
||||
|
||||
bool voxel_gi_instance_owns(RID p_rid) const {
|
||||
return voxel_gi_instance_owner.owns(p_rid);
|
||||
|
||||
@@ -701,7 +701,7 @@ RendererRD::MaterialStorage::ShaderData *SkyRD::_create_sky_shader_func() {
|
||||
RendererRD::MaterialStorage::ShaderData *SkyRD::_create_sky_shader_funcs() {
|
||||
// !BAS! Why isn't _create_sky_shader_func not just static too?
|
||||
return static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton)->sky._create_sky_shader_func();
|
||||
};
|
||||
}
|
||||
|
||||
RendererRD::MaterialStorage::MaterialData *SkyRD::_create_sky_material_func(SkyShaderData *p_shader) {
|
||||
SkyMaterialData *material_data = memnew(SkyMaterialData);
|
||||
@@ -713,7 +713,7 @@ RendererRD::MaterialStorage::MaterialData *SkyRD::_create_sky_material_func(SkyS
|
||||
RendererRD::MaterialStorage::MaterialData *SkyRD::_create_sky_material_funcs(RendererRD::MaterialStorage::ShaderData *p_shader) {
|
||||
// !BAS! same here, we could just make _create_sky_material_func static?
|
||||
return static_cast<RendererSceneRenderRD *>(RendererSceneRenderRD::singleton)->sky._create_sky_material_func(static_cast<SkyShaderData *>(p_shader));
|
||||
};
|
||||
}
|
||||
|
||||
SkyRD::SkyRD() {
|
||||
roughness_layers = GLOBAL_GET("rendering/reflections/sky_reflections/roughness_layers");
|
||||
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
static RendererCompositorRD *singleton;
|
||||
|
||||
public:
|
||||
RendererUtilities *get_utilities() { return utilities; };
|
||||
RendererUtilities *get_utilities() { return utilities; }
|
||||
RendererLightStorage *get_light_storage() { return light_storage; }
|
||||
RendererMaterialStorage *get_material_storage() { return material_storage; }
|
||||
RendererMeshStorage *get_mesh_storage() { return mesh_storage; }
|
||||
|
||||
@@ -78,7 +78,7 @@ protected:
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
virtual RendererRD::ForwardIDStorage *create_forward_id_storage() { return memnew(RendererRD::ForwardIDStorage); };
|
||||
virtual RendererRD::ForwardIDStorage *create_forward_id_storage() { return memnew(RendererRD::ForwardIDStorage); }
|
||||
|
||||
void _update_vrs(Ref<RenderSceneBuffersRD> p_render_buffers);
|
||||
|
||||
|
||||
@@ -1049,7 +1049,7 @@ void LightStorage::reflection_probe_free(RID p_rid) {
|
||||
ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_rid);
|
||||
reflection_probe->dependency.deleted_notify(p_rid);
|
||||
reflection_probe_owner.free(p_rid);
|
||||
};
|
||||
}
|
||||
|
||||
void LightStorage::reflection_probe_set_update_mode(RID p_probe, RS::ReflectionProbeUpdateMode p_mode) {
|
||||
ReflectionProbe *reflection_probe = reflection_probe_owner.get_or_null(p_probe);
|
||||
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
|
||||
/* LIGHT INSTANCE API */
|
||||
|
||||
bool owns_light_instance(RID p_rid) { return light_instance_owner.owns(p_rid); };
|
||||
bool owns_light_instance(RID p_rid) { return light_instance_owner.owns(p_rid); }
|
||||
|
||||
virtual RID light_instance_create(RID p_light) override;
|
||||
virtual void light_instance_free(RID p_light) override;
|
||||
@@ -811,7 +811,7 @@ public:
|
||||
|
||||
/* REFLECTION PROBE */
|
||||
|
||||
bool owns_reflection_probe(RID p_rid) { return reflection_probe_owner.owns(p_rid); };
|
||||
bool owns_reflection_probe(RID p_rid) { return reflection_probe_owner.owns(p_rid); }
|
||||
|
||||
virtual RID reflection_probe_allocate() override;
|
||||
virtual void reflection_probe_initialize(RID p_reflection_probe) override;
|
||||
@@ -953,7 +953,7 @@ public:
|
||||
|
||||
/* LIGHTMAP */
|
||||
|
||||
bool owns_lightmap(RID p_rid) { return lightmap_owner.owns(p_rid); };
|
||||
bool owns_lightmap(RID p_rid) { return lightmap_owner.owns(p_rid); }
|
||||
|
||||
virtual RID lightmap_allocate() override;
|
||||
virtual void lightmap_initialize(RID p_lightmap) override;
|
||||
@@ -1019,7 +1019,7 @@ public:
|
||||
|
||||
/* LIGHTMAP INSTANCE */
|
||||
|
||||
bool owns_lightmap_instance(RID p_rid) { return lightmap_instance_owner.owns(p_rid); };
|
||||
bool owns_lightmap_instance(RID p_rid) { return lightmap_instance_owner.owns(p_rid); }
|
||||
|
||||
virtual RID lightmap_instance_create(RID p_lightmap) override;
|
||||
virtual void lightmap_instance_free(RID p_lightmap) override;
|
||||
@@ -1039,7 +1039,7 @@ public:
|
||||
|
||||
/* SHADOW ATLAS API */
|
||||
|
||||
bool owns_shadow_atlas(RID p_rid) { return shadow_atlas_owner.owns(p_rid); };
|
||||
bool owns_shadow_atlas(RID p_rid) { return shadow_atlas_owner.owns(p_rid); }
|
||||
|
||||
virtual RID shadow_atlas_create() override;
|
||||
virtual void shadow_atlas_free(RID p_atlas) override;
|
||||
|
||||
@@ -254,7 +254,7 @@ private:
|
||||
|
||||
MaterialDataRequestFunction material_data_request_func[SHADER_TYPE_MAX];
|
||||
mutable RID_Owner<Material, true> material_owner;
|
||||
Material *get_material(RID p_rid) { return material_owner.get_or_null(p_rid); };
|
||||
Material *get_material(RID p_rid) { return material_owner.get_or_null(p_rid); }
|
||||
|
||||
SelfList<Material>::List material_update_list;
|
||||
Mutex material_update_list_mutex;
|
||||
@@ -403,7 +403,7 @@ public:
|
||||
|
||||
/* SHADER API */
|
||||
|
||||
bool owns_shader(RID p_rid) { return shader_owner.owns(p_rid); };
|
||||
bool owns_shader(RID p_rid) { return shader_owner.owns(p_rid); }
|
||||
|
||||
virtual RID shader_allocate() override;
|
||||
virtual void shader_initialize(RID p_shader) override;
|
||||
@@ -423,7 +423,7 @@ public:
|
||||
|
||||
/* MATERIAL API */
|
||||
|
||||
bool owns_material(RID p_rid) { return material_owner.owns(p_rid); };
|
||||
bool owns_material(RID p_rid) { return material_owner.owns(p_rid); }
|
||||
|
||||
void _material_queue_update(Material *material, bool p_uniform, bool p_texture);
|
||||
void _update_queued_materials();
|
||||
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
|
||||
/* MESH API */
|
||||
|
||||
bool owns_mesh(RID p_rid) { return mesh_owner.owns(p_rid); };
|
||||
bool owns_mesh(RID p_rid) { return mesh_owner.owns(p_rid); }
|
||||
|
||||
virtual RID mesh_allocate() override;
|
||||
virtual void mesh_initialize(RID p_mesh) override;
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
|
||||
/* MESH INSTANCE API */
|
||||
|
||||
bool owns_mesh_instance(RID p_rid) const { return mesh_instance_owner.owns(p_rid); };
|
||||
bool owns_mesh_instance(RID p_rid) const { return mesh_instance_owner.owns(p_rid); }
|
||||
|
||||
virtual RID mesh_instance_create(RID p_base) override;
|
||||
virtual void mesh_instance_free(RID p_rid) override;
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
|
||||
/* MULTIMESH API */
|
||||
|
||||
bool owns_multimesh(RID p_rid) { return multimesh_owner.owns(p_rid); };
|
||||
bool owns_multimesh(RID p_rid) { return multimesh_owner.owns(p_rid); }
|
||||
|
||||
virtual RID _multimesh_allocate() override;
|
||||
virtual void _multimesh_initialize(RID p_multimesh) override;
|
||||
@@ -737,7 +737,7 @@ public:
|
||||
|
||||
/* SKELETON API */
|
||||
|
||||
bool owns_skeleton(RID p_rid) const { return skeleton_owner.owns(p_rid); };
|
||||
bool owns_skeleton(RID p_rid) const { return skeleton_owner.owns(p_rid); }
|
||||
|
||||
virtual RID skeleton_allocate() override;
|
||||
virtual void skeleton_initialize(RID p_skeleton) override;
|
||||
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
|
||||
// Textures can be created from threads, so this RID_Owner is thread safe.
|
||||
mutable RID_Owner<Texture, true> texture_owner;
|
||||
Texture *get_texture(RID p_rid) { return texture_owner.get_or_null(p_rid); };
|
||||
Texture *get_texture(RID p_rid) { return texture_owner.get_or_null(p_rid); }
|
||||
|
||||
struct TextureToRDFormat {
|
||||
RD::DataFormat format;
|
||||
@@ -439,7 +439,7 @@ private:
|
||||
};
|
||||
|
||||
mutable RID_Owner<RenderTarget> render_target_owner;
|
||||
RenderTarget *get_render_target(RID p_rid) const { return render_target_owner.get_or_null(p_rid); };
|
||||
RenderTarget *get_render_target(RID p_rid) const { return render_target_owner.get_or_null(p_rid); }
|
||||
|
||||
void _clear_render_target(RenderTarget *rt);
|
||||
void _update_render_target(RenderTarget *rt);
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
|
||||
/* Canvas Texture API */
|
||||
|
||||
bool owns_canvas_texture(RID p_rid) { return canvas_texture_owner.owns(p_rid); };
|
||||
bool owns_canvas_texture(RID p_rid) { return canvas_texture_owner.owns(p_rid); }
|
||||
|
||||
virtual RID canvas_texture_allocate() override;
|
||||
virtual void canvas_texture_initialize(RID p_rid) override;
|
||||
@@ -502,7 +502,7 @@ public:
|
||||
|
||||
/* Texture API */
|
||||
|
||||
bool owns_texture(RID p_rid) const { return texture_owner.owns(p_rid); };
|
||||
bool owns_texture(RID p_rid) const { return texture_owner.owns(p_rid); }
|
||||
|
||||
virtual RID texture_allocate() override;
|
||||
virtual void texture_free(RID p_rid) override;
|
||||
@@ -591,7 +591,7 @@ public:
|
||||
|
||||
void update_decal_atlas();
|
||||
|
||||
bool owns_decal(RID p_rid) const { return decal_owner.owns(p_rid); };
|
||||
bool owns_decal(RID p_rid) const { return decal_owner.owns(p_rid); }
|
||||
|
||||
RID decal_atlas_get_texture() const;
|
||||
RID decal_atlas_get_texture_srgb() const;
|
||||
@@ -731,7 +731,7 @@ public:
|
||||
|
||||
/* RENDER TARGET API */
|
||||
|
||||
bool owns_render_target(RID p_rid) const { return render_target_owner.owns(p_rid); };
|
||||
bool owns_render_target(RID p_rid) const { return render_target_owner.owns(p_rid); }
|
||||
|
||||
virtual RID render_target_create() override;
|
||||
virtual void render_target_free(RID p_rid) override;
|
||||
|
||||
@@ -77,8 +77,8 @@ public:
|
||||
|
||||
/* VISIBILITY NOTIFIER */
|
||||
|
||||
VisibilityNotifier *get_visibility_notifier(RID p_rid) { return visibility_notifier_owner.get_or_null(p_rid); };
|
||||
bool owns_visibility_notifier(RID p_rid) const { return visibility_notifier_owner.owns(p_rid); };
|
||||
VisibilityNotifier *get_visibility_notifier(RID p_rid) { return visibility_notifier_owner.get_or_null(p_rid); }
|
||||
bool owns_visibility_notifier(RID p_rid) const { return visibility_notifier_owner.owns(p_rid); }
|
||||
|
||||
virtual RID visibility_notifier_allocate() override;
|
||||
virtual void visibility_notifier_initialize(RID p_notifier) override;
|
||||
|
||||
Reference in New Issue
Block a user