diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index a3ec4d25f1b..42a164bbeb7 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1556,11 +1556,11 @@ Returns [code]true[/code] if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens. - + - Not yet implemented. Always returns [code]false[/code]. + [i]Deprecated.[/i] This method has not been used since Godot 3.0. Always returns false. @@ -5332,11 +5332,11 @@ Video memory used (in bytes). When using the Forward+ or mobile rendering backends, this is always greater than the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED], since there is miscellaneous data not accounted for by those two metrics. When using the GL Compatibility backend, this is equal to the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED]. - - Hardware supports shaders. This enum is currently unused in Godot 3.x. + + [i]Deprecated.[/i] This constant has not been used since Godot 3.0. - - Hardware supports multithreading. This enum is currently unused in Godot 3.x. + + [i]Deprecated.[/i] This constant has not been used since Godot 3.0. diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp index 1e6a311cc27..f7620ad5dc2 100644 --- a/servers/rendering/rendering_server_default.cpp +++ b/servers/rendering/rendering_server_default.cpp @@ -287,9 +287,11 @@ void RenderingServerDefault::set_default_clear_color(const Color &p_color) { RSG::viewport->set_default_clear_color(p_color); } +#ifndef DISABLE_DEPRECATED bool RenderingServerDefault::has_feature(Features p_feature) const { return false; } +#endif void RenderingServerDefault::sdfgi_set_debug_probe_select(const Vector3 &p_position, const Vector3 &p_dir) { RSG::scene->sdfgi_set_debug_probe_select(p_position, p_dir); diff --git a/servers/rendering/rendering_server_default.h b/servers/rendering/rendering_server_default.h index dac12759575..11ec6702809 100644 --- a/servers/rendering/rendering_server_default.h +++ b/servers/rendering/rendering_server_default.h @@ -1021,7 +1021,9 @@ public: virtual Color get_default_clear_color() override; virtual void set_default_clear_color(const Color &p_color) override; +#ifndef DISABLE_DEPRECATED virtual bool has_feature(Features p_feature) const override; +#endif virtual bool has_os_feature(const String &p_feature) const override; virtual void set_debug_generate_wireframes(bool p_generate) override; diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 2d61e470624..27e677bce03 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -3362,7 +3362,6 @@ void RenderingServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_default_clear_color"), &RenderingServer::get_default_clear_color); ClassDB::bind_method(D_METHOD("set_default_clear_color", "color"), &RenderingServer::set_default_clear_color); - ClassDB::bind_method(D_METHOD("has_feature", "feature"), &RenderingServer::has_feature); ClassDB::bind_method(D_METHOD("has_os_feature", "feature"), &RenderingServer::has_os_feature); ClassDB::bind_method(D_METHOD("set_debug_generate_wireframes", "generate"), &RenderingServer::set_debug_generate_wireframes); @@ -3380,9 +3379,6 @@ void RenderingServer::_bind_methods() { BIND_ENUM_CONSTANT(RENDERING_INFO_BUFFER_MEM_USED); BIND_ENUM_CONSTANT(RENDERING_INFO_VIDEO_MEM_USED); - BIND_ENUM_CONSTANT(FEATURE_SHADERS); - BIND_ENUM_CONSTANT(FEATURE_MULTITHREADED); - ADD_SIGNAL(MethodInfo("frame_pre_draw")); ADD_SIGNAL(MethodInfo("frame_post_draw")); @@ -3392,6 +3388,13 @@ void RenderingServer::_bind_methods() { ClassDB::bind_method(D_METHOD("create_local_rendering_device"), &RenderingServer::create_local_rendering_device); ClassDB::bind_method(D_METHOD("call_on_render_thread", "callable"), &RenderingServer::call_on_render_thread); + +#ifndef DISABLE_DEPRECATED + ClassDB::bind_method(D_METHOD("has_feature", "feature"), &RenderingServer::has_feature); + + BIND_ENUM_CONSTANT(FEATURE_SHADERS); + BIND_ENUM_CONSTANT(FEATURE_MULTITHREADED); +#endif } void RenderingServer::mesh_add_surface_from_mesh_data(RID p_mesh, const Geometry3D::MeshData &p_mesh_data) { diff --git a/servers/rendering_server.h b/servers/rendering_server.h index 8b17463b4d3..958c21f893b 100644 --- a/servers/rendering_server.h +++ b/servers/rendering_server.h @@ -1612,13 +1612,14 @@ public: virtual Color get_default_clear_color() = 0; virtual void set_default_clear_color(const Color &p_color) = 0; +#ifndef DISABLE_DEPRECATED + // Never actually used, should be removed when we can break compatibility. enum Features { FEATURE_SHADERS, FEATURE_MULTITHREADED, }; - virtual bool has_feature(Features p_feature) const = 0; - +#endif virtual bool has_os_feature(const String &p_feature) const = 0; virtual void set_debug_generate_wireframes(bool p_generate) = 0; @@ -1748,10 +1749,13 @@ VARIANT_ENUM_CAST(RenderingServer::CanvasLightShadowFilter); VARIANT_ENUM_CAST(RenderingServer::CanvasOccluderPolygonCullMode); VARIANT_ENUM_CAST(RenderingServer::GlobalShaderParameterType); VARIANT_ENUM_CAST(RenderingServer::RenderingInfo); -VARIANT_ENUM_CAST(RenderingServer::Features); VARIANT_ENUM_CAST(RenderingServer::CanvasTextureChannel); VARIANT_ENUM_CAST(RenderingServer::BakeChannels); +#ifndef DISABLE_DEPRECATED +VARIANT_ENUM_CAST(RenderingServer::Features); +#endif + // Alias to make it easier to use. #define RS RenderingServer