Add VisualServer methods to get the video adapter name and vendor

These methods can be used in scripts to retrieve the OpenGL
`GL_RENDERER` and `GL_VENDOR` strings (respectively).

This closes #28404.
This commit is contained in:
Hugo Locurcio 2019-09-13 20:08:05 +02:00
parent 61dd7748ca
commit 0cad2c0cd1
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
14 changed files with 70 additions and 4 deletions

View file

@ -1397,6 +1397,22 @@
Returns the id of the test texture. Creates one if none exists.
</description>
</method>
<method name="get_video_adapter_name" qualifiers="const">
<return type="String">
</return>
<description>
Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2").
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
<method name="get_video_adapter_vendor" qualifiers="const">
<return type="String">
</return>
<description>
Returns the vendor of the video adapter (e.g. "NVIDIA Corporation").
[b]Note:[/b] When running a headless or server binary, this function returns an empty string.
</description>
</method>
<method name="get_white_texture">
<return type="RID">
</return>