mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 01:26:50 -04:00
Web client: Show an alert if WebGL is unsupported instead of just immediately failing with obscure error
This commit is contained in:
parent
0ae4600660
commit
6a8ca0ebd4
@ -4722,6 +4722,8 @@ void GLContext_Create(void) {
|
||||
attribs.antialias = false;
|
||||
|
||||
ctx_handle = emscripten_webgl_create_context("#canvas", &attribs);
|
||||
if (!ctx_handle) Window_ShowDialog("WebGL unsupported", "WebGL is required to run ClassiCube");
|
||||
|
||||
emscripten_webgl_make_context_current(ctx_handle);
|
||||
emscripten_set_webglcontextlost_callback("#canvas", NULL, 0, GLContext_OnLost);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user