forked from gpujs/gpu.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgpu.js
More file actions
37 lines (32 loc) · 742 Bytes
/
gpu.js
File metadata and controls
37 lines (32 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
///
/// Class: GPU
///
/// Initialises the GPU.js library class which manages the WebGL context for the created functions.
///
var GPU = (function() {
var GPU = GPUCore;
GPU.prototype.getGl = function() {
return this.gl;
};
GPU.prototype.getCanvas = function(mode) {
if (mode == "cpu") {
return this.canvasCpu;
}
return this.canvas;
};
///
/// Function: support_webgl
///
/// Return TRUE, if browser supports webgl AND canvas
///
/// Note: This function can also be called directly `GPU.support_webgl()`
///
/// Returns:
/// {Boolean} TRUE if browser supports webgl
///
function support_webgl() {
return GPUUtils.browserSupport_webgl();
}
GPU.prototype.support_webgl = support_webgl;
return GPU;
})();