How to get OpenGL version using Javascript?
问题 Is there any way to let the browser returns the opengl version string? I know that opengl is not executed by the browser, this is why in the code, the shaders are written as string to not make javascript syntax errors, So, if the browser can interract with the GPU, then there must be some code that returns a string to the console instead of shaders? 回答1: The short answer is, you can't. You can ask for the standard GL versions. const gl = document.createElement("canvas").getContext("webgl");