diff options
| author | Leon Krause | 2018-03-15 04:00:32 +0100 |
|---|---|---|
| committer | Leon Krause | 2018-03-15 04:04:24 +0100 |
| commit | 61026e62bf8659a4ffe4fc1b5cbd404d3e25adeb (patch) | |
| tree | 5b5d883fe1e3997c494b5da21fe7352b343d501a /platform/javascript/os_javascript.cpp | |
| parent | 955397dfd5845c0bd1510581a77d20989f13ab19 (diff) | |
| download | godot-61026e62bf8659a4ffe4fc1b5cbd404d3e25adeb.tar.gz godot-61026e62bf8659a4ffe4fc1b5cbd404d3e25adeb.tar.zst godot-61026e62bf8659a4ffe4fc1b5cbd404d3e25adeb.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | platform/javascript/os_javascript.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/platform/javascript/os_javascript.cpp b/platform/javascript/os_javascript.cpp index ace0bdad6..cbfe99ba2 100644 --- a/platform/javascript/os_javascript.cpp +++ b/platform/javascript/os_javascript.cpp @@ -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; |
