From c603cfecbe0e02a9964ba54e9b2f206ca9686fbd Mon Sep 17 00:00:00 2001 From: Chadwick McHenry Date: Sat, 25 Aug 2018 20:05:47 -0400 Subject: [PATCH] Exit early from webgl required behaivor --- .../src/main/webapp/javascript/webgl/renderer_main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/freeciv-web/src/main/webapp/javascript/webgl/renderer_main.js b/freeciv-web/src/main/webapp/javascript/webgl/renderer_main.js index c0a4b0aa2..6a78c5493 100644 --- a/freeciv-web/src/main/webapp/javascript/webgl/renderer_main.js +++ b/freeciv-web/src/main/webapp/javascript/webgl/renderer_main.js @@ -30,6 +30,11 @@ var anaglyph_3d_enabled = false; ****************************************************************************/ function init_webgl_renderer() { + if (!Detector.webgl) { + swal("3D WebGL not supported by your browser or you don't have a 3D graphics card. Please go back and try the 2D version instead. "); + return; + } + // load Three.js dynamically. $.ajax({ async: false, @@ -43,11 +48,6 @@ function init_webgl_renderer() dataType: "script" }); - if (!Detector.webgl) { - swal("3D WebGL not supported by your browser or you don't have a 3D graphics card. Please go back and try the 2D version instead. "); - return; - } - /* Loads the two tileset definition files */ $.ajax({ url: "/javascript/2dcanvas/tileset_config_amplio2.js",