summaryrefslogtreecommitdiff
path: root/drivers/gles3/rasterizer_storage_gles3.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-31 15:39:46 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-05-03 01:18:35 +0200
commit31194f5b1c84638267958c8efa9212f362e57ae0 (patch)
tree5311467eadbbf00c1432910df46a1cc738539472 /drivers/gles3/rasterizer_storage_gles3.cpp
parent87622861106b4bb06040a603060bedc2835648ba (diff)
Add `get_video_adapter_api_version()` to RenderingServer
This method can be used to get the graphics API version currently in use (such as Vulkan). It can be used by projects for troubleshooting or statistical purposes.
Diffstat (limited to 'drivers/gles3/rasterizer_storage_gles3.cpp')
-rw-r--r--drivers/gles3/rasterizer_storage_gles3.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp
index 0049e74a7c..cca445bf00 100644
--- a/drivers/gles3/rasterizer_storage_gles3.cpp
+++ b/drivers/gles3/rasterizer_storage_gles3.cpp
@@ -627,6 +627,10 @@ RenderingDevice::DeviceType RasterizerStorageGLES3::get_video_adapter_type() con
return RenderingDevice::DeviceType::DEVICE_TYPE_OTHER;
}
+String RasterizerStorageGLES3::get_video_adapter_api_version() const {
+ return (const char *)glGetString(GL_VERSION);
+}
+
void RasterizerStorageGLES3::initialize() {
config = GLES3::Config::get_singleton();