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.
This commit is contained in:
Hugo Locurcio 2021-12-10 17:01:51 +01:00
parent 85380c5207
commit b3174e7af9
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
18 changed files with 80 additions and 0 deletions

View file

@ -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;
}