Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Mark OS.RenderingDriver Enum as Deprecated

Mr.k04f3144e39df
diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index cc5ac4a0fad..4240e7e4aae 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -879,10 +879,12 @@ void OS::_bind_methods() {
ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false);
ADD_PROPERTY_DEFAULT("low_processor_usage_mode_sleep_usec", 6900);
+#ifndef DISABLE_DEPRECATED
BIND_ENUM_CONSTANT(RENDERING_DRIVER_VULKAN);
BIND_ENUM_CONSTANT(RENDERING_DRIVER_OPENGL3);
BIND_ENUM_CONSTANT(RENDERING_DRIVER_D3D12);
BIND_ENUM_CONSTANT(RENDERING_DRIVER_METAL);
+#endif // DISABLE_DEPRECATED
BIND_ENUM_CONSTANT(SYSTEM_DIR_DESKTOP);
BIND_ENUM_CONSTANT(SYSTEM_DIR_DCIM);
diff --git a/core/core_bind.h b/core/core_bind.h
index b12beeeb673..06a06213fb7 100644
--- a/core/core_bind.h
+++ b/core/core_bind.h
@@ -173,12 +173,14 @@ protected:
#endif
public:
+#ifndef DISABLE_DEPRECATED
enum RenderingDriver {
RENDERING_DRIVER_VULKAN,
RENDERING_DRIVER_OPENGL3,
RENDERING_DRIVER_D3D12,
RENDERING_DRIVER_METAL,
};
+#endif // DISABLE_DEPRECATED
PackedByteArray get_entropy(int p_bytes);
String get_system_ca_certificates();
@@ -702,7 +704,9 @@ VARIANT_ENUM_CAST(CoreBind::ResourceLoader::CacheMode);
VARIANT_BITFIELD_CAST(CoreBind::ResourceSaver::SaverFlags);
+#ifndef DISABLE_DEPRECATED
VARIANT_ENUM_CAST(CoreBind::OS::RenderingDriver);
+#endif
VARIANT_ENUM_CAST(CoreBind::OS::SystemDir);
VARIANT_ENUM_CAST(CoreBind::OS::StdHandleType);
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 924be854072..423f1ddde00 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -921,16 +921,16 @@
</member>
</members>
<constants>
- <constant name="RENDERING_DRIVER_VULKAN" value="0" enum="RenderingDriver">
+ <constant name="RENDERING_DRIVER_VULKAN" value="0" enum="RenderingDriver" deprecated="This constant is not used by the engine.">
The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1, 1.2, and 1.3 if available.
</constant>
- <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver">
+ <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver" deprecated="This constant is not used by the engine.">
The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web.
</constant>
- <constant name="RENDERING_DRIVER_D3D12" value="2" enum="RenderingDriver">
+ <constant name="RENDERING_DRIVER_D3D12" value="2" enum="RenderingDriver" deprecated="This constant is not used by the engine.">
The Direct3D 12 rendering driver. It requires the 12_0 feature level and Shader Model 6.0 support.
</constant>
- <constant name="RENDERING_DRIVER_METAL" value="3" enum="RenderingDriver">
+ <constant name="RENDERING_DRIVER_METAL" value="3" enum="RenderingDriver" deprecated="This constant is not used by the engine.">
The Metal rendering driver.
</constant>
<constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir">