Skip to content

Commit 7976617

Browse files
committed
support_webgl() public function
1 parent b52a2d3 commit 7976617

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

src/gpu.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,22 @@
44
/// Initialises the GPU.js library class which manages the WebGL context for the created functions.
55
///
66
var GPU = (function() {
7-
return gpu_core;
7+
var GPU = gpu_core;
8+
9+
///
10+
/// Function: support_webgl
11+
///
12+
/// Return TRUE, if browser supports webgl AND canvas
13+
///
14+
/// Note: This function can also be called directly `GPU.support_webgl()`
15+
///
16+
/// Returns:
17+
/// {Boolean} TRUE if browser supports webgl
18+
///
19+
function support_webgl() {
20+
return gpu_utils.browserSupport_webgl();
21+
}
22+
GPU.prototype.support_webgl = support_webgl;
23+
24+
return GPU;
825
})();

0 commit comments

Comments
 (0)