mirror of
https://github.com/godotengine/godot.git
synced 2025-10-29 20:51:14 +00:00
Check only for WebGL 1.0, move test to HTML file
Whether to use WebGL 1.0 or 2.0 can only be determined at runtime after reading project settings, so check for the lower version. The test is now in the HTML file, so if desired WebGL 2.0 can be checked early by changing the behaviour there.
This commit is contained in:
parent
955397dfd5
commit
61026e62bf
3 changed files with 32 additions and 23 deletions
|
|
@ -444,6 +444,7 @@ Error OS_JavaScript::initialize(const VideoMode &p_desired, int p_video_driver,
|
|||
break;
|
||||
}
|
||||
EMSCRIPTEN_WEBGL_CONTEXT_HANDLE ctx = emscripten_webgl_create_context(NULL, &attributes);
|
||||
ERR_EXPLAIN("WebGL " + itos(attributes.majorVersion) + ".0 not available");
|
||||
ERR_FAIL_COND_V(emscripten_webgl_make_context_current(ctx) != EMSCRIPTEN_RESULT_SUCCESS, ERR_UNAVAILABLE);
|
||||
|
||||
video_mode = p_desired;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue