@nativescript/canvas 1.1.0 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +1 -5
- package/Canvas/common.js +41 -133
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +4 -4
- package/Canvas/index.android.js +62 -52
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +0 -4
- package/Canvas/index.ios.d.ts +0 -2
- package/Canvas/index.ios.js +24 -42
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/CanvasGradient.android.d.ts +2 -0
- package/Canvas2D/CanvasGradient/CanvasGradient.android.js +10 -1
- package/Canvas2D/CanvasGradient/CanvasGradient.android.js.map +1 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.android.d.ts +2 -0
- package/Canvas2D/CanvasPattern/CanvasPattern.android.js +10 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.android.js.map +1 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.d.ts +0 -1
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.js +0 -3
- package/Canvas2D/CanvasPattern/CanvasPattern.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/common.d.ts +1 -3
- package/Canvas2D/CanvasRenderingContext2D/common.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.android.d.ts +5 -6
- package/Canvas2D/CanvasRenderingContext2D/index.android.js +212 -394
- package/Canvas2D/CanvasRenderingContext2D/index.android.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +0 -6
- package/Canvas2D/CanvasRenderingContext2D/index.ios.d.ts +0 -3
- package/Canvas2D/CanvasRenderingContext2D/index.ios.js +92 -109
- package/Canvas2D/CanvasRenderingContext2D/index.ios.js.map +1 -1
- package/Canvas2D/DOMMatrix/DOMMatrix.android.d.ts +24 -0
- package/Canvas2D/DOMMatrix/DOMMatrix.android.js +81 -46
- package/Canvas2D/DOMMatrix/DOMMatrix.android.js.map +1 -1
- package/Canvas2D/DOMMatrix/DOMMatrix.d.ts +3 -2
- package/Canvas2D/DOMMatrix/common.d.ts +0 -2
- package/Canvas2D/DOMMatrix/common.js +0 -7
- package/Canvas2D/DOMMatrix/common.js.map +1 -1
- package/Canvas2D/ImageData/ImageData.android.d.ts +4 -5
- package/Canvas2D/ImageData/ImageData.android.js +48 -29
- package/Canvas2D/ImageData/ImageData.android.js.map +1 -1
- package/Canvas2D/ImageData/ImageData.d.ts +4 -2
- package/Canvas2D/ImageData/common.d.ts +0 -1
- package/Canvas2D/ImageData/common.js +1 -4
- package/Canvas2D/ImageData/common.js.map +1 -1
- package/Canvas2D/Path2D/Path2D.android.d.ts +3 -2
- package/Canvas2D/Path2D/Path2D.android.js +45 -25
- package/Canvas2D/Path2D/Path2D.android.js.map +1 -1
- package/Canvas2D/Path2D/Path2D.d.ts +0 -4
- package/Canvas2D/Path2D/Path2D.ios.d.ts +0 -2
- package/Canvas2D/Path2D/Path2D.ios.js +1 -9
- package/Canvas2D/Path2D/Path2D.ios.js.map +1 -1
- package/Canvas2D/Path2D/common.d.ts +1 -4
- package/Canvas2D/Path2D/common.js +2 -6
- package/Canvas2D/Path2D/common.js.map +1 -1
- package/Canvas2D/TextMetrics/TextMetrics.android.js +12 -12
- package/Canvas2D/TextMetrics/TextMetrics.android.js.map +1 -1
- package/Canvas2D/TextMetrics/common.d.ts +0 -1
- package/Canvas2D/TextMetrics/common.js +1 -4
- package/Canvas2D/TextMetrics/common.js.map +1 -1
- package/ImageAsset/ImageAsset.android.d.ts +11 -12
- package/ImageAsset/ImageAsset.android.js +92 -127
- package/ImageAsset/ImageAsset.android.js.map +1 -1
- package/ImageAsset/ImageAsset.d.ts +8 -12
- package/ImageAsset/ImageAsset.ios.js +3 -3
- package/ImageAsset/ImageAsset.ios.js.map +1 -1
- package/ImageAsset/common.d.ts +0 -1
- package/ImageAsset/common.js +1 -4
- package/ImageAsset/common.js.map +1 -1
- package/ImageBitmap/common.d.ts +0 -2
- package/ImageBitmap/common.js +0 -7
- package/ImageBitmap/common.js.map +1 -1
- package/ImageBitmap/index.android.d.ts +2 -2
- package/ImageBitmap/index.android.js +55 -292
- package/ImageBitmap/index.android.js.map +1 -1
- package/ImageBitmap/index.ios.d.ts +1 -2
- package/ImageBitmap/index.ios.js +34 -23
- package/ImageBitmap/index.ios.js.map +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/TextDecoder.android.d.ts +2 -1
- package/TextDecoder/TextDecoder.android.js +35 -38
- package/TextDecoder/TextDecoder.android.js.map +1 -1
- package/TextDecoder/common.d.ts +0 -1
- package/TextDecoder/common.js +1 -4
- package/TextDecoder/common.js.map +1 -1
- package/TextEncoder/TextEncoder.android.d.ts +2 -0
- package/TextEncoder/TextEncoder.android.js +35 -5
- package/TextEncoder/TextEncoder.android.js.map +1 -1
- package/TextEncoder/common.d.ts +0 -2
- package/TextEncoder/common.js +0 -7
- package/TextEncoder/common.js.map +1 -1
- package/WebGL/WebGLActiveInfo.d.ts +5 -8
- package/WebGL/WebGLActiveInfo.js +8 -24
- package/WebGL/WebGLActiveInfo.js.map +1 -1
- package/WebGL/WebGLExtensions/index.android.d.ts +9 -0
- package/WebGL/WebGLExtensions/index.android.js +94 -57
- package/WebGL/WebGLExtensions/index.android.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +1 -0
- package/WebGL/WebGLProgram.js +3 -0
- package/WebGL/WebGLProgram.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +3 -1
- package/WebGL/WebGLRenderingContext/common.js +188 -178
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.android.d.ts +8 -13
- package/WebGL/WebGLRenderingContext/index.android.js +1272 -954
- package/WebGL/WebGLRenderingContext/index.android.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +11 -14
- package/WebGL/WebGLRenderingContext/index.ios.js +6 -5
- package/WebGL/WebGLRenderingContext/index.ios.js.map +1 -1
- package/WebGL/WebGLShaderPrecisionFormat.d.ts +5 -4
- package/WebGL/WebGLShaderPrecisionFormat.js +11 -4
- package/WebGL/WebGLShaderPrecisionFormat.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/common.d.ts +1 -1
- package/WebGL2/WebGL2RenderingContext/common.js +199 -199
- package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.android.d.ts +5 -6
- package/WebGL2/WebGL2RenderingContext/index.android.js +276 -318
- package/WebGL2/WebGL2RenderingContext/index.android.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.ios.js +1 -1
- package/WebGL2/WebGL2RenderingContext/index.ios.js.map +1 -1
- package/angular/esm2020/index.mjs +5 -5
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs.map +1 -1
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs.map +1 -1
- package/angular/nativescript-canvas-angular.d.ts +5 -0
- package/angular/package.json +2 -2
- package/helpers.d.ts +5 -0
- package/helpers.js +18 -0
- package/helpers.js.map +1 -0
- package/index.js +6 -0
- package/index.js.map +1 -1
- package/package.json +2 -3
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +5 -6
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +33 -89
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/{arm64-apple-ios.private.swiftinterface → arm64.swiftinterface} +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap +2 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +66 -168
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +1 -1
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/{arm64-apple-ios-simulator.private.swiftinterface → arm64.swiftinterface} +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/{x86_64-apple-ios-simulator.private.swiftinterface → x86_64.swiftinterface} +22 -49
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/module.modulemap +2 -2
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +83 -50
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/utils.d.ts +1 -3
- package/utils.js +20 -7
- package/utils.js.map +1 -1
- package/LICENSE +0 -201
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +0 -1636
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +0 -75693
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +0 -1636
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +0 -75693
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -75693
- package/typings/objc!CanvasNative.d.ts +0 -2036
- package/typings/objc!CanvasNative.js +0 -1
- package/typings/objc!CanvasNative.js.map +0 -1
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
1
10
|
import { WebGLRenderingContextBase } from './common';
|
|
2
11
|
import { WebGLShader } from '../WebGLShader';
|
|
3
12
|
import { WebGLFramebuffer } from '../WebGLFramebuffer';
|
|
@@ -8,638 +17,430 @@ import { WebGLActiveInfo } from '../WebGLActiveInfo';
|
|
|
8
17
|
import { WebGLRenderbuffer } from '../WebGLRenderbuffer';
|
|
9
18
|
import { WebGLShaderPrecisionFormat } from '../WebGLShaderPrecisionFormat';
|
|
10
19
|
import { WebGLBuffer } from '../WebGLBuffer';
|
|
11
|
-
import { ImageSource } from '@nativescript/core';
|
|
20
|
+
import { ImageSource, profile, Screen } from '@nativescript/core';
|
|
12
21
|
import { ANGLE_instanced_arrays, EXT_blend_minmax, EXT_color_buffer_half_float, EXT_disjoint_timer_query, EXT_shader_texture_lod, EXT_sRGB, EXT_texture_filter_anisotropic, OES_element_index_uint, OES_standard_derivatives, OES_texture_float, OES_texture_float_linear, OES_texture_half_float, OES_texture_half_float_linear, OES_vertex_array_object, WEBGL_color_buffer_float, WEBGL_compressed_texture_atc, WEBGL_compressed_texture_etc, WEBGL_compressed_texture_etc1, WEBGL_compressed_texture_pvrtc, WEBGL_compressed_texture_s3tc, WEBGL_depth_texture, WEBGL_draw_buffers, WEBGL_lose_context, } from '../WebGLExtensions';
|
|
13
22
|
import { ImageAsset } from '../../ImageAsset';
|
|
14
23
|
import { Canvas } from '../../Canvas';
|
|
15
24
|
import { ImageBitmap } from '../../ImageBitmap';
|
|
16
|
-
import {
|
|
25
|
+
import { Helpers } from '../../helpers';
|
|
26
|
+
let ctor;
|
|
17
27
|
export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
18
|
-
constructor(context) {
|
|
28
|
+
constructor(context, contextOptions) {
|
|
19
29
|
super(context);
|
|
20
|
-
this.
|
|
21
|
-
|
|
30
|
+
this._flipY = false;
|
|
31
|
+
if (contextOptions) {
|
|
32
|
+
const ctx = BigInt(context.getNativeContext().toString());
|
|
33
|
+
let direction = 0;
|
|
34
|
+
if (androidx.core.text.TextUtilsCompat.getLayoutDirectionFromLocale(java.util.Locale.getDefault()) === androidx.core.view.ViewCompat.LAYOUT_DIRECTION_RTL) {
|
|
35
|
+
direction = 1;
|
|
36
|
+
}
|
|
37
|
+
this._context = ctor(contextOptions, ctx, Screen.mainScreen.scale, -16777216, Screen.mainScreen.scale * 160, direction);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this._context = context;
|
|
41
|
+
}
|
|
22
42
|
}
|
|
23
43
|
get native() {
|
|
24
|
-
return this.
|
|
44
|
+
return this._context;
|
|
25
45
|
}
|
|
26
46
|
get drawingBufferHeight() {
|
|
27
|
-
return this.
|
|
47
|
+
return this.native.drawingBufferHeight;
|
|
28
48
|
}
|
|
29
49
|
get drawingBufferWidth() {
|
|
30
|
-
return this.
|
|
31
|
-
}
|
|
32
|
-
static toPrimitive(value) {
|
|
33
|
-
if (value instanceof java.lang.Integer) {
|
|
34
|
-
return value.intValue();
|
|
35
|
-
}
|
|
36
|
-
else if (value instanceof java.lang.Long) {
|
|
37
|
-
return value.longValue();
|
|
38
|
-
}
|
|
39
|
-
else if (value instanceof java.lang.Short) {
|
|
40
|
-
return value.shortValue();
|
|
41
|
-
}
|
|
42
|
-
else if (value instanceof java.lang.Byte) {
|
|
43
|
-
return value.byteValue();
|
|
44
|
-
}
|
|
45
|
-
else if (value instanceof java.lang.Boolean) {
|
|
46
|
-
return value.booleanValue();
|
|
47
|
-
}
|
|
48
|
-
else if (value instanceof java.lang.String) {
|
|
49
|
-
return value.toString();
|
|
50
|
-
}
|
|
51
|
-
else if (value instanceof java.lang.Float) {
|
|
52
|
-
return value.floatValue();
|
|
53
|
-
}
|
|
54
|
-
else if (value instanceof java.lang.Double) {
|
|
55
|
-
return value.doubleValue();
|
|
56
|
-
}
|
|
57
|
-
return value;
|
|
50
|
+
return this.native.drawingBufferWidth;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
for (let i = 0; i < count; i++) {
|
|
63
|
-
array.push(value[i]);
|
|
64
|
-
}
|
|
65
|
-
return array;
|
|
52
|
+
__toDataURL() {
|
|
53
|
+
const __toDataURL = this._getMethod('__toDataURL');
|
|
54
|
+
return __toDataURL(arguments[0], arguments[1]);
|
|
66
55
|
}
|
|
67
56
|
activeTexture(texture) {
|
|
68
57
|
this._glCheckError('activeTexture');
|
|
69
58
|
this._checkArgs('activeTexture', arguments);
|
|
70
|
-
this.
|
|
59
|
+
const activeTexture = this._getMethod('activeTexture');
|
|
60
|
+
activeTexture(texture);
|
|
71
61
|
}
|
|
72
62
|
attachShader(program, shader) {
|
|
73
63
|
this._glCheckError('attachShader');
|
|
74
64
|
this._checkArgs('attachShader', arguments);
|
|
75
|
-
const value = program
|
|
76
|
-
const value2 = shader
|
|
77
|
-
this.
|
|
65
|
+
const value = program.native;
|
|
66
|
+
const value2 = shader.native;
|
|
67
|
+
const attachShader = this._getMethod('attachShader');
|
|
68
|
+
attachShader(value, value2);
|
|
78
69
|
}
|
|
79
70
|
bindAttribLocation(program, index, name) {
|
|
80
71
|
this._glCheckError('bindAttribLocation');
|
|
81
72
|
this._checkArgs('bindAttribLocation', arguments);
|
|
82
|
-
const
|
|
83
|
-
|
|
73
|
+
const bindAttribLocation = this._getMethod('bindAttribLocation');
|
|
74
|
+
const value = program.native;
|
|
75
|
+
bindAttribLocation(value, index, name);
|
|
84
76
|
}
|
|
85
77
|
bindBuffer(target, buffer) {
|
|
86
78
|
this._glCheckError('bindBuffer');
|
|
87
79
|
this._checkArgs('bindBuffer', arguments);
|
|
88
|
-
|
|
89
|
-
this.
|
|
80
|
+
const value = buffer ? buffer.native : null;
|
|
81
|
+
const bindBuffer = this._getMethod('bindBuffer');
|
|
82
|
+
bindBuffer(target, value);
|
|
90
83
|
}
|
|
91
84
|
bindFramebuffer(target, framebuffer) {
|
|
92
85
|
this._glCheckError('bindFramebuffer');
|
|
93
86
|
this._checkArgs('bindFramebuffer', arguments);
|
|
94
|
-
const value = framebuffer ? framebuffer.native :
|
|
95
|
-
this.
|
|
87
|
+
const value = framebuffer ? framebuffer.native : null;
|
|
88
|
+
const bindFramebuffer = this._getMethod('bindFramebuffer');
|
|
89
|
+
bindFramebuffer(target, value);
|
|
96
90
|
}
|
|
97
91
|
bindRenderbuffer(target, renderbuffer) {
|
|
98
92
|
this._glCheckError('bindRenderbuffer');
|
|
99
93
|
this._checkArgs('bindRenderbuffer', arguments);
|
|
100
|
-
const value = renderbuffer ? renderbuffer.native :
|
|
101
|
-
this.
|
|
94
|
+
const value = renderbuffer ? renderbuffer.native : null;
|
|
95
|
+
const bindRenderbuffer = this._getMethod('bindRenderbuffer');
|
|
96
|
+
bindRenderbuffer(target, value);
|
|
102
97
|
}
|
|
103
98
|
bindTexture(target, texture) {
|
|
104
99
|
this._glCheckError('bindTexture');
|
|
105
100
|
this._checkArgs('bindTexture', arguments);
|
|
106
|
-
const value = texture ? texture.native :
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
target,
|
|
110
|
-
texture: value,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
this.context.bindTexture(target, value);
|
|
101
|
+
const value = texture ? texture.native : null;
|
|
102
|
+
const bindTexture = this._getMethod('bindTexture');
|
|
103
|
+
bindTexture(target, value);
|
|
114
104
|
}
|
|
115
105
|
blendColor(red, green, blue, alpha) {
|
|
116
106
|
this._glCheckError('blendColor');
|
|
117
107
|
this._checkArgs('blendColor', arguments);
|
|
118
|
-
this.
|
|
108
|
+
const blendColor = this._getMethod('blendColor');
|
|
109
|
+
blendColor(red, green, blue, alpha);
|
|
119
110
|
}
|
|
120
111
|
blendEquationSeparate(modeRGB, modeAlpha) {
|
|
121
112
|
this._glCheckError('blendEquationSeparate');
|
|
122
113
|
this._checkArgs('blendEquationSeparate', arguments);
|
|
123
|
-
this.
|
|
114
|
+
const blendEquationSeparate = this._getMethod('blendEquationSeparate');
|
|
115
|
+
blendEquationSeparate(modeRGB, modeAlpha);
|
|
124
116
|
}
|
|
125
117
|
blendEquation(mode) {
|
|
126
118
|
this._glCheckError('blendEquation');
|
|
127
119
|
this._checkArgs('blendEquation', arguments);
|
|
128
|
-
this.
|
|
120
|
+
const blendEquation = this._getMethod('blendEquation');
|
|
121
|
+
blendEquation(mode);
|
|
129
122
|
}
|
|
130
123
|
blendFuncSeparate(srcRGB = this.ONE, dstRGB = this.ZERO, srcAlpha = this.ONE, dstAlpha = this.ZERO) {
|
|
131
124
|
this._glCheckError('blendFuncSeparate');
|
|
132
125
|
this._checkArgs('blendFuncSeparate', arguments);
|
|
133
|
-
this.
|
|
126
|
+
const blendFuncSeparate = this._getMethod('blendFuncSeparate');
|
|
127
|
+
blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
|
|
134
128
|
}
|
|
135
129
|
blendFunc(sfactor = this.ONE, dfactor = this.ZERO) {
|
|
136
130
|
this._glCheckError('blendFunc');
|
|
137
131
|
this._checkArgs('blendFunc', arguments);
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
toNativeArray(value, type) {
|
|
141
|
-
// if (value && value.length && typeof type === 'string') {
|
|
142
|
-
// const size = value.length;
|
|
143
|
-
// const nativeArray = Array.create(type, size);
|
|
144
|
-
// for (let i = 0; i < size; i++) {
|
|
145
|
-
// nativeArray[i] = value[i];
|
|
146
|
-
// }
|
|
147
|
-
// return nativeArray;
|
|
148
|
-
// }
|
|
149
|
-
let length = 0;
|
|
150
|
-
if (value instanceof Int8Array || value instanceof Uint8Array || value instanceof Uint8ClampedArray || value instanceof Int16Array || value instanceof Uint16Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Float32Array || value instanceof Float64Array) {
|
|
151
|
-
length = value.length;
|
|
152
|
-
}
|
|
153
|
-
else if (Array.isArray(value)) {
|
|
154
|
-
length = value.length;
|
|
155
|
-
}
|
|
156
|
-
if (typeof type === 'string') {
|
|
157
|
-
const array = Array.from(value);
|
|
158
|
-
let nativeArray;
|
|
159
|
-
switch (type) {
|
|
160
|
-
case 'byte':
|
|
161
|
-
nativeArray = java.nio.ByteBuffer.wrap(array).array();
|
|
162
|
-
break;
|
|
163
|
-
case 'short':
|
|
164
|
-
nativeArray = java.nio.ShortBuffer.wrap(array).array();
|
|
165
|
-
break;
|
|
166
|
-
case 'float':
|
|
167
|
-
nativeArray = java.nio.FloatBuffer.wrap(array).array();
|
|
168
|
-
break;
|
|
169
|
-
case 'int':
|
|
170
|
-
nativeArray = java.nio.IntBuffer.wrap(array).array();
|
|
171
|
-
break;
|
|
172
|
-
case 'double':
|
|
173
|
-
nativeArray = java.nio.DoubleBuffer.wrap(array).array();
|
|
174
|
-
break;
|
|
175
|
-
case 'long':
|
|
176
|
-
nativeArray = java.nio.LongBuffer.wrap(array).array();
|
|
177
|
-
break;
|
|
178
|
-
default:
|
|
179
|
-
nativeArray = array;
|
|
180
|
-
break;
|
|
181
|
-
}
|
|
182
|
-
return nativeArray;
|
|
183
|
-
}
|
|
184
|
-
return [];
|
|
185
|
-
}
|
|
186
|
-
get _isSupported() {
|
|
187
|
-
return Utils.IS_SUPPORTED_TYPED_ARRAYS_VERSION;
|
|
132
|
+
const blendFunc = this._getMethod('blendFunc');
|
|
133
|
+
blendFunc(sfactor, dfactor);
|
|
188
134
|
}
|
|
189
135
|
bufferData(target, srcData, usage) {
|
|
190
136
|
this._glCheckError('bufferData');
|
|
191
137
|
this._checkArgs('bufferData', arguments);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
else if (srcData instanceof ArrayBuffer) {
|
|
196
|
-
// @ts-ignore
|
|
197
|
-
if (srcData.nativeObject) {
|
|
198
|
-
// @ts-ignore
|
|
199
|
-
this.context.bufferData(target, srcData.nativeObject, usage);
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
if (this._isSupported) {
|
|
203
|
-
this.context.bufferDataByteBuffer(target, srcData, usage);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
this.context.bufferDataByte(target, Array.from(new Uint8Array(srcData)), usage);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
//this.context.bufferData(target, this.toNativeArray(new Uint8Array(srcData as any) as any, 'byte'), usage);
|
|
210
|
-
}
|
|
211
|
-
else if (srcData && srcData.buffer instanceof ArrayBuffer) {
|
|
212
|
-
// @ts-ignore
|
|
213
|
-
if (srcData.buffer.nativeObject) {
|
|
214
|
-
// @ts-ignore
|
|
215
|
-
this.context.bufferData(target, offset, srcData.buffer.nativeObject);
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
if (srcData instanceof Uint8Array || srcData instanceof Uint8ClampedArray) {
|
|
219
|
-
if (this._isSupported) {
|
|
220
|
-
this.context.bufferDataByteBuffer(target, srcData, usage);
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
this.context.bufferDataByte(target, Array.from(srcData), usage);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
else if (srcData instanceof Uint16Array || srcData instanceof Int16Array) {
|
|
227
|
-
if (this._isSupported) {
|
|
228
|
-
this.context.bufferDataShortBuffer(target, srcData, usage);
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
this.context.bufferDataShort(target, Array.from(srcData), usage);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
else if (srcData instanceof Uint32Array || srcData instanceof Int32Array) {
|
|
235
|
-
if (this._isSupported) {
|
|
236
|
-
this.context.bufferDataIntBuffer(target, srcData, usage);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
this.context.bufferDataInt(target, Array.from(srcData), usage);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
else if (srcData instanceof Float32Array) {
|
|
243
|
-
if (this._isSupported) {
|
|
244
|
-
this.context.bufferDataFloatBuffer(target, srcData, usage);
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
this.context.bufferDataFloat(target, Array.from(srcData), usage);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
else if (arguments.length === 3 && !srcData) {
|
|
253
|
-
this.context.bufferData(target, 0, usage);
|
|
254
|
-
}
|
|
138
|
+
const bufferData = this._getMethod('bufferData');
|
|
139
|
+
bufferData(target, srcData, usage);
|
|
255
140
|
}
|
|
256
141
|
bufferSubData(target, offset, srcData) {
|
|
257
142
|
this._glCheckError('bufferSubData');
|
|
258
143
|
this._checkArgs('bufferSubData', arguments);
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
// @ts-ignore
|
|
262
|
-
if (srcData.nativeObject) {
|
|
263
|
-
// @ts-ignore
|
|
264
|
-
this.context.bufferSubData(target, offset, srcData.nativeObject);
|
|
265
|
-
}
|
|
266
|
-
else {
|
|
267
|
-
if (this._isSupported) {
|
|
268
|
-
this.context.bufferSubDataByteBuffer(target, offset, srcData);
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
this.context.bufferSubDataByte(target, offset, Array.from(new Uint8Array(srcData)));
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
else if (srcData && srcData.buffer instanceof ArrayBuffer) {
|
|
276
|
-
// @ts-ignore
|
|
277
|
-
if (srcData.buffer.nativeObject) {
|
|
278
|
-
// @ts-ignore
|
|
279
|
-
this.context.bufferSubData(target, offset, srcData.buffer.nativeObject);
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
if (srcData instanceof Uint8Array || srcData instanceof Uint8ClampedArray) {
|
|
283
|
-
if (this._isSupported) {
|
|
284
|
-
this.context.bufferSubDataByteBuffer(target, offset, srcData);
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
this.context.bufferSubDataByte(target, offset, Array.from(srcData));
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
else if (srcData instanceof Uint16Array || srcData instanceof Int16Array) {
|
|
291
|
-
if (this._isSupported) {
|
|
292
|
-
this.context.bufferSubDataShortBuffer(target, offset, srcData);
|
|
293
|
-
}
|
|
294
|
-
else {
|
|
295
|
-
this.context.bufferSubDataShort(target, offset, Array.from(srcData));
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
else if (srcData instanceof Uint32Array || srcData instanceof Int32Array) {
|
|
299
|
-
if (this._isSupported) {
|
|
300
|
-
this.context.bufferSubDataIntBuffer(target, offset, srcData);
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
this.context.bufferSubDataInt(target, offset, Array.from(srcData));
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
else if (srcData instanceof Float32Array) {
|
|
307
|
-
if (this._isSupported) {
|
|
308
|
-
this.context.bufferSubDataFloatBuffer(target, offset, srcData);
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
this.context.bufferSubDataFloat(target, offset, Array.from(srcData));
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
144
|
+
const bufferSubData = this._getMethod('bufferSubData');
|
|
145
|
+
bufferSubData(target, offset, srcData);
|
|
316
146
|
}
|
|
317
147
|
checkFramebufferStatus(target) {
|
|
318
148
|
this._glCheckError('checkFramebufferStatus');
|
|
319
149
|
this._checkArgs('checkFramebufferStatus', arguments);
|
|
320
|
-
|
|
150
|
+
const checkFramebufferStatus = this._getMethod('checkFramebufferStatus');
|
|
151
|
+
return checkFramebufferStatus(target);
|
|
321
152
|
}
|
|
322
153
|
clearColor(red, green, blue, alpha) {
|
|
323
154
|
this._glCheckError('clearColor');
|
|
324
155
|
this._checkArgs('clearColor', arguments);
|
|
325
|
-
this.
|
|
156
|
+
const clearColor = this._getMethod('clearColor');
|
|
157
|
+
clearColor(red, green, blue, alpha);
|
|
326
158
|
}
|
|
327
159
|
clearDepth(depth) {
|
|
328
160
|
this._glCheckError('clearDepth');
|
|
329
161
|
this._checkArgs('clearDepth', arguments);
|
|
330
|
-
this.
|
|
162
|
+
const clearDepth = this._getMethod('clearDepth');
|
|
163
|
+
clearDepth(depth);
|
|
331
164
|
}
|
|
332
165
|
clearStencil(stencil) {
|
|
333
166
|
this._glCheckError('clearStencil');
|
|
334
167
|
this._checkArgs('clearStencil', arguments);
|
|
335
|
-
this.
|
|
168
|
+
const clearStencil = this._getMethod('clearStencil');
|
|
169
|
+
clearStencil(stencil);
|
|
336
170
|
}
|
|
337
171
|
clear(mask) {
|
|
338
172
|
this._glCheckError('clear');
|
|
339
173
|
this._checkArgs('clear', arguments);
|
|
340
|
-
this.
|
|
174
|
+
const clear = this._getMethod('clear');
|
|
175
|
+
clear(mask);
|
|
341
176
|
}
|
|
342
177
|
colorMask(red, green, blue, alpha) {
|
|
343
178
|
this._glCheckError('colorMask');
|
|
344
179
|
this._checkArgs('colorMask', arguments);
|
|
345
|
-
this.
|
|
180
|
+
const colorMask = this._getMethod('colorMask');
|
|
181
|
+
colorMask(red, green, blue, alpha);
|
|
346
182
|
}
|
|
347
183
|
commit() {
|
|
348
184
|
// NOOP
|
|
349
|
-
this.
|
|
185
|
+
const commit = this._getMethod('commit');
|
|
186
|
+
commit();
|
|
350
187
|
}
|
|
351
188
|
compileShader(shader) {
|
|
352
189
|
this._glCheckError('compileShader');
|
|
353
190
|
this._checkArgs('compileShader', arguments);
|
|
354
|
-
const
|
|
355
|
-
|
|
191
|
+
const compileShader = this._getMethod('compileShader');
|
|
192
|
+
const value = shader.native;
|
|
193
|
+
compileShader(value);
|
|
356
194
|
}
|
|
357
195
|
compressedTexImage2D(target, level, internalformat, width, height, border, pixels) {
|
|
358
196
|
this._glCheckError('compressedTexImage2D');
|
|
359
197
|
this._checkArgs('compressedTexImage2D', arguments);
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
// @ts-ignore
|
|
363
|
-
if (pixels.buffer.nativeObject) {
|
|
364
|
-
// @ts-ignore
|
|
365
|
-
this.context.compressedTexImage2D(target, level, internalformat, width, height, border, pixels.buffer.nativeObject);
|
|
366
|
-
}
|
|
367
|
-
else {
|
|
368
|
-
if (pixels instanceof Uint8Array) {
|
|
369
|
-
// this.context.compressedTexImage2D(target, level, internalformat, width, height, border, this.toNativeArray(pixels as any, 'byte'));
|
|
370
|
-
this.context.compressedTexImage2DByte(target, level, internalformat, width, height, border, Array.from(pixels));
|
|
371
|
-
}
|
|
372
|
-
else if (pixels instanceof Uint16Array || pixels instanceof Int16Array) {
|
|
373
|
-
// this.context.compressedTexImage2D(target, level, internalformat, width, height, border, this.toNativeArray(pixels as any, 'short'));
|
|
374
|
-
this.context.compressedTexImage2DShort(target, level, internalformat, width, height, border, Array.from(pixels));
|
|
375
|
-
}
|
|
376
|
-
else if (pixels instanceof Uint32Array || pixels instanceof Int32Array) {
|
|
377
|
-
// this.context.compressedTexImage2D(target, level, internalformat, width, height, border, this.toNativeArray(pixels as any, 'int'));
|
|
378
|
-
this.context.compressedTexImage2DInt(target, level, internalformat, width, height, border, Array.from(pixels));
|
|
379
|
-
}
|
|
380
|
-
else if (pixels instanceof Float32Array) {
|
|
381
|
-
// this.context.compressedTexImage2D(target, level, internalformat, width, height, border, this.toNativeArray(pixels as any, 'float'));
|
|
382
|
-
this.context.compressedTexImage2DFloat(target, level, internalformat, width, height, border, Array.from(pixels));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
else if (pixels instanceof ArrayBuffer) {
|
|
387
|
-
// this.context.compressedTexImage2D(target, level, internalformat, width, height, border, this.toNativeArray(new Uint8Array(pixels as any) as any, 'byte'));
|
|
388
|
-
// @ts-ignore
|
|
389
|
-
if (pixels.nativeObject) {
|
|
390
|
-
// @ts-ignore
|
|
391
|
-
this.context.compressedTexImage2D(target, level, internalformat, width, height, border, pixels.nativeObject);
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
this.context.compressedTexImage2DByte(target, level, internalformat, width, height, border, Array.from(new Uint8Array(pixels)));
|
|
395
|
-
}
|
|
396
|
-
}
|
|
198
|
+
const compressedTexImage2D = this._getMethod('compressedTexImage2D');
|
|
199
|
+
compressedTexImage2D(target, level, internalformat, width, height, border, pixels);
|
|
397
200
|
}
|
|
398
201
|
compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels) {
|
|
399
202
|
this._glCheckError('compressedTexSubImage2D');
|
|
400
203
|
this._checkArgs('compressedTexSubImage2D', arguments);
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
// this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, this.toNativeArray(pixels as any, 'byte'));
|
|
404
|
-
this.context.compressedTexSubImage2DByte(target, level, xoffset, yoffset, width, height, format, Array.from(pixels));
|
|
405
|
-
}
|
|
406
|
-
else if (pixels instanceof Uint16Array || pixels instanceof Int16Array) {
|
|
407
|
-
// this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, this.toNativeArray(pixels as any, 'short'));
|
|
408
|
-
this.context.compressedTexSubImage2DShort(target, level, xoffset, yoffset, width, height, format, Array.from(pixels));
|
|
409
|
-
}
|
|
410
|
-
else if (pixels instanceof Uint32Array || pixels instanceof Int32Array) {
|
|
411
|
-
// this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, this.toNativeArray(pixels as any, 'int'));
|
|
412
|
-
this.context.compressedTexSubImage2DInt(target, level, xoffset, yoffset, width, height, format, Array.from(pixels));
|
|
413
|
-
}
|
|
414
|
-
else if (pixels instanceof Float32Array) {
|
|
415
|
-
// this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, this.toNativeArray(pixels as any, 'float'));
|
|
416
|
-
this.context.compressedTexSubImage2DFloat(target, level, xoffset, yoffset, width, height, format, Array.from(pixels));
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
else if (pixels instanceof ArrayBuffer) {
|
|
420
|
-
// this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, this.toNativeArray(new Uint8Array(pixels as any) as any, 'byte'));
|
|
421
|
-
// @ts-ignore
|
|
422
|
-
if (pixels.nativeObject) {
|
|
423
|
-
// @ts-ignore
|
|
424
|
-
this.context.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels.nativeObject);
|
|
425
|
-
}
|
|
426
|
-
else {
|
|
427
|
-
this.context.compressedTexSubImage2DByte(target, level, xoffset, yoffset, width, height, format, Array.from(new Uint8Array(pixels)));
|
|
428
|
-
}
|
|
429
|
-
}
|
|
204
|
+
const compressedTexSubImage2D = this._getMethod('compressedTexSubImage2D');
|
|
205
|
+
compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, pixels);
|
|
430
206
|
}
|
|
431
207
|
copyTexImage2D(target, level, internalformat, x, y, width, height, border) {
|
|
432
208
|
this._glCheckError('copyTexImage2D');
|
|
433
209
|
this._checkArgs('copyTexImage2D', arguments);
|
|
434
|
-
this.
|
|
210
|
+
const copyTexImage2D = this._getMethod('copyTexImage2D');
|
|
211
|
+
copyTexImage2D(target, level, internalformat, x, y, width, height, border);
|
|
435
212
|
}
|
|
436
213
|
copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height) {
|
|
437
214
|
this._glCheckError('copyTexSubImage2D');
|
|
438
215
|
this._checkArgs('copyTexSubImage2D', arguments);
|
|
439
|
-
this.
|
|
216
|
+
const copyTexSubImage2D = this._getMethod('copyTexSubImage2D');
|
|
217
|
+
copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
|
|
440
218
|
}
|
|
441
219
|
createBuffer() {
|
|
442
220
|
this._glCheckError('createBuffer');
|
|
443
221
|
this._checkArgs('createBuffer', arguments);
|
|
444
|
-
const
|
|
222
|
+
const createBuffer = this._getMethod('createBuffer');
|
|
223
|
+
const id = createBuffer();
|
|
445
224
|
return new WebGLBuffer(id);
|
|
446
225
|
}
|
|
447
226
|
createFramebuffer() {
|
|
448
227
|
this._glCheckError('createFramebuffer');
|
|
449
228
|
this._checkArgs('createFramebuffer', arguments);
|
|
450
|
-
|
|
229
|
+
const createFramebuffer = this._getMethod('createFramebuffer');
|
|
230
|
+
return new WebGLFramebuffer(createFramebuffer());
|
|
451
231
|
}
|
|
452
232
|
createProgram() {
|
|
453
233
|
this._glCheckError('createProgram');
|
|
454
234
|
this._checkArgs('createProgram', arguments);
|
|
455
|
-
|
|
235
|
+
const createProgram = this._getMethod('createProgram');
|
|
236
|
+
return new WebGLProgram(createProgram());
|
|
456
237
|
}
|
|
457
238
|
createRenderbuffer() {
|
|
458
239
|
this._glCheckError('createRenderbuffer');
|
|
459
240
|
this._checkArgs('createRenderbuffer', arguments);
|
|
460
|
-
|
|
241
|
+
const createRenderbuffer = this._getMethod('createRenderbuffer');
|
|
242
|
+
return new WebGLRenderbuffer(createRenderbuffer());
|
|
461
243
|
}
|
|
462
244
|
createShader(type) {
|
|
463
245
|
this._glCheckError('createShader');
|
|
464
246
|
this._checkArgs('createShader', arguments);
|
|
465
|
-
|
|
247
|
+
const createShader = this._getMethod('createShader');
|
|
248
|
+
return new WebGLShader(createShader(type));
|
|
466
249
|
}
|
|
467
250
|
createTexture() {
|
|
468
251
|
this._glCheckError('createTexture');
|
|
469
252
|
this._checkArgs('createTexture', arguments);
|
|
470
|
-
|
|
253
|
+
const createTexture = this._getMethod('createTexture');
|
|
254
|
+
return new WebGLTexture(createTexture());
|
|
471
255
|
}
|
|
472
256
|
cullFace(mode) {
|
|
473
257
|
this._glCheckError('cullFace');
|
|
474
258
|
this._checkArgs('cullFace', arguments);
|
|
475
|
-
this.
|
|
259
|
+
const cullFace = this._getMethod('cullFace');
|
|
260
|
+
cullFace(mode);
|
|
476
261
|
}
|
|
477
262
|
deleteBuffer(buffer) {
|
|
478
263
|
this._glCheckError('deleteBuffer');
|
|
479
264
|
this._checkArgs('deleteBuffer', arguments);
|
|
480
|
-
const value = buffer
|
|
481
|
-
this.
|
|
265
|
+
const value = buffer.native;
|
|
266
|
+
const deleteBuffer = this._getMethod('deleteBuffer');
|
|
267
|
+
deleteBuffer(value);
|
|
482
268
|
}
|
|
483
269
|
deleteFramebuffer(frameBuffer) {
|
|
484
270
|
this._glCheckError('deleteFramebuffer');
|
|
485
271
|
this._checkArgs('deleteFramebuffer', arguments);
|
|
486
|
-
const value = frameBuffer
|
|
487
|
-
this.
|
|
272
|
+
const value = frameBuffer.native;
|
|
273
|
+
const deleteFramebuffer = this._getMethod('deleteFramebuffer');
|
|
274
|
+
deleteFramebuffer(value);
|
|
488
275
|
}
|
|
489
276
|
deleteProgram(program) {
|
|
490
277
|
this._glCheckError('deleteProgram');
|
|
491
278
|
this._checkArgs('deleteProgram', arguments);
|
|
492
|
-
const value = program
|
|
493
|
-
this.
|
|
279
|
+
const value = program.native;
|
|
280
|
+
const deleteProgram = this._getMethod('deleteProgram');
|
|
281
|
+
deleteProgram(value);
|
|
494
282
|
}
|
|
495
283
|
deleteRenderbuffer(renderBuffer) {
|
|
496
284
|
this._glCheckError('deleteRenderbuffer');
|
|
497
285
|
this._checkArgs('deleteRenderbuffer', arguments);
|
|
498
|
-
const value = renderBuffer
|
|
499
|
-
this.
|
|
286
|
+
const value = renderBuffer.native;
|
|
287
|
+
const deleteRenderbuffer = this._getMethod('deleteRenderbuffer');
|
|
288
|
+
deleteRenderbuffer(value);
|
|
500
289
|
}
|
|
501
290
|
deleteShader(shader) {
|
|
502
291
|
this._glCheckError('deleteShader');
|
|
503
292
|
this._checkArgs('deleteShader', arguments);
|
|
504
|
-
const
|
|
505
|
-
|
|
293
|
+
const deleteShader = this._getMethod('deleteShader');
|
|
294
|
+
deleteShader(shader.native);
|
|
506
295
|
}
|
|
507
296
|
deleteTexture(texture) {
|
|
508
297
|
this._glCheckError('deleteTexture');
|
|
509
298
|
this._checkArgs('deleteTexture', arguments);
|
|
510
|
-
const value = texture
|
|
511
|
-
this.
|
|
299
|
+
const value = texture.native;
|
|
300
|
+
const deleteTexture = this._getMethod('deleteTexture');
|
|
301
|
+
deleteTexture(value);
|
|
512
302
|
}
|
|
513
303
|
depthFunc(func) {
|
|
514
304
|
this._glCheckError('depthFunc');
|
|
515
305
|
this._checkArgs('depthFunc', arguments);
|
|
516
|
-
this.
|
|
306
|
+
const depthFunc = this._getMethod('depthFunc');
|
|
307
|
+
depthFunc(func);
|
|
517
308
|
}
|
|
518
309
|
depthMask(flag) {
|
|
519
310
|
this._glCheckError('depthMask');
|
|
520
311
|
this._checkArgs('depthMask', arguments);
|
|
521
|
-
this.
|
|
312
|
+
const depthMask = this._getMethod('depthMask');
|
|
313
|
+
depthMask(flag);
|
|
522
314
|
}
|
|
523
315
|
depthRange(zNear, zFar) {
|
|
524
316
|
this._glCheckError('depthRange');
|
|
525
317
|
this._checkArgs('depthRange', arguments);
|
|
526
|
-
this.
|
|
318
|
+
const depthRange = this._getMethod('depthRange');
|
|
319
|
+
depthRange(zNear, zFar);
|
|
527
320
|
}
|
|
528
321
|
detachShader(program, shader) {
|
|
529
322
|
this._glCheckError('detachShader');
|
|
530
323
|
this._checkArgs('detachShader', arguments);
|
|
531
|
-
const value = program
|
|
532
|
-
const value2 = shader
|
|
533
|
-
this.
|
|
324
|
+
const value = program.native;
|
|
325
|
+
const value2 = shader.native;
|
|
326
|
+
const detachShader = this._getMethod('detachShader');
|
|
327
|
+
detachShader(value, value2);
|
|
534
328
|
}
|
|
535
329
|
disableVertexAttribArray(index) {
|
|
536
330
|
this._glCheckError('disableVertexAttribArray');
|
|
537
331
|
this._checkArgs('disableVertexAttribArray', arguments);
|
|
538
|
-
this.
|
|
332
|
+
const disableVertexAttribArray = this._getMethod('disableVertexAttribArray');
|
|
333
|
+
disableVertexAttribArray(index);
|
|
539
334
|
}
|
|
540
335
|
disable(cap) {
|
|
541
336
|
this._glCheckError('disable');
|
|
542
337
|
this._checkArgs('disable', arguments);
|
|
543
|
-
this.
|
|
338
|
+
const disable = this._getMethod('disable');
|
|
339
|
+
disable(cap);
|
|
544
340
|
}
|
|
545
341
|
drawArrays(mode, first, count) {
|
|
546
342
|
this._glCheckError('drawArrays');
|
|
547
343
|
this._checkArgs('drawArrays', arguments);
|
|
548
|
-
this.
|
|
344
|
+
const drawArrays = this._getMethod('drawArrays');
|
|
345
|
+
drawArrays(mode, first, count);
|
|
549
346
|
}
|
|
550
347
|
drawElements(mode, count, type, offset) {
|
|
551
348
|
this._glCheckError('drawElements');
|
|
552
349
|
this._checkArgs('drawElements', arguments);
|
|
553
|
-
this.
|
|
350
|
+
const drawElements = this._getMethod('drawElements');
|
|
351
|
+
drawElements(mode, count, type, offset);
|
|
554
352
|
}
|
|
555
353
|
enableVertexAttribArray(index) {
|
|
556
354
|
this._glCheckError('enableVertexAttribArray');
|
|
557
355
|
this._checkArgs('enableVertexAttribArray', arguments);
|
|
558
|
-
this.
|
|
356
|
+
const enableVertexAttribArray = this._getMethod('enableVertexAttribArray');
|
|
357
|
+
enableVertexAttribArray(index);
|
|
559
358
|
}
|
|
560
359
|
enable(cap) {
|
|
561
360
|
this._glCheckError('enable');
|
|
562
361
|
this._checkArgs('enable', arguments);
|
|
563
|
-
this.
|
|
362
|
+
const enable = this._getMethod('enable');
|
|
363
|
+
enable(cap);
|
|
564
364
|
}
|
|
565
365
|
finish() {
|
|
566
366
|
this._glCheckError('finish');
|
|
567
|
-
this.
|
|
367
|
+
const finish = this._getMethod('finish');
|
|
368
|
+
finish();
|
|
568
369
|
}
|
|
569
370
|
flush() {
|
|
570
371
|
this._glCheckError('flush');
|
|
571
|
-
this.
|
|
372
|
+
const flush = this._getMethod('flush');
|
|
373
|
+
flush();
|
|
572
374
|
}
|
|
573
375
|
framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer) {
|
|
574
376
|
this._glCheckError('framebufferRenderbuffer');
|
|
575
377
|
this._checkArgs('framebufferRenderbuffer', arguments);
|
|
576
|
-
const value = renderbuffer
|
|
577
|
-
this.
|
|
378
|
+
const value = renderbuffer.native;
|
|
379
|
+
const framebufferRenderbuffer = this._getMethod('framebufferRenderbuffer');
|
|
380
|
+
framebufferRenderbuffer(target, attachment, renderbuffertarget, value);
|
|
578
381
|
}
|
|
579
382
|
framebufferTexture2D(target, attachment, textarget, texture, level) {
|
|
580
383
|
this._glCheckError('framebufferTexture2D');
|
|
581
|
-
this._checkArgs('
|
|
582
|
-
const value = texture
|
|
583
|
-
this.
|
|
384
|
+
this._checkArgs('framebufferTexture2D', arguments);
|
|
385
|
+
const value = texture.native;
|
|
386
|
+
const framebufferTexture2D = this._getMethod('framebufferTexture2D');
|
|
387
|
+
framebufferTexture2D(target, attachment, textarget, value, level);
|
|
584
388
|
}
|
|
585
389
|
frontFace(mode) {
|
|
586
|
-
this._checkArgs('
|
|
587
|
-
this._glCheckError('
|
|
588
|
-
this.
|
|
390
|
+
this._checkArgs('frontFace', arguments);
|
|
391
|
+
this._glCheckError('frontFace');
|
|
392
|
+
const frontFace = this._getMethod('frontFace');
|
|
393
|
+
frontFace(mode);
|
|
589
394
|
}
|
|
590
395
|
generateMipmap(target) {
|
|
591
|
-
this._checkArgs('
|
|
592
|
-
this._glCheckError('
|
|
593
|
-
this.
|
|
396
|
+
this._checkArgs('generateMipmap', arguments);
|
|
397
|
+
this._glCheckError('generateMipmap');
|
|
398
|
+
const generateMipmap = this._getMethod('generateMipmap');
|
|
399
|
+
generateMipmap(target);
|
|
594
400
|
}
|
|
595
401
|
getActiveAttrib(program, index) {
|
|
596
402
|
this._glCheckError('getActiveAttrib');
|
|
597
403
|
this._checkArgs('getActiveAttrib', arguments);
|
|
598
|
-
const value = program
|
|
599
|
-
const
|
|
404
|
+
const value = program.native;
|
|
405
|
+
const getActiveAttrib = this._getMethod('getActiveAttrib');
|
|
406
|
+
const attrib = getActiveAttrib(value, index);
|
|
600
407
|
return new WebGLActiveInfo(attrib);
|
|
601
408
|
}
|
|
602
409
|
getActiveUniform(program, index) {
|
|
603
410
|
this._glCheckError('getActiveUniform');
|
|
604
411
|
this._checkArgs('getActiveUniform', arguments);
|
|
605
|
-
const value = program
|
|
606
|
-
const
|
|
412
|
+
const value = program.native;
|
|
413
|
+
const getActiveUniform = this._getMethod('getActiveUniform');
|
|
414
|
+
const uniform = getActiveUniform(value, index);
|
|
607
415
|
return new WebGLActiveInfo(uniform);
|
|
608
|
-
;
|
|
609
416
|
}
|
|
610
417
|
getAttachedShaders(program) {
|
|
611
418
|
this._glCheckError('getAttachedShaders');
|
|
612
419
|
this._checkArgs('getAttachedShaders', arguments);
|
|
613
|
-
const
|
|
614
|
-
|
|
420
|
+
const getAttachedShaders = this._getMethod('getAttachedShaders');
|
|
421
|
+
const value = program.native;
|
|
422
|
+
return getAttachedShaders(value).map((shader) => new WebGLShader(shader));
|
|
615
423
|
}
|
|
616
424
|
getAttribLocation(program, name) {
|
|
617
425
|
this._glCheckError('getAttribLocation');
|
|
618
426
|
this._checkArgs('getAttribLocation', arguments);
|
|
619
|
-
const
|
|
620
|
-
|
|
427
|
+
const getAttribLocation = this._getMethod('getAttribLocation');
|
|
428
|
+
const value = program.native;
|
|
429
|
+
return getAttribLocation(value, name);
|
|
621
430
|
}
|
|
622
431
|
getBufferParameter(target, pname) {
|
|
623
432
|
this._glCheckError('getBufferParameter');
|
|
624
433
|
this._checkArgs('getBufferParameter', arguments);
|
|
625
|
-
|
|
434
|
+
const getBufferParameter = this._getMethod('getBufferParameter');
|
|
435
|
+
return getBufferParameter(target, pname);
|
|
626
436
|
}
|
|
627
437
|
getContextAttributes() {
|
|
628
|
-
const
|
|
629
|
-
|
|
630
|
-
return null;
|
|
631
|
-
}
|
|
632
|
-
const keys = attributes.keySet().toArray();
|
|
633
|
-
const length = keys.length;
|
|
634
|
-
const contextAttributes = {};
|
|
635
|
-
for (let i = 0; i < length; i++) {
|
|
636
|
-
const key = keys[i];
|
|
637
|
-
contextAttributes[key] = attributes.get(key);
|
|
638
|
-
}
|
|
639
|
-
return contextAttributes;
|
|
438
|
+
const getContextAttributes = this._getMethod('getContextAttributes');
|
|
439
|
+
return getContextAttributes();
|
|
640
440
|
}
|
|
641
441
|
getError() {
|
|
642
|
-
|
|
442
|
+
const getError = this._getMethod('getError');
|
|
443
|
+
return getError();
|
|
643
444
|
}
|
|
644
445
|
getExtension(name) {
|
|
645
446
|
this._glCheckError('getExtension');
|
|
@@ -647,56 +448,56 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
647
448
|
if (name === 'EXT_disjoint_timer_query_webgl2') {
|
|
648
449
|
return null;
|
|
649
450
|
}
|
|
650
|
-
const
|
|
451
|
+
const getExtension = this._getMethod('getExtension');
|
|
452
|
+
const ext = getExtension(name);
|
|
651
453
|
if (ext) {
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
case 'org.nativescript.canvas.extensions.ANGLE_instanced_arrays':
|
|
454
|
+
const ext_name = ext.ext_name;
|
|
455
|
+
switch (ext_name) {
|
|
456
|
+
case 'ANGLE_instanced_arrays':
|
|
656
457
|
return new ANGLE_instanced_arrays(ext);
|
|
657
|
-
case '
|
|
458
|
+
case 'EXT_blend_minmax':
|
|
658
459
|
return new EXT_blend_minmax(ext);
|
|
659
|
-
case '
|
|
460
|
+
case 'EXT_color_buffer_half_float':
|
|
660
461
|
return new EXT_color_buffer_half_float(ext);
|
|
661
|
-
case '
|
|
462
|
+
case 'EXT_disjoint_timer_query':
|
|
662
463
|
return new EXT_disjoint_timer_query(ext);
|
|
663
|
-
case '
|
|
464
|
+
case 'EXT_sRGB':
|
|
664
465
|
return new EXT_sRGB(ext);
|
|
665
|
-
case '
|
|
466
|
+
case 'EXT_shader_texture_lod':
|
|
666
467
|
return new EXT_shader_texture_lod(ext);
|
|
667
|
-
case '
|
|
468
|
+
case 'EXT_texture_filter_anisotropic':
|
|
668
469
|
return new EXT_texture_filter_anisotropic(ext);
|
|
669
|
-
case '
|
|
470
|
+
case 'OES_element_index_uint':
|
|
670
471
|
return new OES_element_index_uint(ext);
|
|
671
|
-
case '
|
|
472
|
+
case 'OES_standard_derivatives':
|
|
672
473
|
return new OES_standard_derivatives(ext);
|
|
673
|
-
case '
|
|
474
|
+
case 'OES_texture_float':
|
|
674
475
|
return new OES_texture_float(ext);
|
|
675
|
-
case '
|
|
476
|
+
case 'OES_texture_float_linear':
|
|
676
477
|
return new OES_texture_float_linear(ext);
|
|
677
|
-
case '
|
|
478
|
+
case 'OES_texture_half_float':
|
|
678
479
|
return new OES_texture_half_float(ext);
|
|
679
|
-
case '
|
|
480
|
+
case 'OES_texture_half_float_linear':
|
|
680
481
|
return new OES_texture_half_float_linear(ext);
|
|
681
|
-
case '
|
|
482
|
+
case 'OES_vertex_array_object':
|
|
682
483
|
return new OES_vertex_array_object(ext);
|
|
683
|
-
case '
|
|
484
|
+
case 'WEBGL_color_buffer_float':
|
|
684
485
|
return new WEBGL_color_buffer_float(ext);
|
|
685
|
-
case '
|
|
486
|
+
case 'WEBGL_compressed_texture_atc':
|
|
686
487
|
return new WEBGL_compressed_texture_atc(ext);
|
|
687
|
-
case '
|
|
488
|
+
case 'WEBGL_compressed_texture_etc':
|
|
688
489
|
return new WEBGL_compressed_texture_etc(ext);
|
|
689
|
-
case '
|
|
490
|
+
case 'WEBGL_compressed_texture_etc1':
|
|
690
491
|
return new WEBGL_compressed_texture_etc1(ext);
|
|
691
|
-
case '
|
|
492
|
+
case 'WEBGL_compressed_texture_pvrtc':
|
|
692
493
|
return new WEBGL_compressed_texture_pvrtc(ext);
|
|
693
|
-
case '
|
|
494
|
+
case 'WEBGL_compressed_texture_s3tc':
|
|
694
495
|
return new WEBGL_compressed_texture_s3tc(ext);
|
|
695
|
-
case '
|
|
496
|
+
case 'WEBGL_lose_context':
|
|
696
497
|
return new WEBGL_lose_context(ext);
|
|
697
|
-
case '
|
|
498
|
+
case 'WEBGL_depth_texture':
|
|
698
499
|
return new WEBGL_depth_texture(ext);
|
|
699
|
-
case '
|
|
500
|
+
case 'WEBGL_draw_buffers':
|
|
700
501
|
return new WEBGL_draw_buffers(ext);
|
|
701
502
|
}
|
|
702
503
|
}
|
|
@@ -705,19 +506,19 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
705
506
|
getFramebufferAttachmentParameter(target, attachment, pname) {
|
|
706
507
|
this._glCheckError('getFramebufferAttachmentParameter');
|
|
707
508
|
this._checkArgs('getFramebufferAttachmentParameter', arguments);
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
509
|
+
const getFramebufferAttachmentParameter = this._getMethod('getFramebufferAttachmentParameter');
|
|
510
|
+
const param = getFramebufferAttachmentParameter(target, attachment, pname);
|
|
511
|
+
if (typeof param === 'object') {
|
|
512
|
+
if (param.isRenderbuffer) {
|
|
513
|
+
return new WebGLRenderbuffer(param);
|
|
514
|
+
}
|
|
515
|
+
else if (param.isTexture()) {
|
|
516
|
+
return new WebGLTexture(param);
|
|
517
|
+
}
|
|
714
518
|
}
|
|
715
|
-
return
|
|
519
|
+
return param;
|
|
716
520
|
}
|
|
717
|
-
|
|
718
|
-
this._glCheckError('getParameter');
|
|
719
|
-
this._checkArgs('activeTexture', arguments);
|
|
720
|
-
const value = this.context.getParameter(pname);
|
|
521
|
+
_handleGetParameter(pname, value) {
|
|
721
522
|
switch (pname) {
|
|
722
523
|
case this.COLOR_WRITEMASK:
|
|
723
524
|
case this.COLOR_CLEAR_VALUE:
|
|
@@ -725,38 +526,38 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
725
526
|
case this.ALIASED_LINE_WIDTH_RANGE:
|
|
726
527
|
case this.ALIASED_POINT_SIZE_RANGE:
|
|
727
528
|
case this.DEPTH_RANGE:
|
|
728
|
-
return
|
|
529
|
+
return value;
|
|
729
530
|
case this.ARRAY_BUFFER_BINDING:
|
|
730
531
|
case this.ELEMENT_ARRAY_BUFFER_BINDING:
|
|
731
532
|
if (value) {
|
|
732
|
-
new WebGLBuffer(
|
|
533
|
+
new WebGLBuffer(value);
|
|
733
534
|
}
|
|
734
535
|
return null;
|
|
735
536
|
case this.CURRENT_PROGRAM:
|
|
736
537
|
if (value) {
|
|
737
|
-
return new WebGLProgram(
|
|
538
|
+
return new WebGLProgram(value);
|
|
738
539
|
}
|
|
739
540
|
return null;
|
|
740
541
|
case this.COMPRESSED_TEXTURE_FORMATS:
|
|
741
|
-
return
|
|
542
|
+
return value;
|
|
742
543
|
case this.RENDERBUFFER_BINDING:
|
|
743
544
|
if (value) {
|
|
744
|
-
return new WebGLRenderbuffer(
|
|
545
|
+
return new WebGLRenderbuffer(value);
|
|
745
546
|
}
|
|
746
547
|
return null;
|
|
747
548
|
case this.FRAMEBUFFER_BINDING:
|
|
748
549
|
if (value) {
|
|
749
|
-
return new WebGLFramebuffer(
|
|
550
|
+
return new WebGLFramebuffer(value);
|
|
750
551
|
}
|
|
751
552
|
return null;
|
|
752
553
|
case this.VIEWPORT:
|
|
753
554
|
case this.SCISSOR_BOX:
|
|
754
555
|
case this.MAX_VIEWPORT_DIMS:
|
|
755
|
-
return
|
|
556
|
+
return value;
|
|
756
557
|
case this.TEXTURE_BINDING_CUBE_MAP:
|
|
757
558
|
case this.TEXTURE_BINDING_2D:
|
|
758
559
|
if (value) {
|
|
759
|
-
return new WebGLTexture(
|
|
560
|
+
return new WebGLTexture(value);
|
|
760
561
|
}
|
|
761
562
|
return null;
|
|
762
563
|
case this.VERSION:
|
|
@@ -767,66 +568,83 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
767
568
|
return 'WebGL 1.0 (OpenGL ES 2.0 NativeScript)';
|
|
768
569
|
}
|
|
769
570
|
default:
|
|
770
|
-
return
|
|
571
|
+
return value;
|
|
771
572
|
}
|
|
772
573
|
}
|
|
574
|
+
getParameter(pname) {
|
|
575
|
+
this._glCheckError('getParameter');
|
|
576
|
+
this._checkArgs('getParameter', arguments);
|
|
577
|
+
const getParameter = this._getMethod('getParameter');
|
|
578
|
+
const value = getParameter(pname);
|
|
579
|
+
return this._handleGetParameter(pname, value);
|
|
580
|
+
}
|
|
773
581
|
getProgramInfoLog(program) {
|
|
774
582
|
this._glCheckError('getProgramInfoLog');
|
|
775
583
|
this._checkArgs('getProgramInfoLog', arguments);
|
|
776
|
-
const
|
|
777
|
-
|
|
584
|
+
const getProgramInfoLog = this._getMethod('getProgramInfoLog');
|
|
585
|
+
const value = program.native;
|
|
586
|
+
return getProgramInfoLog(value);
|
|
778
587
|
}
|
|
779
588
|
getProgramParameter(program, pname) {
|
|
780
589
|
this._glCheckError('getProgramParameter');
|
|
781
590
|
this._checkArgs('getProgramParameter', arguments);
|
|
782
|
-
const
|
|
783
|
-
const
|
|
784
|
-
|
|
591
|
+
const getProgramParameter = this._getMethod('getProgramParameter');
|
|
592
|
+
const value = program.native;
|
|
593
|
+
const result = getProgramParameter(value, pname);
|
|
594
|
+
return result;
|
|
785
595
|
}
|
|
786
596
|
getRenderbufferParameter(target, pname) {
|
|
787
597
|
this._glCheckError('getRenderbufferParameter');
|
|
788
598
|
this._checkArgs('getRenderbufferParameter', arguments);
|
|
789
|
-
|
|
599
|
+
const getRenderbufferParameter = this._getMethod('getRenderbufferParameter');
|
|
600
|
+
return getRenderbufferParameter(target, pname);
|
|
790
601
|
}
|
|
791
602
|
getShaderInfoLog(shader) {
|
|
792
603
|
this._glCheckError('getShaderInfoLog');
|
|
793
604
|
this._checkArgs('getShaderInfoLog', arguments);
|
|
794
|
-
const
|
|
795
|
-
|
|
605
|
+
const getShaderInfoLog = this._getMethod('getShaderInfoLog');
|
|
606
|
+
const value = shader.native;
|
|
607
|
+
return getShaderInfoLog(value);
|
|
796
608
|
}
|
|
797
609
|
getShaderParameter(shader, pname) {
|
|
798
610
|
this._glCheckError('getShaderParameter');
|
|
799
611
|
this._checkArgs('getShaderParameter', arguments);
|
|
800
|
-
const
|
|
801
|
-
const
|
|
802
|
-
|
|
612
|
+
const getShaderParameter = this._getMethod('getShaderParameter');
|
|
613
|
+
const value = shader.native;
|
|
614
|
+
const result = getShaderParameter(value, pname);
|
|
615
|
+
return result;
|
|
803
616
|
}
|
|
804
617
|
getShaderPrecisionFormat(shaderType, precisionType) {
|
|
805
618
|
this._glCheckError('getShaderPrecisionFormat');
|
|
806
619
|
this._checkArgs('getShaderPrecisionFormat', arguments);
|
|
807
|
-
const
|
|
808
|
-
|
|
620
|
+
const getShaderPrecisionFormat = this._getMethod('getShaderPrecisionFormat');
|
|
621
|
+
const precision = getShaderPrecisionFormat(shaderType, precisionType);
|
|
622
|
+
return new WebGLShaderPrecisionFormat(precision);
|
|
809
623
|
}
|
|
810
624
|
getShaderSource(shader) {
|
|
811
625
|
this._glCheckError('getShaderSource');
|
|
812
626
|
this._checkArgs('getShaderSource', arguments);
|
|
627
|
+
const getShaderSource = this._getMethod('getShaderSource');
|
|
813
628
|
const value = shader ? shader.native : 0;
|
|
814
|
-
return
|
|
629
|
+
return getShaderSource(value);
|
|
815
630
|
}
|
|
816
631
|
getSupportedExtensions() {
|
|
817
632
|
this._glCheckError('getSupportedExtensions');
|
|
818
|
-
|
|
633
|
+
const getSupportedExtensions = this._getMethod('getSupportedExtensions');
|
|
634
|
+
return getSupportedExtensions();
|
|
819
635
|
}
|
|
820
636
|
getTexParameter(target, pname) {
|
|
821
637
|
this._glCheckError('getTexParameter');
|
|
822
638
|
this._checkArgs('getTexParameter', arguments);
|
|
823
|
-
|
|
639
|
+
const getTexParameter = this._getMethod('getTexParameter');
|
|
640
|
+
return getTexParameter(target, pname);
|
|
824
641
|
}
|
|
825
642
|
getUniformLocation(program, name) {
|
|
826
643
|
this._glCheckError('getUniformLocation');
|
|
827
644
|
this._checkArgs('getUniformLocation', arguments);
|
|
828
|
-
const
|
|
829
|
-
const
|
|
645
|
+
const getUniformLocation = this._getMethod('getUniformLocation');
|
|
646
|
+
const value = program.native;
|
|
647
|
+
const id = getUniformLocation(value, name);
|
|
830
648
|
if (id === -1) {
|
|
831
649
|
return null;
|
|
832
650
|
}
|
|
@@ -835,94 +653,112 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
835
653
|
getUniform(program, location) {
|
|
836
654
|
this._glCheckError('getUniform');
|
|
837
655
|
this._checkArgs('getUniform', arguments);
|
|
838
|
-
const
|
|
839
|
-
const
|
|
840
|
-
const
|
|
656
|
+
const getUniform = this._getMethod('getUniform');
|
|
657
|
+
const value = program.native;
|
|
658
|
+
const value2 = location.native;
|
|
659
|
+
const uniform = getUniform(value, value2);
|
|
841
660
|
if (uniform && uniform.length) {
|
|
842
|
-
return
|
|
661
|
+
return uniform;
|
|
843
662
|
}
|
|
844
|
-
return
|
|
663
|
+
return uniform;
|
|
845
664
|
}
|
|
846
665
|
getVertexAttribOffset(index, pname) {
|
|
847
666
|
this._glCheckError('getVertexAttribOffset');
|
|
848
667
|
this._checkArgs('getVertexAttribOffset', arguments);
|
|
849
|
-
|
|
668
|
+
const getVertexAttribOffset = this._getMethod('getVertexAttribOffset');
|
|
669
|
+
return getVertexAttribOffset(index, pname);
|
|
850
670
|
}
|
|
851
671
|
getVertexAttrib(index, pname) {
|
|
852
672
|
this._glCheckError('getVertexAttrib');
|
|
853
673
|
this._checkArgs('getVertexAttrib', arguments);
|
|
854
|
-
const
|
|
674
|
+
const getVertexAttrib = this._getMethod('getVertexAttrib');
|
|
675
|
+
const value = getVertexAttrib(index, pname);
|
|
855
676
|
if (pname === this.CURRENT_VERTEX_ATTRIB) {
|
|
856
|
-
return
|
|
677
|
+
return value;
|
|
857
678
|
}
|
|
858
|
-
return
|
|
679
|
+
return value;
|
|
859
680
|
}
|
|
860
681
|
hint(target, mode) {
|
|
861
682
|
this._glCheckError('hint');
|
|
862
683
|
this._checkArgs('hint', arguments);
|
|
863
|
-
this.
|
|
684
|
+
const hint = this._getMethod('hint');
|
|
685
|
+
hint(target, mode);
|
|
864
686
|
}
|
|
865
687
|
isBuffer(buffer) {
|
|
866
688
|
this._glCheckError('isBuffer');
|
|
867
689
|
this._checkArgs('isBuffer', arguments);
|
|
868
|
-
const
|
|
869
|
-
|
|
690
|
+
const isBuffer = this._getMethod('isBuffer');
|
|
691
|
+
const value = buffer.native;
|
|
692
|
+
return isBuffer(value);
|
|
870
693
|
}
|
|
871
694
|
isContextLost() {
|
|
872
695
|
this._glCheckError('isContextLost');
|
|
873
|
-
|
|
696
|
+
const isContextLost = this._getMethod('isContextLost');
|
|
697
|
+
return isContextLost();
|
|
874
698
|
}
|
|
875
699
|
isEnabled(cap) {
|
|
876
700
|
this._glCheckError('isEnabled');
|
|
877
701
|
this._checkArgs('isEnabled', arguments);
|
|
878
|
-
|
|
702
|
+
const isEnabled = this._getMethod('isEnabled');
|
|
703
|
+
return isEnabled(cap);
|
|
879
704
|
}
|
|
880
705
|
isFramebuffer(framebuffer) {
|
|
881
706
|
this._glCheckError('isFramebuffer');
|
|
882
707
|
this._checkArgs('isFramebuffer', arguments);
|
|
708
|
+
const isFramebuffer = this._getMethod('isFramebuffer');
|
|
883
709
|
const value = framebuffer ? framebuffer.native : 0;
|
|
884
|
-
return
|
|
710
|
+
return isFramebuffer(value);
|
|
885
711
|
}
|
|
886
712
|
isProgram(program) {
|
|
887
713
|
this._glCheckError('isProgram');
|
|
888
714
|
this._checkArgs('isProgram', arguments);
|
|
889
|
-
const
|
|
890
|
-
|
|
715
|
+
const isProgram = this._getMethod('isProgram');
|
|
716
|
+
const value = program.native;
|
|
717
|
+
return isProgram(value);
|
|
891
718
|
}
|
|
892
719
|
isRenderbuffer(renderbuffer) {
|
|
893
720
|
this._glCheckError('isRenderbuffer');
|
|
894
721
|
this._checkArgs('isRenderbuffer', arguments);
|
|
895
|
-
const
|
|
896
|
-
|
|
722
|
+
const isRenderbuffer = this._getMethod('isRenderbuffer');
|
|
723
|
+
const value = renderbuffer.native;
|
|
724
|
+
return isRenderbuffer(value);
|
|
897
725
|
}
|
|
898
726
|
isShader(shader) {
|
|
899
727
|
this._glCheckError('isShader');
|
|
900
728
|
this._checkArgs('isShader', arguments);
|
|
901
|
-
const
|
|
902
|
-
|
|
729
|
+
const isShader = this._getMethod('isShader');
|
|
730
|
+
const value = shader.native;
|
|
731
|
+
return isShader(value);
|
|
903
732
|
}
|
|
904
733
|
isTexture(texture) {
|
|
905
734
|
this._glCheckError('isTexture');
|
|
906
735
|
this._checkArgs('isTexture', arguments);
|
|
907
|
-
const
|
|
908
|
-
|
|
736
|
+
const isTexture = this._getMethod('isTexture');
|
|
737
|
+
const value = texture.native;
|
|
738
|
+
return isTexture(value);
|
|
909
739
|
}
|
|
910
740
|
lineWidth(width) {
|
|
911
741
|
this._glCheckError('lineWidth');
|
|
912
742
|
this._checkArgs('lineWidth', arguments);
|
|
913
|
-
this.
|
|
743
|
+
const lineWidth = this._getMethod('lineWidth');
|
|
744
|
+
lineWidth(width);
|
|
914
745
|
}
|
|
915
746
|
linkProgram(program) {
|
|
916
747
|
this._glCheckError('linkProgram');
|
|
917
748
|
this._checkArgs('linkProgram', arguments);
|
|
749
|
+
const linkProgram = this._getMethod('linkProgram');
|
|
918
750
|
const value = program ? program.native : 0;
|
|
919
|
-
|
|
751
|
+
linkProgram(value);
|
|
920
752
|
}
|
|
921
753
|
pixelStorei(pname, param) {
|
|
922
754
|
this._glCheckError('pixelStorei');
|
|
923
755
|
this._checkArgs('pixelStorei', arguments);
|
|
756
|
+
const pixelStorei = this._getMethod('pixelStorei');
|
|
924
757
|
if (pname === this.UNPACK_FLIP_Y_WEBGL || pname === this.UNPACK_PREMULTIPLY_ALPHA_WEBGL) {
|
|
925
|
-
|
|
758
|
+
if (pname === this.UNPACK_FLIP_Y_WEBGL) {
|
|
759
|
+
this._flipY = param;
|
|
760
|
+
}
|
|
761
|
+
pixelStorei(pname, param);
|
|
926
762
|
}
|
|
927
763
|
else if (pname === this.PACK_ALIGNMENT || pname === this.UNPACK_ALIGNMENT || pname === this.UNPACK_COLORSPACE_CONVERSION_WEBGL) {
|
|
928
764
|
if (pname === this.UNPACK_COLORSPACE_CONVERSION_WEBGL) {
|
|
@@ -931,333 +767,183 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
931
767
|
else if (pname === this.PACK_ALIGNMENT || pname === this.UNPACK_ALIGNMENT) {
|
|
932
768
|
param = 4;
|
|
933
769
|
}
|
|
934
|
-
|
|
770
|
+
pixelStorei(pname, param);
|
|
935
771
|
}
|
|
936
772
|
else {
|
|
937
|
-
|
|
773
|
+
pixelStorei(pname, param);
|
|
938
774
|
}
|
|
939
775
|
}
|
|
940
776
|
polygonOffset(factor, units) {
|
|
941
777
|
this._glCheckError('polygonOffset');
|
|
942
778
|
this._checkArgs('polygonOffset', arguments);
|
|
943
|
-
this.
|
|
779
|
+
const polygonOffset = this._getMethod('polygonOffset');
|
|
780
|
+
polygonOffset(factor, units);
|
|
944
781
|
}
|
|
945
782
|
readPixels(x, y, width, height, format, type, pixels) {
|
|
946
783
|
this._glCheckError('readPixels');
|
|
947
784
|
this._checkArgs('readPixels', arguments);
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
// @ts-ignore
|
|
951
|
-
if (pixels.buffer.nativeObject) {
|
|
952
|
-
// @ts-ignore
|
|
953
|
-
this.context.readPixels(x, y, width, height, format, type, pixels.buffer.nativeObject);
|
|
954
|
-
}
|
|
955
|
-
else {
|
|
956
|
-
if (pixels instanceof Uint8Array) {
|
|
957
|
-
if (this._isSupported) {
|
|
958
|
-
this.context.readPixelsByteBuffer(x, y, width, height, format, type, pixels);
|
|
959
|
-
}
|
|
960
|
-
else {
|
|
961
|
-
this.context.readPixelsByte(x, y, width, height, format, type, Array.from(pixels));
|
|
962
|
-
}
|
|
963
|
-
}
|
|
964
|
-
else if (pixels instanceof Uint16Array || pixels instanceof Int16Array) {
|
|
965
|
-
if (this._isSupported) {
|
|
966
|
-
this.context.readPixelsShortBuffer(x, y, width, height, format, type, pixels);
|
|
967
|
-
}
|
|
968
|
-
else {
|
|
969
|
-
this.context.readPixelsShort(x, y, width, height, format, type, Array.from(pixels));
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
else if (pixels instanceof Uint32Array || pixels instanceof Int32Array) {
|
|
973
|
-
if (this._isSupported) {
|
|
974
|
-
this.context.readPixelsIntBuffer(x, y, width, height, format, type, pixels);
|
|
975
|
-
}
|
|
976
|
-
else {
|
|
977
|
-
this.context.readPixelsInt(x, y, width, height, format, type, Array.from(pixels));
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
else if (pixels instanceof Float32Array) {
|
|
981
|
-
if (this._isSupported) {
|
|
982
|
-
this.context.readPixelsFloatBuffer(x, y, width, height, format, type, pixels);
|
|
983
|
-
}
|
|
984
|
-
else {
|
|
985
|
-
this.context.readPixelsFloat(x, y, width, height, format, type, Array.from(pixels));
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
else if (pixels instanceof ArrayBuffer) {
|
|
991
|
-
// @ts-ignore
|
|
992
|
-
if (pixels.nativeObject) {
|
|
993
|
-
// @ts-ignore
|
|
994
|
-
this.context.readPixels(x, y, width, height, format, type, pixels.nativeObject);
|
|
995
|
-
}
|
|
996
|
-
else {
|
|
997
|
-
if (this._isSupported) {
|
|
998
|
-
this.context.readPixelsByteBuffer(x, y, width, height, format, type, pixels);
|
|
999
|
-
}
|
|
1000
|
-
else {
|
|
1001
|
-
this.context.readPixelsByte(x, y, width, height, format, type, Array.from(new Uint8Array(pixels)));
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
785
|
+
const readPixels = this._getMethod('readPixels');
|
|
786
|
+
readPixels(x, y, width, height, format, type, pixels);
|
|
1005
787
|
}
|
|
1006
788
|
renderbufferStorage(target, internalFormat, width, height) {
|
|
1007
789
|
this._glCheckError('renderbufferStorage');
|
|
1008
790
|
this._checkArgs('renderbufferStorage', arguments);
|
|
791
|
+
const renderbufferStorage = this._getMethod('renderbufferStorage');
|
|
1009
792
|
if (internalFormat === this.DEPTH_STENCIL) {
|
|
1010
793
|
// DEPTH24_STENCIL8 = 35056
|
|
1011
794
|
// DEPTH24_STENCIL8_OES = 0x88F0
|
|
1012
795
|
internalFormat = 0x88f0;
|
|
1013
796
|
}
|
|
1014
|
-
|
|
797
|
+
renderbufferStorage(target, internalFormat, width, height);
|
|
1015
798
|
}
|
|
1016
799
|
sampleCoverage(value, invert) {
|
|
1017
800
|
this._glCheckError('sampleCoverage');
|
|
1018
801
|
this._checkArgs('sampleCoverage', arguments);
|
|
1019
|
-
this.
|
|
802
|
+
const sampleCoverage = this._getMethod('sampleCoverage');
|
|
803
|
+
sampleCoverage(value, invert);
|
|
1020
804
|
}
|
|
1021
805
|
scissor(x, y, width, height) {
|
|
1022
806
|
this._glCheckError('scissor');
|
|
1023
807
|
this._checkArgs('scissor', arguments);
|
|
1024
|
-
this.
|
|
808
|
+
const scissor = this._getMethod('scissor');
|
|
809
|
+
scissor(x, y, width, height);
|
|
1025
810
|
}
|
|
1026
811
|
shaderSource(shader, source) {
|
|
1027
812
|
this._glCheckError('shaderSource');
|
|
1028
813
|
this._checkArgs('shaderSource', arguments);
|
|
814
|
+
const shaderSource = this._getMethod('shaderSource');
|
|
1029
815
|
const value = shader ? shader.native : 0;
|
|
1030
|
-
|
|
816
|
+
shaderSource(value, source);
|
|
1031
817
|
}
|
|
1032
818
|
stencilFuncSeparate(face, func, ref, mask) {
|
|
1033
819
|
this._glCheckError('stencilFuncSeparate');
|
|
1034
820
|
this._checkArgs('stencilFuncSeparate', arguments);
|
|
1035
|
-
this.
|
|
821
|
+
const stencilFuncSeparate = this._getMethod('stencilFuncSeparate');
|
|
822
|
+
stencilFuncSeparate(face, func, ref, mask);
|
|
1036
823
|
}
|
|
1037
824
|
stencilFunc(func, ref, mask) {
|
|
1038
825
|
this._glCheckError('stencilFunc');
|
|
1039
826
|
this._checkArgs('stencilFunc', arguments);
|
|
1040
|
-
this.
|
|
827
|
+
const stencilFunc = this._getMethod('stencilFunc');
|
|
828
|
+
stencilFunc(func, ref, mask);
|
|
1041
829
|
}
|
|
1042
830
|
stencilMaskSeparate(face, mask) {
|
|
1043
831
|
this._glCheckError('stencilMaskSeparate');
|
|
1044
832
|
this._checkArgs('stencilMaskSeparate', arguments);
|
|
1045
|
-
this.
|
|
833
|
+
const stencilMaskSeparate = this._getMethod('stencilMaskSeparate');
|
|
834
|
+
stencilMaskSeparate(face, mask);
|
|
1046
835
|
}
|
|
1047
836
|
stencilMask(mask) {
|
|
1048
837
|
this._glCheckError('stencilMask');
|
|
1049
838
|
this._checkArgs('stencilMask', arguments);
|
|
1050
|
-
this.
|
|
839
|
+
const stencilMask = this._getMethod('stencilMask');
|
|
840
|
+
stencilMask(mask);
|
|
1051
841
|
}
|
|
1052
842
|
stencilOpSeparate(face, fail, zfail, zpass) {
|
|
1053
843
|
this._glCheckError('stencilOpSeparate');
|
|
1054
844
|
this._checkArgs('stencilOpSeparate', arguments);
|
|
1055
|
-
this.
|
|
845
|
+
const stencilOpSeparate = this._getMethod('stencilOpSeparate');
|
|
846
|
+
stencilOpSeparate(face, fail, zfail, zpass);
|
|
1056
847
|
}
|
|
1057
848
|
stencilOp(fail, zfail, zpass) {
|
|
1058
849
|
this._glCheckError('stencilOp');
|
|
1059
850
|
this._checkArgs('stencilOp', arguments);
|
|
1060
|
-
this.
|
|
851
|
+
const stencilOp = this._getMethod('stencilOp');
|
|
852
|
+
stencilOp(fail, zfail, zpass);
|
|
1061
853
|
}
|
|
1062
854
|
texImage2D(target, level, internalformat, width, height, border, format, type, pixels) {
|
|
1063
855
|
this._glCheckError('texImage2D');
|
|
1064
856
|
this._checkArgs('texImage2D', arguments);
|
|
857
|
+
const texImage2D = this._getMethod('texImage2D');
|
|
1065
858
|
if (arguments.length === 9) {
|
|
1066
|
-
|
|
1067
|
-
if (pixels.buffer.nativeObject) {
|
|
1068
|
-
// @ts-ignore
|
|
1069
|
-
this.context.texImage2D(target, level, internalformat, width, height, border, format, type, pixels.buffer.nativeObject);
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
if (pixels instanceof Uint8Array) {
|
|
1073
|
-
if (this._isSupported) {
|
|
1074
|
-
this.context.texImage2DByteBuffer(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1075
|
-
}
|
|
1076
|
-
else {
|
|
1077
|
-
this.context.texImage2DByte(target, level, internalformat, width, height, border, format, type, Array.from(pixels));
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
else if (pixels instanceof Uint16Array || pixels instanceof Int16Array) {
|
|
1081
|
-
if (this._isSupported) {
|
|
1082
|
-
this.context.texSubImage2DShortBuffer(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1083
|
-
}
|
|
1084
|
-
else {
|
|
1085
|
-
this.context.texSubImage2DShort(target, level, internalformat, width, height, border, format, type, Array.from(pixels));
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
else if (pixels instanceof Uint32Array || pixels instanceof Int32Array) {
|
|
1089
|
-
if (this._isSupported) {
|
|
1090
|
-
this.context.texImage2DIntBuffer(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1091
|
-
}
|
|
1092
|
-
else {
|
|
1093
|
-
this.context.texImage2DInt(target, level, internalformat, width, height, border, format, type, Array.from(pixels));
|
|
1094
|
-
}
|
|
1095
|
-
}
|
|
1096
|
-
else if (pixels instanceof Float32Array) {
|
|
1097
|
-
if (this._isSupported) {
|
|
1098
|
-
this.context.texImage2DFloatBuffer(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1099
|
-
}
|
|
1100
|
-
else {
|
|
1101
|
-
this.context.texImage2DFloat(target, level, internalformat, width, height, border, format, type, Array.from(pixels));
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
else if (pixels instanceof ArrayBuffer) {
|
|
1107
|
-
// @ts-ignore // ArrayBuffer backed by nio buffer
|
|
1108
|
-
if (pixels.nativeObject) {
|
|
1109
|
-
// @ts-ignore
|
|
1110
|
-
this.context.texImage2D(target, level, internalformat, width, height, border, format, type, pixels.nativeObject);
|
|
1111
|
-
}
|
|
1112
|
-
else {
|
|
1113
|
-
if (this._isSupported) {
|
|
1114
|
-
this.context.texImage2DByteBuffer(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1115
|
-
}
|
|
1116
|
-
else {
|
|
1117
|
-
this.context.texImage2DByte(target, level, internalformat, width, height, border, format, type, Array.from(new Uint8Array(pixels)));
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
else {
|
|
1122
|
-
this.context.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
|
|
1123
|
-
}
|
|
859
|
+
texImage2D(target, level, internalformat, width, height, border, format, type !== null && type !== void 0 ? type : internalformat, pixels);
|
|
1124
860
|
}
|
|
1125
861
|
else if (arguments.length === 6) {
|
|
1126
862
|
if (border && typeof border.tagName === 'string' && (border.tagName === 'VID' || border.tagName === 'VIDEO') && border._video && typeof border._video.getCurrentFrame === 'function') {
|
|
1127
|
-
border._video.getCurrentFrame(this.
|
|
863
|
+
border._video.getCurrentFrame(this.native, this, target, level, internalformat, width, height);
|
|
1128
864
|
}
|
|
1129
865
|
else if (border && typeof border.getCurrentFrame === 'function') {
|
|
1130
|
-
border.getCurrentFrame(this.
|
|
866
|
+
border.getCurrentFrame(this.native, this, target, level, internalformat, width, height);
|
|
1131
867
|
}
|
|
1132
868
|
else if (border instanceof ImageAsset) {
|
|
1133
|
-
|
|
869
|
+
texImage2D(target, level, internalformat, width, height, border.native);
|
|
1134
870
|
}
|
|
1135
|
-
else if (border instanceof ImageBitmap
|
|
1136
|
-
|
|
871
|
+
else if (border instanceof ImageBitmap) {
|
|
872
|
+
texImage2D(target, level, internalformat, width, height, border.native);
|
|
1137
873
|
}
|
|
1138
874
|
else if (border instanceof android.graphics.Bitmap) {
|
|
1139
|
-
|
|
875
|
+
texImage2D(target, level, internalformat, width, height, border);
|
|
1140
876
|
}
|
|
1141
877
|
else if (border instanceof ImageSource) {
|
|
1142
|
-
|
|
878
|
+
texImage2D(target, level, internalformat, width, height, border.android);
|
|
1143
879
|
}
|
|
1144
880
|
else if (border && typeof border.tagName === 'string' && (border.tagName === 'IMG' || border.tagName === 'IMAGE')) {
|
|
1145
881
|
if (border._asset instanceof ImageAsset) {
|
|
1146
|
-
|
|
882
|
+
texImage2D(target, level, internalformat, width, height, border._asset.native);
|
|
1147
883
|
}
|
|
1148
884
|
else if (border._imageSource instanceof ImageSource) {
|
|
1149
|
-
|
|
885
|
+
texImage2D(target, level, internalformat, width, height, border._imageSource.android);
|
|
1150
886
|
}
|
|
1151
887
|
else if (border._image instanceof android.graphics.Bitmap) {
|
|
1152
|
-
|
|
888
|
+
texImage2D(target, level, internalformat, width, height, border._image);
|
|
1153
889
|
}
|
|
1154
890
|
else if (typeof border.src === 'string') {
|
|
1155
|
-
|
|
891
|
+
texImage2D(target, level, internalformat, width, height, ImageSource.fromFileSync(border.src).android);
|
|
1156
892
|
}
|
|
1157
893
|
}
|
|
1158
894
|
else if (border && typeof border.tagName === 'string' && border.tagName === 'CANVAS' && border._canvas instanceof Canvas) {
|
|
1159
|
-
|
|
895
|
+
texImage2D(target, level, internalformat, width, height, border._canvas.native);
|
|
1160
896
|
}
|
|
1161
897
|
}
|
|
1162
898
|
}
|
|
1163
899
|
texParameterf(target, pname, param) {
|
|
1164
900
|
this._glCheckError('texParameterf');
|
|
1165
901
|
this._checkArgs('texParameterf', arguments);
|
|
1166
|
-
this.
|
|
902
|
+
const texParameterf = this._getMethod('texParameterf');
|
|
903
|
+
texParameterf(target, pname, param);
|
|
1167
904
|
}
|
|
1168
905
|
texParameteri(target, pname, param) {
|
|
1169
906
|
this._glCheckError('texParameteri');
|
|
1170
907
|
this._checkArgs('texParameteri', arguments);
|
|
1171
|
-
this.
|
|
908
|
+
const texParameteri = this._getMethod('texParameteri');
|
|
909
|
+
texParameteri(target, pname, param);
|
|
1172
910
|
}
|
|
1173
911
|
texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels) {
|
|
1174
912
|
this._glCheckError('texSubImage2D');
|
|
1175
913
|
this._checkArgs('texSubImage2D', arguments);
|
|
914
|
+
const texSubImage2D = this._getMethod('texSubImage2D');
|
|
1176
915
|
if (arguments.length === 9) {
|
|
1177
|
-
|
|
1178
|
-
if (pixels.buffer.nativeObject) {
|
|
1179
|
-
this.context.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels.buffer.nativeObject);
|
|
1180
|
-
}
|
|
1181
|
-
else {
|
|
1182
|
-
if (pixels instanceof Uint8Array) {
|
|
1183
|
-
if (this._isSupported) {
|
|
1184
|
-
this.context.texSubImage2DByteBuffer(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1185
|
-
}
|
|
1186
|
-
else {
|
|
1187
|
-
this.context.texSubImage2DByte(target, level, xoffset, yoffset, width, height, format, type, Array.from(pixels));
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
else if (pixels instanceof Uint16Array || pixels instanceof Int16Array) {
|
|
1191
|
-
if (this._isSupported) {
|
|
1192
|
-
this.context.texSubImage2DShortBuffer(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1193
|
-
}
|
|
1194
|
-
else {
|
|
1195
|
-
this.context.texSubImage2DShort(target, level, xoffset, yoffset, width, height, format, type, Array.from(pixels));
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
else if (pixels instanceof Uint32Array || pixels instanceof Int32Array) {
|
|
1199
|
-
if (this._isSupported) {
|
|
1200
|
-
this.context.texSubImage2DIntBuffer(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1201
|
-
}
|
|
1202
|
-
else {
|
|
1203
|
-
this.context.texSubImage2DInt(target, level, xoffset, yoffset, width, height, format, type, Array.from(pixels));
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
else if (pixels instanceof Float32Array) {
|
|
1207
|
-
if (this._isSupported) {
|
|
1208
|
-
this.context.texSubImage2DByte(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1209
|
-
}
|
|
1210
|
-
else {
|
|
1211
|
-
this.context.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, Array.from(pixels));
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
else if (pixels instanceof ArrayBuffer) {
|
|
1217
|
-
// @ts-ignore
|
|
1218
|
-
if (pixels.nativeObject) {
|
|
1219
|
-
// @ts-ignore
|
|
1220
|
-
this.context.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels.nativeObject);
|
|
1221
|
-
}
|
|
1222
|
-
else {
|
|
1223
|
-
if (this._isSupported) {
|
|
1224
|
-
this.context.texSubImage2DByteBuffer(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1225
|
-
}
|
|
1226
|
-
else {
|
|
1227
|
-
this.context.texSubImage2DByte(target, level, xoffset, yoffset, width, height, format, type, Array.from(new Uint8Array(pixels)));
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
}
|
|
916
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
|
|
1231
917
|
}
|
|
1232
918
|
else if (arguments.length === 7) {
|
|
1233
919
|
if (format instanceof android.graphics.Bitmap) {
|
|
1234
|
-
|
|
920
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format);
|
|
1235
921
|
}
|
|
1236
922
|
else if (format instanceof ImageSource) {
|
|
1237
|
-
|
|
923
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format.android);
|
|
1238
924
|
}
|
|
1239
925
|
else if (format instanceof ImageAsset) {
|
|
1240
|
-
|
|
926
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
|
|
1241
927
|
}
|
|
1242
|
-
else if (format instanceof ImageBitmap
|
|
1243
|
-
|
|
928
|
+
else if (format instanceof ImageBitmap) {
|
|
929
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format.native);
|
|
1244
930
|
}
|
|
1245
931
|
else if (format && typeof format.tagName === 'string' && (format.tagName === 'IMG' || format.tagName === 'IMAGE')) {
|
|
1246
932
|
if (format._imageSource instanceof ImageSource) {
|
|
1247
|
-
|
|
933
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format._imageSource.android);
|
|
1248
934
|
}
|
|
1249
935
|
else if (format._image instanceof android.graphics.Bitmap) {
|
|
1250
|
-
|
|
936
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format._image);
|
|
1251
937
|
}
|
|
1252
938
|
else if (format._asset instanceof ImageAsset) {
|
|
1253
|
-
|
|
939
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format._asset.native);
|
|
1254
940
|
}
|
|
1255
941
|
else if (typeof format.src === 'string') {
|
|
1256
942
|
const result = ImageSource.fromFileSync(format.src);
|
|
1257
|
-
|
|
943
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, result ? result.android : null);
|
|
1258
944
|
}
|
|
1259
945
|
else if (format && typeof format.tagName === 'string' && format.tagName === 'CANVAS' && format._canvas instanceof Canvas) {
|
|
1260
|
-
|
|
946
|
+
texSubImage2D(target, level, xoffset, yoffset, width, height, format._canvas.native);
|
|
1261
947
|
}
|
|
1262
948
|
}
|
|
1263
949
|
}
|
|
@@ -1265,403 +951,209 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
1265
951
|
uniform1f(location, v0) {
|
|
1266
952
|
this._glCheckError('uniform1f');
|
|
1267
953
|
this._checkArgs('uniform1f', arguments);
|
|
1268
|
-
const
|
|
1269
|
-
|
|
954
|
+
const uniform1f = this._getMethod('uniform1f');
|
|
955
|
+
const loc = location.native;
|
|
956
|
+
uniform1f(loc, v0);
|
|
1270
957
|
}
|
|
1271
958
|
uniform1iv(location, value) {
|
|
1272
959
|
this._glCheckError('uniform1iv');
|
|
1273
960
|
this._checkArgs('uniform1iv', arguments);
|
|
1274
|
-
const loc = location
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
this.context.uniform1ivBuffer(loc, value);
|
|
1278
|
-
}
|
|
1279
|
-
else {
|
|
1280
|
-
this.context.uniform1iv(loc, value);
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
else {
|
|
1284
|
-
if (!Array.isArray(value)) {
|
|
1285
|
-
this.context.uniform1iv(loc, Array.from(value));
|
|
1286
|
-
}
|
|
1287
|
-
else {
|
|
1288
|
-
this.context.uniform1iv(loc, value);
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
961
|
+
const loc = location.native;
|
|
962
|
+
const uniform1iv = this._getMethod('uniform1iv');
|
|
963
|
+
uniform1iv(loc, value);
|
|
1291
964
|
}
|
|
1292
965
|
uniform1fv(location, value) {
|
|
1293
966
|
this._glCheckError('uniform1fv');
|
|
1294
967
|
this._checkArgs('uniform1fv', arguments);
|
|
1295
|
-
const loc = location
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
this.context.uniform1fvBuffer(loc, value);
|
|
1299
|
-
}
|
|
1300
|
-
else {
|
|
1301
|
-
this.context.uniform1fv(loc, value);
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
else {
|
|
1305
|
-
if (!Array.isArray(value)) {
|
|
1306
|
-
this.context.uniform1fv(loc, Array.from(value));
|
|
1307
|
-
}
|
|
1308
|
-
else {
|
|
1309
|
-
this.context.uniform1fv(loc, value);
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
968
|
+
const loc = location.native;
|
|
969
|
+
const uniform1fv = this._getMethod('uniform1fv');
|
|
970
|
+
uniform1fv(loc, value);
|
|
1312
971
|
}
|
|
1313
972
|
uniform1i(location, v0) {
|
|
1314
973
|
this._glCheckError('uniform1i');
|
|
1315
974
|
this._checkArgs('uniform1i', arguments);
|
|
1316
|
-
const
|
|
1317
|
-
|
|
975
|
+
const uniform1i = this._getMethod('uniform1i');
|
|
976
|
+
const loc = location.native;
|
|
977
|
+
uniform1i(loc, Number(v0));
|
|
1318
978
|
}
|
|
1319
979
|
uniform2f(location, v0, v1) {
|
|
1320
980
|
this._glCheckError('uniform2f');
|
|
1321
981
|
this._checkArgs('uniform2f', arguments);
|
|
1322
|
-
const
|
|
1323
|
-
|
|
982
|
+
const uniform2f = this._getMethod('uniform2f');
|
|
983
|
+
const loc = location.native;
|
|
984
|
+
uniform2f(loc, v0, v1);
|
|
1324
985
|
}
|
|
1325
986
|
uniform2iv(location, value) {
|
|
1326
987
|
this._glCheckError('uniform2iv');
|
|
1327
988
|
this._checkArgs('uniform2iv', arguments);
|
|
1328
|
-
const loc = location
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
this.context.uniform2ivBuffer(loc, value);
|
|
1332
|
-
}
|
|
1333
|
-
else {
|
|
1334
|
-
this.context.uniform2iv(loc, value);
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
else {
|
|
1338
|
-
if (!Array.isArray(value)) {
|
|
1339
|
-
this.context.uniform2iv(loc, Array.from(value));
|
|
1340
|
-
}
|
|
1341
|
-
else {
|
|
1342
|
-
this.context.uniform2iv(loc, value);
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
989
|
+
const loc = location.native;
|
|
990
|
+
const uniform2iv = this._getMethod('uniform2iv');
|
|
991
|
+
uniform2iv(loc, value);
|
|
1345
992
|
}
|
|
1346
993
|
uniform2fv(location, value) {
|
|
1347
994
|
this._glCheckError('uniform2fv');
|
|
1348
995
|
this._checkArgs('uniform2fv', arguments);
|
|
1349
|
-
const loc = location
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
this.context.uniform2fvBuffer(loc, value);
|
|
1353
|
-
}
|
|
1354
|
-
else {
|
|
1355
|
-
this.context.uniform2fv(loc, value);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
else {
|
|
1359
|
-
if (!Array.isArray(value)) {
|
|
1360
|
-
this.context.uniform2fv(loc, Array.from(value));
|
|
1361
|
-
}
|
|
1362
|
-
else {
|
|
1363
|
-
this.context.uniform2fv(loc, value);
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
996
|
+
const loc = location.native;
|
|
997
|
+
const uniform2fv = this._getMethod('uniform2fv');
|
|
998
|
+
uniform2fv(loc, value);
|
|
1366
999
|
}
|
|
1367
1000
|
uniform2i(location, v0, v1) {
|
|
1368
1001
|
this._glCheckError('uniform2i');
|
|
1369
1002
|
this._checkArgs('uniform2i', arguments);
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1003
|
+
const uniform2i = this._getMethod('uniform2i');
|
|
1004
|
+
const loc = location.native;
|
|
1005
|
+
uniform2i(loc, v0, v1);
|
|
1372
1006
|
}
|
|
1373
1007
|
uniform3f(location, v0, v1, v2) {
|
|
1374
1008
|
this._glCheckError('uniform3f');
|
|
1375
1009
|
this._checkArgs('uniform3f', arguments);
|
|
1376
|
-
const
|
|
1377
|
-
|
|
1010
|
+
const uniform3f = this._getMethod('uniform3f');
|
|
1011
|
+
const loc = location.native;
|
|
1012
|
+
uniform3f(loc, v0, v1, v2);
|
|
1378
1013
|
}
|
|
1379
1014
|
uniform3iv(location, value) {
|
|
1380
1015
|
this._glCheckError('uniform3iv');
|
|
1381
1016
|
this._checkArgs('uniform3iv', arguments);
|
|
1382
|
-
const loc = location
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
this.context.uniform3ivBuffer(loc, value);
|
|
1386
|
-
}
|
|
1387
|
-
else {
|
|
1388
|
-
this.context.uniform3iv(loc, value);
|
|
1389
|
-
}
|
|
1390
|
-
}
|
|
1391
|
-
else {
|
|
1392
|
-
if (!Array.isArray(value)) {
|
|
1393
|
-
this.context.uniform3iv(loc, Array.from(value));
|
|
1394
|
-
}
|
|
1395
|
-
else {
|
|
1396
|
-
this.context.uniform3iv(loc, value);
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1017
|
+
const loc = location.native;
|
|
1018
|
+
const uniform3iv = this._getMethod('uniform3iv');
|
|
1019
|
+
uniform3iv(loc, value);
|
|
1399
1020
|
}
|
|
1400
1021
|
uniform3fv(location, value) {
|
|
1401
1022
|
this._glCheckError('uniform3fv');
|
|
1402
1023
|
this._checkArgs('uniform3fv', arguments);
|
|
1403
|
-
const loc = location
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
this.context.uniform3fvBuffer(loc, value);
|
|
1407
|
-
}
|
|
1408
|
-
else {
|
|
1409
|
-
this.context.uniform3fv(loc, value);
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
else {
|
|
1413
|
-
if (!Array.isArray(value)) {
|
|
1414
|
-
this.context.uniform3fv(loc, Array.from(value));
|
|
1415
|
-
}
|
|
1416
|
-
else {
|
|
1417
|
-
this.context.uniform3fv(loc, value);
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1024
|
+
const loc = location.native;
|
|
1025
|
+
const uniform3fv = this._getMethod('uniform3fv');
|
|
1026
|
+
uniform3fv(loc, value);
|
|
1420
1027
|
}
|
|
1421
1028
|
uniform3i(location, v0, v1, v2) {
|
|
1422
1029
|
this._glCheckError('uniform3i');
|
|
1423
1030
|
this._checkArgs('uniform3i', arguments);
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1031
|
+
const uniform3i = this._getMethod('uniform3i');
|
|
1032
|
+
const loc = location.native;
|
|
1033
|
+
uniform3i(loc, v0, v1, v2);
|
|
1426
1034
|
}
|
|
1427
1035
|
uniform4f(location, v0, v1, v2, v3) {
|
|
1428
1036
|
this._glCheckError('uniform4f');
|
|
1429
1037
|
this._checkArgs('uniform4f', arguments);
|
|
1430
|
-
const
|
|
1431
|
-
|
|
1038
|
+
const uniform4f = this._getMethod('uniform4f');
|
|
1039
|
+
const loc = location.native;
|
|
1040
|
+
uniform4f(loc, v0, v1, v2, v3);
|
|
1432
1041
|
}
|
|
1433
1042
|
uniform4iv(location, value) {
|
|
1434
1043
|
this._glCheckError('uniform4iv');
|
|
1435
1044
|
this._checkArgs('uniform4iv', arguments);
|
|
1436
|
-
const loc = location
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
this.context.uniform4ivBuffer(loc, value);
|
|
1440
|
-
}
|
|
1441
|
-
else {
|
|
1442
|
-
this.context.uniform4iv(loc, value);
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
else {
|
|
1446
|
-
if (!Array.isArray(value)) {
|
|
1447
|
-
this.context.uniform4iv(loc, Array.from(value));
|
|
1448
|
-
}
|
|
1449
|
-
else {
|
|
1450
|
-
this.context.uniform4iv(loc, value);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1045
|
+
const loc = location.native;
|
|
1046
|
+
const uniform4iv = this._getMethod('uniform4iv');
|
|
1047
|
+
uniform4iv(loc, value);
|
|
1453
1048
|
}
|
|
1454
1049
|
uniform4fv(location, value) {
|
|
1455
1050
|
this._glCheckError('uniform4fv');
|
|
1456
1051
|
this._checkArgs('uniform4fv', arguments);
|
|
1457
|
-
const loc = location
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
this.context.uniform4fvBuffer(loc, value);
|
|
1461
|
-
}
|
|
1462
|
-
else {
|
|
1463
|
-
this.context.uniform4fv(loc, value);
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
else {
|
|
1467
|
-
if (!Array.isArray(value)) {
|
|
1468
|
-
this.context.uniform4fv(loc, Array.from(value));
|
|
1469
|
-
}
|
|
1470
|
-
else {
|
|
1471
|
-
this.context.uniform4fv(loc, value);
|
|
1472
|
-
}
|
|
1473
|
-
}
|
|
1052
|
+
const loc = location.native;
|
|
1053
|
+
const uniform4fv = this._getMethod('uniform4fv');
|
|
1054
|
+
uniform4fv(loc, value);
|
|
1474
1055
|
}
|
|
1475
1056
|
uniform4i(location, v0, v1, v2, v3) {
|
|
1476
1057
|
this._glCheckError('uniform4i');
|
|
1477
1058
|
this._checkArgs('uniform4i', arguments);
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1059
|
+
const uniform4i = this._getMethod('uniform4i');
|
|
1060
|
+
const loc = location.native;
|
|
1061
|
+
uniform4i(loc, v0, v1, v2, v3);
|
|
1480
1062
|
}
|
|
1481
1063
|
uniformMatrix2fv(location, transpose, value) {
|
|
1482
1064
|
this._glCheckError('uniformMatrix2fv');
|
|
1483
1065
|
this._checkArgs('uniformMatrix2fv', arguments);
|
|
1484
|
-
const loc = location
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
this.context.uniformMatrix2fvBuffer(loc, transpose, value);
|
|
1488
|
-
}
|
|
1489
|
-
else {
|
|
1490
|
-
this.context.uniformMatrix2fv(loc, transpose, value);
|
|
1491
|
-
}
|
|
1492
|
-
}
|
|
1493
|
-
else {
|
|
1494
|
-
if (!Array.isArray(value)) {
|
|
1495
|
-
this.context.uniformMatrix2fv(loc, transpose, Array.from(value));
|
|
1496
|
-
}
|
|
1497
|
-
else {
|
|
1498
|
-
this.context.uniformMatrix2fv(loc, transpose, value);
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1066
|
+
const loc = location.native;
|
|
1067
|
+
const uniformMatrix2fv = this._getMethod('uniformMatrix2fv');
|
|
1068
|
+
uniformMatrix2fv(loc, transpose, value);
|
|
1501
1069
|
}
|
|
1502
1070
|
uniformMatrix3fv(location, transpose, value) {
|
|
1503
1071
|
this._glCheckError('uniformMatrix3fv');
|
|
1504
1072
|
this._checkArgs('uniformMatrix3fv', arguments);
|
|
1505
|
-
const loc = location
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
this.context.uniformMatrix3fvBuffer(loc, transpose, value);
|
|
1509
|
-
}
|
|
1510
|
-
else {
|
|
1511
|
-
this.context.uniformMatrix3fv(loc, transpose, value);
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
else {
|
|
1515
|
-
if (!Array.isArray(value)) {
|
|
1516
|
-
this.context.uniformMatrix3fv(loc, transpose, Array.from(value));
|
|
1517
|
-
}
|
|
1518
|
-
else {
|
|
1519
|
-
this.context.uniformMatrix3fv(loc, transpose, value);
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1073
|
+
const loc = location.native;
|
|
1074
|
+
const uniformMatrix3fv = this._getMethod('uniformMatrix3fv');
|
|
1075
|
+
uniformMatrix3fv(loc, transpose, value);
|
|
1522
1076
|
}
|
|
1523
1077
|
uniformMatrix4fv(location, transpose, value) {
|
|
1524
1078
|
this._glCheckError('uniformMatrix4fv');
|
|
1525
1079
|
this._checkArgs('uniformMatrix4fv', arguments);
|
|
1526
|
-
const loc = location
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
this.context.uniformMatrix4fvBuffer(loc, transpose, value);
|
|
1530
|
-
}
|
|
1531
|
-
else {
|
|
1532
|
-
this.context.uniformMatrix4fv(loc, transpose, value);
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
else {
|
|
1536
|
-
if (!Array.isArray(value)) {
|
|
1537
|
-
this.context.uniformMatrix4fv(loc, transpose, Array.from(value));
|
|
1538
|
-
}
|
|
1539
|
-
else {
|
|
1540
|
-
this.context.uniformMatrix4fv(loc, transpose, value);
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1080
|
+
const loc = location.native;
|
|
1081
|
+
const uniformMatrix4fv = this._getMethod('uniformMatrix4fv');
|
|
1082
|
+
uniformMatrix4fv(loc, transpose, value);
|
|
1543
1083
|
}
|
|
1544
1084
|
useProgram(program) {
|
|
1545
1085
|
this._glCheckError('useProgram');
|
|
1546
1086
|
this._checkArgs('useProgram', arguments);
|
|
1547
|
-
const
|
|
1548
|
-
|
|
1087
|
+
const useProgram = this._getMethod('useProgram');
|
|
1088
|
+
const value = program ? program.native : null;
|
|
1089
|
+
useProgram(value);
|
|
1549
1090
|
}
|
|
1550
1091
|
validateProgram(program) {
|
|
1551
1092
|
this._glCheckError('validateProgram');
|
|
1552
1093
|
this._checkArgs('validateProgram', arguments);
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1094
|
+
const validateProgram = this._getMethod('validateProgram');
|
|
1095
|
+
const value = program.native;
|
|
1096
|
+
validateProgram(value);
|
|
1555
1097
|
}
|
|
1556
1098
|
vertexAttrib1f(index, v0) {
|
|
1557
1099
|
this._glCheckError('vertexAttrib1f');
|
|
1558
1100
|
this._checkArgs('vertexAttrib1f', arguments);
|
|
1559
|
-
this.
|
|
1101
|
+
const vertexAttrib1f = this._getMethod('vertexAttrib1f');
|
|
1102
|
+
vertexAttrib1f(index, v0);
|
|
1560
1103
|
}
|
|
1561
1104
|
vertexAttrib1fv(index, value) {
|
|
1562
1105
|
this._glCheckError('vertexAttrib1fv');
|
|
1563
1106
|
this._checkArgs('vertexAttrib1fv', arguments);
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
this.context.vertexAttrib1fvBuffer(index, value);
|
|
1567
|
-
}
|
|
1568
|
-
else {
|
|
1569
|
-
this.context.vertexAttrib1fv(index, value);
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
else {
|
|
1573
|
-
if (!Array.isArray(value)) {
|
|
1574
|
-
this.context.vertexAttrib1fv(index, Array.from(value));
|
|
1575
|
-
}
|
|
1576
|
-
else {
|
|
1577
|
-
this.context.vertexAttrib1fv(index, value);
|
|
1578
|
-
}
|
|
1579
|
-
}
|
|
1107
|
+
const vertexAttrib1fv = this._getMethod('vertexAttrib1fv');
|
|
1108
|
+
vertexAttrib1fv(index, value);
|
|
1580
1109
|
}
|
|
1581
1110
|
vertexAttrib2f(index, v0, v1) {
|
|
1582
1111
|
this._glCheckError('vertexAttrib2f');
|
|
1583
1112
|
this._checkArgs('vertexAttrib2f', arguments);
|
|
1584
|
-
this.
|
|
1113
|
+
const vertexAttrib2f = this._getMethod('vertexAttrib2f');
|
|
1114
|
+
vertexAttrib2f(index, v0, v1);
|
|
1585
1115
|
}
|
|
1586
1116
|
vertexAttrib2fv(index, value) {
|
|
1587
1117
|
this._glCheckError('vertexAttrib2fv');
|
|
1588
1118
|
this._checkArgs('vertexAttrib2fv', arguments);
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
this.context.vertexAttrib2fvBuffer(index, value);
|
|
1592
|
-
}
|
|
1593
|
-
else {
|
|
1594
|
-
this.context.vertexAttrib2fv(index, value);
|
|
1595
|
-
}
|
|
1596
|
-
}
|
|
1597
|
-
else {
|
|
1598
|
-
if (!Array.isArray(value)) {
|
|
1599
|
-
this.context.vertexAttrib2fv(index, Array.from(value));
|
|
1600
|
-
}
|
|
1601
|
-
else {
|
|
1602
|
-
this.context.vertexAttrib2fv(index, value);
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1119
|
+
const vertexAttrib2fv = this._getMethod('vertexAttrib2fv');
|
|
1120
|
+
vertexAttrib2fv(index, value);
|
|
1605
1121
|
}
|
|
1606
1122
|
vertexAttrib3f(index, v0, v1, v2) {
|
|
1607
1123
|
this._glCheckError('vertexAttrib3f');
|
|
1608
1124
|
this._checkArgs('vertexAttrib3f', arguments);
|
|
1609
|
-
this.
|
|
1125
|
+
const vertexAttrib3f = this._getMethod('vertexAttrib3f');
|
|
1126
|
+
vertexAttrib3f(index, v0, v1, v2);
|
|
1610
1127
|
}
|
|
1611
1128
|
vertexAttrib3fv(index, value) {
|
|
1612
1129
|
this._glCheckError('vertexAttrib3fv');
|
|
1613
1130
|
this._checkArgs('vertexAttrib3fv', arguments);
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
this.context.vertexAttrib3fvBuffer(index, value);
|
|
1617
|
-
}
|
|
1618
|
-
else {
|
|
1619
|
-
this.context.vertexAttrib3fv(index, value);
|
|
1620
|
-
}
|
|
1621
|
-
}
|
|
1622
|
-
else {
|
|
1623
|
-
if (!Array.isArray(value)) {
|
|
1624
|
-
this.context.vertexAttrib3fv(index, Array.from(value));
|
|
1625
|
-
}
|
|
1626
|
-
else {
|
|
1627
|
-
this.context.vertexAttrib3fv(index, value);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1131
|
+
const vertexAttrib3fv = this._getMethod('vertexAttrib3fv');
|
|
1132
|
+
vertexAttrib3fv(index, value);
|
|
1630
1133
|
}
|
|
1631
1134
|
vertexAttrib4f(index, v0, v1, v2, v3) {
|
|
1632
1135
|
this._glCheckError('vertexAttrib4f');
|
|
1633
1136
|
this._checkArgs('vertexAttrib4f', arguments);
|
|
1634
|
-
this.
|
|
1137
|
+
const vertexAttrib4f = this._getMethod('vertexAttrib4f');
|
|
1138
|
+
vertexAttrib4f(index, v0, v1, v2, v3);
|
|
1635
1139
|
}
|
|
1636
1140
|
vertexAttrib4fv(index, value) {
|
|
1637
1141
|
this._glCheckError('vertexAttrib4fv');
|
|
1638
1142
|
this._checkArgs('vertexAttrib4fv', arguments);
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
this.context.vertexAttrib4fvBuffer(index, value);
|
|
1642
|
-
}
|
|
1643
|
-
else {
|
|
1644
|
-
this.context.vertexAttrib4fv(index, value);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
else {
|
|
1648
|
-
if (!Array.isArray(value)) {
|
|
1649
|
-
this.context.vertexAttrib4fv(index, Array.from(value));
|
|
1650
|
-
}
|
|
1651
|
-
else {
|
|
1652
|
-
this.context.vertexAttrib4fv(index, value);
|
|
1653
|
-
}
|
|
1654
|
-
}
|
|
1143
|
+
const vertexAttrib4fv = this._getMethod('vertexAttrib4fv');
|
|
1144
|
+
vertexAttrib4fv(index, value);
|
|
1655
1145
|
}
|
|
1656
1146
|
vertexAttribPointer(index, size, type, normalized, stride, offset) {
|
|
1657
1147
|
this._glCheckError('vertexAttribPointer');
|
|
1658
1148
|
this._checkArgs('vertexAttribPointer', arguments);
|
|
1659
|
-
this.
|
|
1149
|
+
const vertexAttribPointer = this._getMethod('vertexAttribPointer');
|
|
1150
|
+
vertexAttribPointer(index, size, type, normalized, stride, offset);
|
|
1660
1151
|
}
|
|
1661
1152
|
viewport(x, y, width, height) {
|
|
1662
1153
|
this._glCheckError('viewport');
|
|
1663
1154
|
this._checkArgs('viewport', arguments);
|
|
1664
|
-
this.
|
|
1155
|
+
const viewport = this._getMethod('viewport');
|
|
1156
|
+
viewport(x, y, width, height);
|
|
1665
1157
|
}
|
|
1666
1158
|
_glCheckError(message) {
|
|
1667
1159
|
if (!WebGLRenderingContext.isDebug) {
|
|
@@ -1684,4 +1176,830 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase {
|
|
|
1684
1176
|
}
|
|
1685
1177
|
WebGLRenderingContext.isDebug = false;
|
|
1686
1178
|
WebGLRenderingContext.filter = 'both';
|
|
1179
|
+
(() => {
|
|
1180
|
+
Helpers.initialize();
|
|
1181
|
+
ctor = global.CanvasJSIModule.createWebGLContext;
|
|
1182
|
+
})();
|
|
1183
|
+
__decorate([
|
|
1184
|
+
profile,
|
|
1185
|
+
__metadata("design:type", Function),
|
|
1186
|
+
__metadata("design:paramtypes", [Number]),
|
|
1187
|
+
__metadata("design:returntype", void 0)
|
|
1188
|
+
], WebGLRenderingContext.prototype, "activeTexture", null);
|
|
1189
|
+
__decorate([
|
|
1190
|
+
profile,
|
|
1191
|
+
__metadata("design:type", Function),
|
|
1192
|
+
__metadata("design:paramtypes", [WebGLProgram, WebGLShader]),
|
|
1193
|
+
__metadata("design:returntype", void 0)
|
|
1194
|
+
], WebGLRenderingContext.prototype, "attachShader", null);
|
|
1195
|
+
__decorate([
|
|
1196
|
+
profile,
|
|
1197
|
+
__metadata("design:type", Function),
|
|
1198
|
+
__metadata("design:paramtypes", [WebGLProgram, Number, String]),
|
|
1199
|
+
__metadata("design:returntype", void 0)
|
|
1200
|
+
], WebGLRenderingContext.prototype, "bindAttribLocation", null);
|
|
1201
|
+
__decorate([
|
|
1202
|
+
profile,
|
|
1203
|
+
__metadata("design:type", Function),
|
|
1204
|
+
__metadata("design:paramtypes", [Number, WebGLBuffer]),
|
|
1205
|
+
__metadata("design:returntype", void 0)
|
|
1206
|
+
], WebGLRenderingContext.prototype, "bindBuffer", null);
|
|
1207
|
+
__decorate([
|
|
1208
|
+
profile,
|
|
1209
|
+
__metadata("design:type", Function),
|
|
1210
|
+
__metadata("design:paramtypes", [Number, WebGLFramebuffer]),
|
|
1211
|
+
__metadata("design:returntype", void 0)
|
|
1212
|
+
], WebGLRenderingContext.prototype, "bindFramebuffer", null);
|
|
1213
|
+
__decorate([
|
|
1214
|
+
profile,
|
|
1215
|
+
__metadata("design:type", Function),
|
|
1216
|
+
__metadata("design:paramtypes", [Number, WebGLRenderbuffer]),
|
|
1217
|
+
__metadata("design:returntype", void 0)
|
|
1218
|
+
], WebGLRenderingContext.prototype, "bindRenderbuffer", null);
|
|
1219
|
+
__decorate([
|
|
1220
|
+
profile,
|
|
1221
|
+
__metadata("design:type", Function),
|
|
1222
|
+
__metadata("design:paramtypes", [Number, WebGLTexture]),
|
|
1223
|
+
__metadata("design:returntype", void 0)
|
|
1224
|
+
], WebGLRenderingContext.prototype, "bindTexture", null);
|
|
1225
|
+
__decorate([
|
|
1226
|
+
profile,
|
|
1227
|
+
__metadata("design:type", Function),
|
|
1228
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1229
|
+
__metadata("design:returntype", void 0)
|
|
1230
|
+
], WebGLRenderingContext.prototype, "blendColor", null);
|
|
1231
|
+
__decorate([
|
|
1232
|
+
profile,
|
|
1233
|
+
__metadata("design:type", Function),
|
|
1234
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1235
|
+
__metadata("design:returntype", void 0)
|
|
1236
|
+
], WebGLRenderingContext.prototype, "blendEquationSeparate", null);
|
|
1237
|
+
__decorate([
|
|
1238
|
+
profile,
|
|
1239
|
+
__metadata("design:type", Function),
|
|
1240
|
+
__metadata("design:paramtypes", [Number]),
|
|
1241
|
+
__metadata("design:returntype", void 0)
|
|
1242
|
+
], WebGLRenderingContext.prototype, "blendEquation", null);
|
|
1243
|
+
__decorate([
|
|
1244
|
+
profile,
|
|
1245
|
+
__metadata("design:type", Function),
|
|
1246
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1247
|
+
__metadata("design:returntype", void 0)
|
|
1248
|
+
], WebGLRenderingContext.prototype, "blendFuncSeparate", null);
|
|
1249
|
+
__decorate([
|
|
1250
|
+
profile,
|
|
1251
|
+
__metadata("design:type", Function),
|
|
1252
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1253
|
+
__metadata("design:returntype", void 0)
|
|
1254
|
+
], WebGLRenderingContext.prototype, "blendFunc", null);
|
|
1255
|
+
__decorate([
|
|
1256
|
+
profile,
|
|
1257
|
+
__metadata("design:type", Function),
|
|
1258
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
1259
|
+
__metadata("design:returntype", void 0)
|
|
1260
|
+
], WebGLRenderingContext.prototype, "bufferData", null);
|
|
1261
|
+
__decorate([
|
|
1262
|
+
profile,
|
|
1263
|
+
__metadata("design:type", Function),
|
|
1264
|
+
__metadata("design:paramtypes", [Number, Number, Object]),
|
|
1265
|
+
__metadata("design:returntype", void 0)
|
|
1266
|
+
], WebGLRenderingContext.prototype, "bufferSubData", null);
|
|
1267
|
+
__decorate([
|
|
1268
|
+
profile,
|
|
1269
|
+
__metadata("design:type", Function),
|
|
1270
|
+
__metadata("design:paramtypes", [Number]),
|
|
1271
|
+
__metadata("design:returntype", Number)
|
|
1272
|
+
], WebGLRenderingContext.prototype, "checkFramebufferStatus", null);
|
|
1273
|
+
__decorate([
|
|
1274
|
+
profile,
|
|
1275
|
+
__metadata("design:type", Function),
|
|
1276
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1277
|
+
__metadata("design:returntype", void 0)
|
|
1278
|
+
], WebGLRenderingContext.prototype, "clearColor", null);
|
|
1279
|
+
__decorate([
|
|
1280
|
+
profile,
|
|
1281
|
+
__metadata("design:type", Function),
|
|
1282
|
+
__metadata("design:paramtypes", [Number]),
|
|
1283
|
+
__metadata("design:returntype", void 0)
|
|
1284
|
+
], WebGLRenderingContext.prototype, "clearDepth", null);
|
|
1285
|
+
__decorate([
|
|
1286
|
+
profile,
|
|
1287
|
+
__metadata("design:type", Function),
|
|
1288
|
+
__metadata("design:paramtypes", [Number]),
|
|
1289
|
+
__metadata("design:returntype", void 0)
|
|
1290
|
+
], WebGLRenderingContext.prototype, "clearStencil", null);
|
|
1291
|
+
__decorate([
|
|
1292
|
+
profile,
|
|
1293
|
+
__metadata("design:type", Function),
|
|
1294
|
+
__metadata("design:paramtypes", [Number]),
|
|
1295
|
+
__metadata("design:returntype", void 0)
|
|
1296
|
+
], WebGLRenderingContext.prototype, "clear", null);
|
|
1297
|
+
__decorate([
|
|
1298
|
+
profile,
|
|
1299
|
+
__metadata("design:type", Function),
|
|
1300
|
+
__metadata("design:paramtypes", [Boolean, Boolean, Boolean, Boolean]),
|
|
1301
|
+
__metadata("design:returntype", void 0)
|
|
1302
|
+
], WebGLRenderingContext.prototype, "colorMask", null);
|
|
1303
|
+
__decorate([
|
|
1304
|
+
profile,
|
|
1305
|
+
__metadata("design:type", Function),
|
|
1306
|
+
__metadata("design:paramtypes", []),
|
|
1307
|
+
__metadata("design:returntype", void 0)
|
|
1308
|
+
], WebGLRenderingContext.prototype, "commit", null);
|
|
1309
|
+
__decorate([
|
|
1310
|
+
profile,
|
|
1311
|
+
__metadata("design:type", Function),
|
|
1312
|
+
__metadata("design:paramtypes", [WebGLShader]),
|
|
1313
|
+
__metadata("design:returntype", void 0)
|
|
1314
|
+
], WebGLRenderingContext.prototype, "compileShader", null);
|
|
1315
|
+
__decorate([
|
|
1316
|
+
profile,
|
|
1317
|
+
__metadata("design:type", Function),
|
|
1318
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Object]),
|
|
1319
|
+
__metadata("design:returntype", void 0)
|
|
1320
|
+
], WebGLRenderingContext.prototype, "compressedTexImage2D", null);
|
|
1321
|
+
__decorate([
|
|
1322
|
+
profile,
|
|
1323
|
+
__metadata("design:type", Function),
|
|
1324
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Number, Object]),
|
|
1325
|
+
__metadata("design:returntype", void 0)
|
|
1326
|
+
], WebGLRenderingContext.prototype, "compressedTexSubImage2D", null);
|
|
1327
|
+
__decorate([
|
|
1328
|
+
profile,
|
|
1329
|
+
__metadata("design:type", Function),
|
|
1330
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Number, Number]),
|
|
1331
|
+
__metadata("design:returntype", void 0)
|
|
1332
|
+
], WebGLRenderingContext.prototype, "copyTexImage2D", null);
|
|
1333
|
+
__decorate([
|
|
1334
|
+
profile,
|
|
1335
|
+
__metadata("design:type", Function),
|
|
1336
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Number, Number]),
|
|
1337
|
+
__metadata("design:returntype", void 0)
|
|
1338
|
+
], WebGLRenderingContext.prototype, "copyTexSubImage2D", null);
|
|
1339
|
+
__decorate([
|
|
1340
|
+
profile,
|
|
1341
|
+
__metadata("design:type", Function),
|
|
1342
|
+
__metadata("design:paramtypes", []),
|
|
1343
|
+
__metadata("design:returntype", WebGLBuffer)
|
|
1344
|
+
], WebGLRenderingContext.prototype, "createBuffer", null);
|
|
1345
|
+
__decorate([
|
|
1346
|
+
profile,
|
|
1347
|
+
__metadata("design:type", Function),
|
|
1348
|
+
__metadata("design:paramtypes", []),
|
|
1349
|
+
__metadata("design:returntype", WebGLFramebuffer)
|
|
1350
|
+
], WebGLRenderingContext.prototype, "createFramebuffer", null);
|
|
1351
|
+
__decorate([
|
|
1352
|
+
profile,
|
|
1353
|
+
__metadata("design:type", Function),
|
|
1354
|
+
__metadata("design:paramtypes", []),
|
|
1355
|
+
__metadata("design:returntype", WebGLProgram)
|
|
1356
|
+
], WebGLRenderingContext.prototype, "createProgram", null);
|
|
1357
|
+
__decorate([
|
|
1358
|
+
profile,
|
|
1359
|
+
__metadata("design:type", Function),
|
|
1360
|
+
__metadata("design:paramtypes", []),
|
|
1361
|
+
__metadata("design:returntype", WebGLRenderbuffer)
|
|
1362
|
+
], WebGLRenderingContext.prototype, "createRenderbuffer", null);
|
|
1363
|
+
__decorate([
|
|
1364
|
+
profile,
|
|
1365
|
+
__metadata("design:type", Function),
|
|
1366
|
+
__metadata("design:paramtypes", [Number]),
|
|
1367
|
+
__metadata("design:returntype", WebGLShader)
|
|
1368
|
+
], WebGLRenderingContext.prototype, "createShader", null);
|
|
1369
|
+
__decorate([
|
|
1370
|
+
profile,
|
|
1371
|
+
__metadata("design:type", Function),
|
|
1372
|
+
__metadata("design:paramtypes", []),
|
|
1373
|
+
__metadata("design:returntype", WebGLTexture)
|
|
1374
|
+
], WebGLRenderingContext.prototype, "createTexture", null);
|
|
1375
|
+
__decorate([
|
|
1376
|
+
profile,
|
|
1377
|
+
__metadata("design:type", Function),
|
|
1378
|
+
__metadata("design:paramtypes", [Number]),
|
|
1379
|
+
__metadata("design:returntype", void 0)
|
|
1380
|
+
], WebGLRenderingContext.prototype, "cullFace", null);
|
|
1381
|
+
__decorate([
|
|
1382
|
+
profile,
|
|
1383
|
+
__metadata("design:type", Function),
|
|
1384
|
+
__metadata("design:paramtypes", [WebGLBuffer]),
|
|
1385
|
+
__metadata("design:returntype", void 0)
|
|
1386
|
+
], WebGLRenderingContext.prototype, "deleteBuffer", null);
|
|
1387
|
+
__decorate([
|
|
1388
|
+
profile,
|
|
1389
|
+
__metadata("design:type", Function),
|
|
1390
|
+
__metadata("design:paramtypes", [WebGLFramebuffer]),
|
|
1391
|
+
__metadata("design:returntype", void 0)
|
|
1392
|
+
], WebGLRenderingContext.prototype, "deleteFramebuffer", null);
|
|
1393
|
+
__decorate([
|
|
1394
|
+
profile,
|
|
1395
|
+
__metadata("design:type", Function),
|
|
1396
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1397
|
+
__metadata("design:returntype", void 0)
|
|
1398
|
+
], WebGLRenderingContext.prototype, "deleteProgram", null);
|
|
1399
|
+
__decorate([
|
|
1400
|
+
profile,
|
|
1401
|
+
__metadata("design:type", Function),
|
|
1402
|
+
__metadata("design:paramtypes", [WebGLRenderbuffer]),
|
|
1403
|
+
__metadata("design:returntype", void 0)
|
|
1404
|
+
], WebGLRenderingContext.prototype, "deleteRenderbuffer", null);
|
|
1405
|
+
__decorate([
|
|
1406
|
+
profile,
|
|
1407
|
+
__metadata("design:type", Function),
|
|
1408
|
+
__metadata("design:paramtypes", [WebGLRenderbuffer]),
|
|
1409
|
+
__metadata("design:returntype", void 0)
|
|
1410
|
+
], WebGLRenderingContext.prototype, "deleteShader", null);
|
|
1411
|
+
__decorate([
|
|
1412
|
+
profile,
|
|
1413
|
+
__metadata("design:type", Function),
|
|
1414
|
+
__metadata("design:paramtypes", [WebGLTexture]),
|
|
1415
|
+
__metadata("design:returntype", void 0)
|
|
1416
|
+
], WebGLRenderingContext.prototype, "deleteTexture", null);
|
|
1417
|
+
__decorate([
|
|
1418
|
+
profile,
|
|
1419
|
+
__metadata("design:type", Function),
|
|
1420
|
+
__metadata("design:paramtypes", [Number]),
|
|
1421
|
+
__metadata("design:returntype", void 0)
|
|
1422
|
+
], WebGLRenderingContext.prototype, "depthFunc", null);
|
|
1423
|
+
__decorate([
|
|
1424
|
+
profile,
|
|
1425
|
+
__metadata("design:type", Function),
|
|
1426
|
+
__metadata("design:paramtypes", [Boolean]),
|
|
1427
|
+
__metadata("design:returntype", void 0)
|
|
1428
|
+
], WebGLRenderingContext.prototype, "depthMask", null);
|
|
1429
|
+
__decorate([
|
|
1430
|
+
profile,
|
|
1431
|
+
__metadata("design:type", Function),
|
|
1432
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1433
|
+
__metadata("design:returntype", void 0)
|
|
1434
|
+
], WebGLRenderingContext.prototype, "depthRange", null);
|
|
1435
|
+
__decorate([
|
|
1436
|
+
profile,
|
|
1437
|
+
__metadata("design:type", Function),
|
|
1438
|
+
__metadata("design:paramtypes", [WebGLProgram, WebGLShader]),
|
|
1439
|
+
__metadata("design:returntype", void 0)
|
|
1440
|
+
], WebGLRenderingContext.prototype, "detachShader", null);
|
|
1441
|
+
__decorate([
|
|
1442
|
+
profile,
|
|
1443
|
+
__metadata("design:type", Function),
|
|
1444
|
+
__metadata("design:paramtypes", [Number]),
|
|
1445
|
+
__metadata("design:returntype", void 0)
|
|
1446
|
+
], WebGLRenderingContext.prototype, "disableVertexAttribArray", null);
|
|
1447
|
+
__decorate([
|
|
1448
|
+
profile,
|
|
1449
|
+
__metadata("design:type", Function),
|
|
1450
|
+
__metadata("design:paramtypes", [Number]),
|
|
1451
|
+
__metadata("design:returntype", void 0)
|
|
1452
|
+
], WebGLRenderingContext.prototype, "disable", null);
|
|
1453
|
+
__decorate([
|
|
1454
|
+
profile,
|
|
1455
|
+
__metadata("design:type", Function),
|
|
1456
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1457
|
+
__metadata("design:returntype", void 0)
|
|
1458
|
+
], WebGLRenderingContext.prototype, "drawArrays", null);
|
|
1459
|
+
__decorate([
|
|
1460
|
+
profile,
|
|
1461
|
+
__metadata("design:type", Function),
|
|
1462
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1463
|
+
__metadata("design:returntype", void 0)
|
|
1464
|
+
], WebGLRenderingContext.prototype, "drawElements", null);
|
|
1465
|
+
__decorate([
|
|
1466
|
+
profile,
|
|
1467
|
+
__metadata("design:type", Function),
|
|
1468
|
+
__metadata("design:paramtypes", [Number]),
|
|
1469
|
+
__metadata("design:returntype", void 0)
|
|
1470
|
+
], WebGLRenderingContext.prototype, "enableVertexAttribArray", null);
|
|
1471
|
+
__decorate([
|
|
1472
|
+
profile,
|
|
1473
|
+
__metadata("design:type", Function),
|
|
1474
|
+
__metadata("design:paramtypes", [Number]),
|
|
1475
|
+
__metadata("design:returntype", void 0)
|
|
1476
|
+
], WebGLRenderingContext.prototype, "enable", null);
|
|
1477
|
+
__decorate([
|
|
1478
|
+
profile,
|
|
1479
|
+
__metadata("design:type", Function),
|
|
1480
|
+
__metadata("design:paramtypes", []),
|
|
1481
|
+
__metadata("design:returntype", void 0)
|
|
1482
|
+
], WebGLRenderingContext.prototype, "finish", null);
|
|
1483
|
+
__decorate([
|
|
1484
|
+
profile,
|
|
1485
|
+
__metadata("design:type", Function),
|
|
1486
|
+
__metadata("design:paramtypes", []),
|
|
1487
|
+
__metadata("design:returntype", void 0)
|
|
1488
|
+
], WebGLRenderingContext.prototype, "flush", null);
|
|
1489
|
+
__decorate([
|
|
1490
|
+
profile,
|
|
1491
|
+
__metadata("design:type", Function),
|
|
1492
|
+
__metadata("design:paramtypes", [Number, Number, Number, WebGLRenderbuffer]),
|
|
1493
|
+
__metadata("design:returntype", void 0)
|
|
1494
|
+
], WebGLRenderingContext.prototype, "framebufferRenderbuffer", null);
|
|
1495
|
+
__decorate([
|
|
1496
|
+
profile,
|
|
1497
|
+
__metadata("design:type", Function),
|
|
1498
|
+
__metadata("design:paramtypes", [Number, Number, Number, WebGLTexture, Number]),
|
|
1499
|
+
__metadata("design:returntype", void 0)
|
|
1500
|
+
], WebGLRenderingContext.prototype, "framebufferTexture2D", null);
|
|
1501
|
+
__decorate([
|
|
1502
|
+
profile,
|
|
1503
|
+
__metadata("design:type", Function),
|
|
1504
|
+
__metadata("design:paramtypes", [Number]),
|
|
1505
|
+
__metadata("design:returntype", void 0)
|
|
1506
|
+
], WebGLRenderingContext.prototype, "frontFace", null);
|
|
1507
|
+
__decorate([
|
|
1508
|
+
profile,
|
|
1509
|
+
__metadata("design:type", Function),
|
|
1510
|
+
__metadata("design:paramtypes", [Number]),
|
|
1511
|
+
__metadata("design:returntype", void 0)
|
|
1512
|
+
], WebGLRenderingContext.prototype, "generateMipmap", null);
|
|
1513
|
+
__decorate([
|
|
1514
|
+
profile,
|
|
1515
|
+
__metadata("design:type", Function),
|
|
1516
|
+
__metadata("design:paramtypes", [WebGLProgram, Number]),
|
|
1517
|
+
__metadata("design:returntype", WebGLActiveInfo)
|
|
1518
|
+
], WebGLRenderingContext.prototype, "getActiveAttrib", null);
|
|
1519
|
+
__decorate([
|
|
1520
|
+
profile,
|
|
1521
|
+
__metadata("design:type", Function),
|
|
1522
|
+
__metadata("design:paramtypes", [WebGLProgram, Number]),
|
|
1523
|
+
__metadata("design:returntype", WebGLActiveInfo)
|
|
1524
|
+
], WebGLRenderingContext.prototype, "getActiveUniform", null);
|
|
1525
|
+
__decorate([
|
|
1526
|
+
profile,
|
|
1527
|
+
__metadata("design:type", Function),
|
|
1528
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1529
|
+
__metadata("design:returntype", Array)
|
|
1530
|
+
], WebGLRenderingContext.prototype, "getAttachedShaders", null);
|
|
1531
|
+
__decorate([
|
|
1532
|
+
profile,
|
|
1533
|
+
__metadata("design:type", Function),
|
|
1534
|
+
__metadata("design:paramtypes", [WebGLProgram, String]),
|
|
1535
|
+
__metadata("design:returntype", Number)
|
|
1536
|
+
], WebGLRenderingContext.prototype, "getAttribLocation", null);
|
|
1537
|
+
__decorate([
|
|
1538
|
+
profile,
|
|
1539
|
+
__metadata("design:type", Function),
|
|
1540
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1541
|
+
__metadata("design:returntype", Number)
|
|
1542
|
+
], WebGLRenderingContext.prototype, "getBufferParameter", null);
|
|
1543
|
+
__decorate([
|
|
1544
|
+
profile,
|
|
1545
|
+
__metadata("design:type", Function),
|
|
1546
|
+
__metadata("design:paramtypes", []),
|
|
1547
|
+
__metadata("design:returntype", Object)
|
|
1548
|
+
], WebGLRenderingContext.prototype, "getContextAttributes", null);
|
|
1549
|
+
__decorate([
|
|
1550
|
+
profile,
|
|
1551
|
+
__metadata("design:type", Function),
|
|
1552
|
+
__metadata("design:paramtypes", []),
|
|
1553
|
+
__metadata("design:returntype", Number)
|
|
1554
|
+
], WebGLRenderingContext.prototype, "getError", null);
|
|
1555
|
+
__decorate([
|
|
1556
|
+
profile,
|
|
1557
|
+
__metadata("design:type", Function),
|
|
1558
|
+
__metadata("design:paramtypes", [String]),
|
|
1559
|
+
__metadata("design:returntype", void 0)
|
|
1560
|
+
], WebGLRenderingContext.prototype, "getExtension", null);
|
|
1561
|
+
__decorate([
|
|
1562
|
+
profile,
|
|
1563
|
+
__metadata("design:type", Function),
|
|
1564
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1565
|
+
__metadata("design:returntype", Object)
|
|
1566
|
+
], WebGLRenderingContext.prototype, "getFramebufferAttachmentParameter", null);
|
|
1567
|
+
__decorate([
|
|
1568
|
+
profile,
|
|
1569
|
+
__metadata("design:type", Function),
|
|
1570
|
+
__metadata("design:paramtypes", [Number]),
|
|
1571
|
+
__metadata("design:returntype", Object)
|
|
1572
|
+
], WebGLRenderingContext.prototype, "getParameter", null);
|
|
1573
|
+
__decorate([
|
|
1574
|
+
profile,
|
|
1575
|
+
__metadata("design:type", Function),
|
|
1576
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1577
|
+
__metadata("design:returntype", String)
|
|
1578
|
+
], WebGLRenderingContext.prototype, "getProgramInfoLog", null);
|
|
1579
|
+
__decorate([
|
|
1580
|
+
profile,
|
|
1581
|
+
__metadata("design:type", Function),
|
|
1582
|
+
__metadata("design:paramtypes", [WebGLProgram, Number]),
|
|
1583
|
+
__metadata("design:returntype", Object)
|
|
1584
|
+
], WebGLRenderingContext.prototype, "getProgramParameter", null);
|
|
1585
|
+
__decorate([
|
|
1586
|
+
profile,
|
|
1587
|
+
__metadata("design:type", Function),
|
|
1588
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1589
|
+
__metadata("design:returntype", Number)
|
|
1590
|
+
], WebGLRenderingContext.prototype, "getRenderbufferParameter", null);
|
|
1591
|
+
__decorate([
|
|
1592
|
+
profile,
|
|
1593
|
+
__metadata("design:type", Function),
|
|
1594
|
+
__metadata("design:paramtypes", [WebGLShader]),
|
|
1595
|
+
__metadata("design:returntype", String)
|
|
1596
|
+
], WebGLRenderingContext.prototype, "getShaderInfoLog", null);
|
|
1597
|
+
__decorate([
|
|
1598
|
+
profile,
|
|
1599
|
+
__metadata("design:type", Function),
|
|
1600
|
+
__metadata("design:paramtypes", [WebGLShader, Number]),
|
|
1601
|
+
__metadata("design:returntype", Object)
|
|
1602
|
+
], WebGLRenderingContext.prototype, "getShaderParameter", null);
|
|
1603
|
+
__decorate([
|
|
1604
|
+
profile,
|
|
1605
|
+
__metadata("design:type", Function),
|
|
1606
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1607
|
+
__metadata("design:returntype", WebGLShaderPrecisionFormat)
|
|
1608
|
+
], WebGLRenderingContext.prototype, "getShaderPrecisionFormat", null);
|
|
1609
|
+
__decorate([
|
|
1610
|
+
profile,
|
|
1611
|
+
__metadata("design:type", Function),
|
|
1612
|
+
__metadata("design:paramtypes", [WebGLShader]),
|
|
1613
|
+
__metadata("design:returntype", String)
|
|
1614
|
+
], WebGLRenderingContext.prototype, "getShaderSource", null);
|
|
1615
|
+
__decorate([
|
|
1616
|
+
profile,
|
|
1617
|
+
__metadata("design:type", Function),
|
|
1618
|
+
__metadata("design:paramtypes", []),
|
|
1619
|
+
__metadata("design:returntype", Array)
|
|
1620
|
+
], WebGLRenderingContext.prototype, "getSupportedExtensions", null);
|
|
1621
|
+
__decorate([
|
|
1622
|
+
profile,
|
|
1623
|
+
__metadata("design:type", Function),
|
|
1624
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1625
|
+
__metadata("design:returntype", Number)
|
|
1626
|
+
], WebGLRenderingContext.prototype, "getTexParameter", null);
|
|
1627
|
+
__decorate([
|
|
1628
|
+
profile,
|
|
1629
|
+
__metadata("design:type", Function),
|
|
1630
|
+
__metadata("design:paramtypes", [WebGLProgram, String]),
|
|
1631
|
+
__metadata("design:returntype", WebGLUniformLocation)
|
|
1632
|
+
], WebGLRenderingContext.prototype, "getUniformLocation", null);
|
|
1633
|
+
__decorate([
|
|
1634
|
+
profile,
|
|
1635
|
+
__metadata("design:type", Function),
|
|
1636
|
+
__metadata("design:paramtypes", [WebGLProgram, WebGLUniformLocation]),
|
|
1637
|
+
__metadata("design:returntype", Object)
|
|
1638
|
+
], WebGLRenderingContext.prototype, "getUniform", null);
|
|
1639
|
+
__decorate([
|
|
1640
|
+
profile,
|
|
1641
|
+
__metadata("design:type", Function),
|
|
1642
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1643
|
+
__metadata("design:returntype", Number)
|
|
1644
|
+
], WebGLRenderingContext.prototype, "getVertexAttribOffset", null);
|
|
1645
|
+
__decorate([
|
|
1646
|
+
profile,
|
|
1647
|
+
__metadata("design:type", Function),
|
|
1648
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1649
|
+
__metadata("design:returntype", Object)
|
|
1650
|
+
], WebGLRenderingContext.prototype, "getVertexAttrib", null);
|
|
1651
|
+
__decorate([
|
|
1652
|
+
profile,
|
|
1653
|
+
__metadata("design:type", Function),
|
|
1654
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1655
|
+
__metadata("design:returntype", void 0)
|
|
1656
|
+
], WebGLRenderingContext.prototype, "hint", null);
|
|
1657
|
+
__decorate([
|
|
1658
|
+
profile,
|
|
1659
|
+
__metadata("design:type", Function),
|
|
1660
|
+
__metadata("design:paramtypes", [WebGLBuffer]),
|
|
1661
|
+
__metadata("design:returntype", Boolean)
|
|
1662
|
+
], WebGLRenderingContext.prototype, "isBuffer", null);
|
|
1663
|
+
__decorate([
|
|
1664
|
+
profile,
|
|
1665
|
+
__metadata("design:type", Function),
|
|
1666
|
+
__metadata("design:paramtypes", []),
|
|
1667
|
+
__metadata("design:returntype", Boolean)
|
|
1668
|
+
], WebGLRenderingContext.prototype, "isContextLost", null);
|
|
1669
|
+
__decorate([
|
|
1670
|
+
profile,
|
|
1671
|
+
__metadata("design:type", Function),
|
|
1672
|
+
__metadata("design:paramtypes", [Number]),
|
|
1673
|
+
__metadata("design:returntype", Boolean)
|
|
1674
|
+
], WebGLRenderingContext.prototype, "isEnabled", null);
|
|
1675
|
+
__decorate([
|
|
1676
|
+
profile,
|
|
1677
|
+
__metadata("design:type", Function),
|
|
1678
|
+
__metadata("design:paramtypes", [WebGLFramebuffer]),
|
|
1679
|
+
__metadata("design:returntype", Boolean)
|
|
1680
|
+
], WebGLRenderingContext.prototype, "isFramebuffer", null);
|
|
1681
|
+
__decorate([
|
|
1682
|
+
profile,
|
|
1683
|
+
__metadata("design:type", Function),
|
|
1684
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1685
|
+
__metadata("design:returntype", Boolean)
|
|
1686
|
+
], WebGLRenderingContext.prototype, "isProgram", null);
|
|
1687
|
+
__decorate([
|
|
1688
|
+
profile,
|
|
1689
|
+
__metadata("design:type", Function),
|
|
1690
|
+
__metadata("design:paramtypes", [WebGLRenderbuffer]),
|
|
1691
|
+
__metadata("design:returntype", Boolean)
|
|
1692
|
+
], WebGLRenderingContext.prototype, "isRenderbuffer", null);
|
|
1693
|
+
__decorate([
|
|
1694
|
+
profile,
|
|
1695
|
+
__metadata("design:type", Function),
|
|
1696
|
+
__metadata("design:paramtypes", [WebGLShader]),
|
|
1697
|
+
__metadata("design:returntype", Boolean)
|
|
1698
|
+
], WebGLRenderingContext.prototype, "isShader", null);
|
|
1699
|
+
__decorate([
|
|
1700
|
+
profile,
|
|
1701
|
+
__metadata("design:type", Function),
|
|
1702
|
+
__metadata("design:paramtypes", [WebGLTexture]),
|
|
1703
|
+
__metadata("design:returntype", Boolean)
|
|
1704
|
+
], WebGLRenderingContext.prototype, "isTexture", null);
|
|
1705
|
+
__decorate([
|
|
1706
|
+
profile,
|
|
1707
|
+
__metadata("design:type", Function),
|
|
1708
|
+
__metadata("design:paramtypes", [Number]),
|
|
1709
|
+
__metadata("design:returntype", void 0)
|
|
1710
|
+
], WebGLRenderingContext.prototype, "lineWidth", null);
|
|
1711
|
+
__decorate([
|
|
1712
|
+
profile,
|
|
1713
|
+
__metadata("design:type", Function),
|
|
1714
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1715
|
+
__metadata("design:returntype", void 0)
|
|
1716
|
+
], WebGLRenderingContext.prototype, "linkProgram", null);
|
|
1717
|
+
__decorate([
|
|
1718
|
+
profile,
|
|
1719
|
+
__metadata("design:type", Function),
|
|
1720
|
+
__metadata("design:paramtypes", [Number, Object]),
|
|
1721
|
+
__metadata("design:returntype", void 0)
|
|
1722
|
+
], WebGLRenderingContext.prototype, "pixelStorei", null);
|
|
1723
|
+
__decorate([
|
|
1724
|
+
profile,
|
|
1725
|
+
__metadata("design:type", Function),
|
|
1726
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1727
|
+
__metadata("design:returntype", void 0)
|
|
1728
|
+
], WebGLRenderingContext.prototype, "polygonOffset", null);
|
|
1729
|
+
__decorate([
|
|
1730
|
+
profile,
|
|
1731
|
+
__metadata("design:type", Function),
|
|
1732
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number, Object]),
|
|
1733
|
+
__metadata("design:returntype", void 0)
|
|
1734
|
+
], WebGLRenderingContext.prototype, "readPixels", null);
|
|
1735
|
+
__decorate([
|
|
1736
|
+
profile,
|
|
1737
|
+
__metadata("design:type", Function),
|
|
1738
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1739
|
+
__metadata("design:returntype", void 0)
|
|
1740
|
+
], WebGLRenderingContext.prototype, "renderbufferStorage", null);
|
|
1741
|
+
__decorate([
|
|
1742
|
+
profile,
|
|
1743
|
+
__metadata("design:type", Function),
|
|
1744
|
+
__metadata("design:paramtypes", [Number, Boolean]),
|
|
1745
|
+
__metadata("design:returntype", void 0)
|
|
1746
|
+
], WebGLRenderingContext.prototype, "sampleCoverage", null);
|
|
1747
|
+
__decorate([
|
|
1748
|
+
profile,
|
|
1749
|
+
__metadata("design:type", Function),
|
|
1750
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1751
|
+
__metadata("design:returntype", void 0)
|
|
1752
|
+
], WebGLRenderingContext.prototype, "scissor", null);
|
|
1753
|
+
__decorate([
|
|
1754
|
+
profile,
|
|
1755
|
+
__metadata("design:type", Function),
|
|
1756
|
+
__metadata("design:paramtypes", [WebGLShader, String]),
|
|
1757
|
+
__metadata("design:returntype", void 0)
|
|
1758
|
+
], WebGLRenderingContext.prototype, "shaderSource", null);
|
|
1759
|
+
__decorate([
|
|
1760
|
+
profile,
|
|
1761
|
+
__metadata("design:type", Function),
|
|
1762
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1763
|
+
__metadata("design:returntype", void 0)
|
|
1764
|
+
], WebGLRenderingContext.prototype, "stencilFuncSeparate", null);
|
|
1765
|
+
__decorate([
|
|
1766
|
+
profile,
|
|
1767
|
+
__metadata("design:type", Function),
|
|
1768
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1769
|
+
__metadata("design:returntype", void 0)
|
|
1770
|
+
], WebGLRenderingContext.prototype, "stencilFunc", null);
|
|
1771
|
+
__decorate([
|
|
1772
|
+
profile,
|
|
1773
|
+
__metadata("design:type", Function),
|
|
1774
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1775
|
+
__metadata("design:returntype", void 0)
|
|
1776
|
+
], WebGLRenderingContext.prototype, "stencilMaskSeparate", null);
|
|
1777
|
+
__decorate([
|
|
1778
|
+
profile,
|
|
1779
|
+
__metadata("design:type", Function),
|
|
1780
|
+
__metadata("design:paramtypes", [Number]),
|
|
1781
|
+
__metadata("design:returntype", void 0)
|
|
1782
|
+
], WebGLRenderingContext.prototype, "stencilMask", null);
|
|
1783
|
+
__decorate([
|
|
1784
|
+
profile,
|
|
1785
|
+
__metadata("design:type", Function),
|
|
1786
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1787
|
+
__metadata("design:returntype", void 0)
|
|
1788
|
+
], WebGLRenderingContext.prototype, "stencilOpSeparate", null);
|
|
1789
|
+
__decorate([
|
|
1790
|
+
profile,
|
|
1791
|
+
__metadata("design:type", Function),
|
|
1792
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1793
|
+
__metadata("design:returntype", void 0)
|
|
1794
|
+
], WebGLRenderingContext.prototype, "stencilOp", null);
|
|
1795
|
+
__decorate([
|
|
1796
|
+
profile,
|
|
1797
|
+
__metadata("design:type", Function),
|
|
1798
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object]),
|
|
1799
|
+
__metadata("design:returntype", void 0)
|
|
1800
|
+
], WebGLRenderingContext.prototype, "texImage2D", null);
|
|
1801
|
+
__decorate([
|
|
1802
|
+
profile,
|
|
1803
|
+
__metadata("design:type", Function),
|
|
1804
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1805
|
+
__metadata("design:returntype", void 0)
|
|
1806
|
+
], WebGLRenderingContext.prototype, "texParameterf", null);
|
|
1807
|
+
__decorate([
|
|
1808
|
+
profile,
|
|
1809
|
+
__metadata("design:type", Function),
|
|
1810
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1811
|
+
__metadata("design:returntype", void 0)
|
|
1812
|
+
], WebGLRenderingContext.prototype, "texParameteri", null);
|
|
1813
|
+
__decorate([
|
|
1814
|
+
profile,
|
|
1815
|
+
__metadata("design:type", Function),
|
|
1816
|
+
__metadata("design:paramtypes", [Object, Object, Object, Object, Object, Object, Object, Object, Object]),
|
|
1817
|
+
__metadata("design:returntype", void 0)
|
|
1818
|
+
], WebGLRenderingContext.prototype, "texSubImage2D", null);
|
|
1819
|
+
__decorate([
|
|
1820
|
+
profile,
|
|
1821
|
+
__metadata("design:type", Function),
|
|
1822
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number]),
|
|
1823
|
+
__metadata("design:returntype", void 0)
|
|
1824
|
+
], WebGLRenderingContext.prototype, "uniform1f", null);
|
|
1825
|
+
__decorate([
|
|
1826
|
+
profile,
|
|
1827
|
+
__metadata("design:type", Function),
|
|
1828
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1829
|
+
__metadata("design:returntype", void 0)
|
|
1830
|
+
], WebGLRenderingContext.prototype, "uniform1iv", null);
|
|
1831
|
+
__decorate([
|
|
1832
|
+
profile,
|
|
1833
|
+
__metadata("design:type", Function),
|
|
1834
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1835
|
+
__metadata("design:returntype", void 0)
|
|
1836
|
+
], WebGLRenderingContext.prototype, "uniform1fv", null);
|
|
1837
|
+
__decorate([
|
|
1838
|
+
profile,
|
|
1839
|
+
__metadata("design:type", Function),
|
|
1840
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number]),
|
|
1841
|
+
__metadata("design:returntype", void 0)
|
|
1842
|
+
], WebGLRenderingContext.prototype, "uniform1i", null);
|
|
1843
|
+
__decorate([
|
|
1844
|
+
profile,
|
|
1845
|
+
__metadata("design:type", Function),
|
|
1846
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number]),
|
|
1847
|
+
__metadata("design:returntype", void 0)
|
|
1848
|
+
], WebGLRenderingContext.prototype, "uniform2f", null);
|
|
1849
|
+
__decorate([
|
|
1850
|
+
profile,
|
|
1851
|
+
__metadata("design:type", Function),
|
|
1852
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1853
|
+
__metadata("design:returntype", void 0)
|
|
1854
|
+
], WebGLRenderingContext.prototype, "uniform2iv", null);
|
|
1855
|
+
__decorate([
|
|
1856
|
+
profile,
|
|
1857
|
+
__metadata("design:type", Function),
|
|
1858
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1859
|
+
__metadata("design:returntype", void 0)
|
|
1860
|
+
], WebGLRenderingContext.prototype, "uniform2fv", null);
|
|
1861
|
+
__decorate([
|
|
1862
|
+
profile,
|
|
1863
|
+
__metadata("design:type", Function),
|
|
1864
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number]),
|
|
1865
|
+
__metadata("design:returntype", void 0)
|
|
1866
|
+
], WebGLRenderingContext.prototype, "uniform2i", null);
|
|
1867
|
+
__decorate([
|
|
1868
|
+
profile,
|
|
1869
|
+
__metadata("design:type", Function),
|
|
1870
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number, Number]),
|
|
1871
|
+
__metadata("design:returntype", void 0)
|
|
1872
|
+
], WebGLRenderingContext.prototype, "uniform3f", null);
|
|
1873
|
+
__decorate([
|
|
1874
|
+
profile,
|
|
1875
|
+
__metadata("design:type", Function),
|
|
1876
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1877
|
+
__metadata("design:returntype", void 0)
|
|
1878
|
+
], WebGLRenderingContext.prototype, "uniform3iv", null);
|
|
1879
|
+
__decorate([
|
|
1880
|
+
profile,
|
|
1881
|
+
__metadata("design:type", Function),
|
|
1882
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1883
|
+
__metadata("design:returntype", void 0)
|
|
1884
|
+
], WebGLRenderingContext.prototype, "uniform3fv", null);
|
|
1885
|
+
__decorate([
|
|
1886
|
+
profile,
|
|
1887
|
+
__metadata("design:type", Function),
|
|
1888
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number, Number]),
|
|
1889
|
+
__metadata("design:returntype", void 0)
|
|
1890
|
+
], WebGLRenderingContext.prototype, "uniform3i", null);
|
|
1891
|
+
__decorate([
|
|
1892
|
+
profile,
|
|
1893
|
+
__metadata("design:type", Function),
|
|
1894
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number, Number, Number]),
|
|
1895
|
+
__metadata("design:returntype", void 0)
|
|
1896
|
+
], WebGLRenderingContext.prototype, "uniform4f", null);
|
|
1897
|
+
__decorate([
|
|
1898
|
+
profile,
|
|
1899
|
+
__metadata("design:type", Function),
|
|
1900
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1901
|
+
__metadata("design:returntype", void 0)
|
|
1902
|
+
], WebGLRenderingContext.prototype, "uniform4iv", null);
|
|
1903
|
+
__decorate([
|
|
1904
|
+
profile,
|
|
1905
|
+
__metadata("design:type", Function),
|
|
1906
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Array]),
|
|
1907
|
+
__metadata("design:returntype", void 0)
|
|
1908
|
+
], WebGLRenderingContext.prototype, "uniform4fv", null);
|
|
1909
|
+
__decorate([
|
|
1910
|
+
profile,
|
|
1911
|
+
__metadata("design:type", Function),
|
|
1912
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Number, Number, Number, Number]),
|
|
1913
|
+
__metadata("design:returntype", void 0)
|
|
1914
|
+
], WebGLRenderingContext.prototype, "uniform4i", null);
|
|
1915
|
+
__decorate([
|
|
1916
|
+
profile,
|
|
1917
|
+
__metadata("design:type", Function),
|
|
1918
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Boolean, Array]),
|
|
1919
|
+
__metadata("design:returntype", void 0)
|
|
1920
|
+
], WebGLRenderingContext.prototype, "uniformMatrix2fv", null);
|
|
1921
|
+
__decorate([
|
|
1922
|
+
profile,
|
|
1923
|
+
__metadata("design:type", Function),
|
|
1924
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Boolean, Array]),
|
|
1925
|
+
__metadata("design:returntype", void 0)
|
|
1926
|
+
], WebGLRenderingContext.prototype, "uniformMatrix3fv", null);
|
|
1927
|
+
__decorate([
|
|
1928
|
+
profile,
|
|
1929
|
+
__metadata("design:type", Function),
|
|
1930
|
+
__metadata("design:paramtypes", [WebGLUniformLocation, Boolean, Array]),
|
|
1931
|
+
__metadata("design:returntype", void 0)
|
|
1932
|
+
], WebGLRenderingContext.prototype, "uniformMatrix4fv", null);
|
|
1933
|
+
__decorate([
|
|
1934
|
+
profile,
|
|
1935
|
+
__metadata("design:type", Function),
|
|
1936
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1937
|
+
__metadata("design:returntype", void 0)
|
|
1938
|
+
], WebGLRenderingContext.prototype, "useProgram", null);
|
|
1939
|
+
__decorate([
|
|
1940
|
+
profile,
|
|
1941
|
+
__metadata("design:type", Function),
|
|
1942
|
+
__metadata("design:paramtypes", [WebGLProgram]),
|
|
1943
|
+
__metadata("design:returntype", void 0)
|
|
1944
|
+
], WebGLRenderingContext.prototype, "validateProgram", null);
|
|
1945
|
+
__decorate([
|
|
1946
|
+
profile,
|
|
1947
|
+
__metadata("design:type", Function),
|
|
1948
|
+
__metadata("design:paramtypes", [Number, Number]),
|
|
1949
|
+
__metadata("design:returntype", void 0)
|
|
1950
|
+
], WebGLRenderingContext.prototype, "vertexAttrib1f", null);
|
|
1951
|
+
__decorate([
|
|
1952
|
+
profile,
|
|
1953
|
+
__metadata("design:type", Function),
|
|
1954
|
+
__metadata("design:paramtypes", [Number, Array]),
|
|
1955
|
+
__metadata("design:returntype", void 0)
|
|
1956
|
+
], WebGLRenderingContext.prototype, "vertexAttrib1fv", null);
|
|
1957
|
+
__decorate([
|
|
1958
|
+
profile,
|
|
1959
|
+
__metadata("design:type", Function),
|
|
1960
|
+
__metadata("design:paramtypes", [Number, Number, Number]),
|
|
1961
|
+
__metadata("design:returntype", void 0)
|
|
1962
|
+
], WebGLRenderingContext.prototype, "vertexAttrib2f", null);
|
|
1963
|
+
__decorate([
|
|
1964
|
+
profile,
|
|
1965
|
+
__metadata("design:type", Function),
|
|
1966
|
+
__metadata("design:paramtypes", [Number, Array]),
|
|
1967
|
+
__metadata("design:returntype", void 0)
|
|
1968
|
+
], WebGLRenderingContext.prototype, "vertexAttrib2fv", null);
|
|
1969
|
+
__decorate([
|
|
1970
|
+
profile,
|
|
1971
|
+
__metadata("design:type", Function),
|
|
1972
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
1973
|
+
__metadata("design:returntype", void 0)
|
|
1974
|
+
], WebGLRenderingContext.prototype, "vertexAttrib3f", null);
|
|
1975
|
+
__decorate([
|
|
1976
|
+
profile,
|
|
1977
|
+
__metadata("design:type", Function),
|
|
1978
|
+
__metadata("design:paramtypes", [Number, Array]),
|
|
1979
|
+
__metadata("design:returntype", void 0)
|
|
1980
|
+
], WebGLRenderingContext.prototype, "vertexAttrib3fv", null);
|
|
1981
|
+
__decorate([
|
|
1982
|
+
profile,
|
|
1983
|
+
__metadata("design:type", Function),
|
|
1984
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number]),
|
|
1985
|
+
__metadata("design:returntype", void 0)
|
|
1986
|
+
], WebGLRenderingContext.prototype, "vertexAttrib4f", null);
|
|
1987
|
+
__decorate([
|
|
1988
|
+
profile,
|
|
1989
|
+
__metadata("design:type", Function),
|
|
1990
|
+
__metadata("design:paramtypes", [Number, Array]),
|
|
1991
|
+
__metadata("design:returntype", void 0)
|
|
1992
|
+
], WebGLRenderingContext.prototype, "vertexAttrib4fv", null);
|
|
1993
|
+
__decorate([
|
|
1994
|
+
profile,
|
|
1995
|
+
__metadata("design:type", Function),
|
|
1996
|
+
__metadata("design:paramtypes", [Number, Number, Number, Boolean, Number, Number]),
|
|
1997
|
+
__metadata("design:returntype", void 0)
|
|
1998
|
+
], WebGLRenderingContext.prototype, "vertexAttribPointer", null);
|
|
1999
|
+
__decorate([
|
|
2000
|
+
profile,
|
|
2001
|
+
__metadata("design:type", Function),
|
|
2002
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number]),
|
|
2003
|
+
__metadata("design:returntype", void 0)
|
|
2004
|
+
], WebGLRenderingContext.prototype, "viewport", null);
|
|
1687
2005
|
//# sourceMappingURL=index.android.js.map
|