webgl_enabled

Returns whether the browser supports WebGL functionality and hardware acceleration.

Syntax:

webgl_enabled


Returns: Boolean


Description

This read-only variable will return whether WebGL is enabled (true) or not (false) for your game. It will only work for those games running through a browser (ie: HTML5), and for all other platforms it will return true.


Example:

if webgl_enabled global.quality = 1 else global.quality = 0;

The above code checks the WebGL flag and then sets the global variable "quality" accordingly.


Back: HTML5
Next: clickable_add
© Copyright YoYo Games Ltd. 2018 All Rights Reserved