Skip to content

Commit

Permalink
Exit early from webgl required behaivor
Browse files Browse the repository at this point in the history
  • Loading branch information
mchenryc committed Aug 26, 2018
1 parent 89a5af3 commit c603cfe
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions freeciv-web/src/main/webapp/javascript/webgl/renderer_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand Down

0 comments on commit c603cfe

Please sign in to comment.