From 63a08f249300a273abf2ce47d629cf7dfc8a7c07 Mon Sep 17 00:00:00 2001 From: Micky Date: Wed, 10 Jan 2024 11:27:37 +0100 Subject: Deprecate RenderingServer's `has_feature` and Features enum --- servers/rendering_server.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'servers/rendering_server.cpp') diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 2d61e47062..27e677bce0 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) { -- cgit v1.2.3