summaryrefslogtreecommitdiff
path: root/servers/rendering/rendering_server_default.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-12-10 17:01:51 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-12-10 17:10:47 +0100
commitb3174e7af93e9840698bba53a5d866a61c37d2da (patch)
tree794c5807f2a043bdc57ee7d1c66d2070cb484536 /servers/rendering/rendering_server_default.cpp
parent85380c52073d679c088d61fc663ec62cbd85b453 (diff)
Add `RenderingServer.get_video_adapter_type()` method
This can be used to distinguish between integrated, dedicated, virtual and software-emulated GPUs. This in turn can be used to automatically adjust graphics settings, or warn users about features that may run slowly on their hardware.
Diffstat (limited to 'servers/rendering/rendering_server_default.cpp')
-rw-r--r--servers/rendering/rendering_server_default.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/rendering_server_default.cpp b/servers/rendering/rendering_server_default.cpp
index 2ce9a20b6b..bb52e6c46a 100644
--- a/servers/rendering/rendering_server_default.cpp
+++ b/servers/rendering/rendering_server_default.cpp
@@ -255,6 +255,10 @@ String RenderingServerDefault::get_video_adapter_vendor() const {
return RSG::storage->get_video_adapter_vendor();
}
+RenderingDevice::DeviceType RenderingServerDefault::get_video_adapter_type() const {
+ return RSG::storage->get_video_adapter_type();
+}
+
void RenderingServerDefault::set_frame_profiling_enabled(bool p_enable) {
RSG::storage->capturing_timestamps = p_enable;
}