@luma.gl/webgl 9.1.0-alpha.13 → 9.1.0-alpha.14
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/dist/adapter/resources/webgl-framebuffer.d.ts +30 -30
- package/dist/adapter/resources/webgl-framebuffer.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-framebuffer.js +30 -30
- package/dist/adapter/resources/webgl-texture.d.ts.map +1 -1
- package/dist/adapter/resources/webgl-texture.js +1 -0
- package/dist/adapter/webgl-device.d.ts +2 -1
- package/dist/adapter/webgl-device.d.ts.map +1 -1
- package/dist/adapter/webgl-device.js +1 -2
- package/dist/dist.dev.js +2 -32
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +2 -32
- package/dist/index.cjs.map +2 -2
- package/package.json +3 -3
- package/src/adapter/resources/webgl-framebuffer.ts +31 -31
- package/src/adapter/resources/webgl-texture.ts +2 -0
- package/src/adapter/webgl-device.ts +1 -2
|
@@ -18,36 +18,6 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
18
18
|
protected updateAttachments(): void;
|
|
19
19
|
/** In WebGL we must use renderbuffers for depth/stencil attachments (unless we have extensions) */
|
|
20
20
|
protected createDepthStencilTexture(format: TextureFormat): Texture;
|
|
21
|
-
/**
|
|
22
|
-
* Attachment resize is expected to be a noop if size is same
|
|
23
|
-
*
|
|
24
|
-
protected override resizeAttachments(width: number, height: number): this {
|
|
25
|
-
// for default framebuffer, just update the stored size
|
|
26
|
-
if (this.handle === null) {
|
|
27
|
-
// assert(width === undefined && height === undefined);
|
|
28
|
-
this.width = this.gl.drawingBufferWidth;
|
|
29
|
-
this.height = this.gl.drawingBufferHeight;
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (width === undefined) {
|
|
34
|
-
width = this.gl.drawingBufferWidth;
|
|
35
|
-
}
|
|
36
|
-
if (height === undefined) {
|
|
37
|
-
height = this.gl.drawingBufferHeight;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// TODO Not clear that this is better than default destroy/create implementation
|
|
41
|
-
|
|
42
|
-
for (const colorAttachment of this.colorAttachments) {
|
|
43
|
-
colorAttachment.texture.clone({width, height});
|
|
44
|
-
}
|
|
45
|
-
if (this.depthStencilAttachment) {
|
|
46
|
-
this.depthStencilAttachment.texture.resize({width, height});
|
|
47
|
-
}
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
*/
|
|
51
21
|
/**
|
|
52
22
|
* @param attachment
|
|
53
23
|
* @param texture
|
|
@@ -56,4 +26,34 @@ export declare class WEBGLFramebuffer extends Framebuffer {
|
|
|
56
26
|
*/
|
|
57
27
|
protected _attachTextureView(attachment: GL, textureView: WEBGLTextureView): void;
|
|
58
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Attachment resize is expected to be a noop if size is same
|
|
31
|
+
*
|
|
32
|
+
protected override resizeAttachments(width: number, height: number): this {
|
|
33
|
+
// for default framebuffer, just update the stored size
|
|
34
|
+
if (this.handle === null) {
|
|
35
|
+
// assert(width === undefined && height === undefined);
|
|
36
|
+
this.width = this.gl.drawingBufferWidth;
|
|
37
|
+
this.height = this.gl.drawingBufferHeight;
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (width === undefined) {
|
|
42
|
+
width = this.gl.drawingBufferWidth;
|
|
43
|
+
}
|
|
44
|
+
if (height === undefined) {
|
|
45
|
+
height = this.gl.drawingBufferHeight;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// TODO Not clear that this is better than default destroy/create implementation
|
|
49
|
+
|
|
50
|
+
for (const colorAttachment of this.colorAttachments) {
|
|
51
|
+
colorAttachment.texture.clone({width, height});
|
|
52
|
+
}
|
|
53
|
+
if (this.depthStencilAttachment) {
|
|
54
|
+
this.depthStencilAttachment.texture.resize({width, height});
|
|
55
|
+
}
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
*/
|
|
59
59
|
//# sourceMappingURL=webgl-framebuffer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,OAAO,EAAC,gBAAgB,EAAC,gCAA6B;AAGtD,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAEzD,iDAAiD;AACjD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IAEzB,gBAAgB,EAAE,gBAAgB,EAAE,CAAM;IAC1C,sBAAsB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;gBAE3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB;IAsBxD,+CAA+C;IACtC,OAAO,IAAI,IAAI;IAQxB,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAsCnC,mGAAmG;cAChF,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAW5E
|
|
1
|
+
{"version":3,"file":"webgl-framebuffer.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-framebuffer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAE,aAAa,EAAC,MAAM,eAAe,CAAC;AACnE,OAAO,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,EAAE,EAAC,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAC5C,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,OAAO,EAAC,gBAAgB,EAAC,gCAA6B;AAGtD,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAEzD,iDAAiD;AACjD,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,WAAW,CAAC;IACpB,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,gBAAgB,CAAC;IAEzB,gBAAgB,EAAE,gBAAgB,EAAE,CAAM;IAC1C,sBAAsB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;gBAE3C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB;IAsBxD,+CAA+C;IACtC,OAAO,IAAI,IAAI;IAQxB,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAsCnC,mGAAmG;cAChF,yBAAyB,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO;IAW5E;;;;;OAKG;IACH,SAAS,CAAC,kBAAkB,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,EAAE,gBAAgB,GAAG,IAAI;CA8BlF;AAqCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BE"}
|
|
@@ -74,36 +74,6 @@ export class WEBGLFramebuffer extends Framebuffer {
|
|
|
74
74
|
mipmaps: false
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Attachment resize is expected to be a noop if size is same
|
|
79
|
-
*
|
|
80
|
-
protected override resizeAttachments(width: number, height: number): this {
|
|
81
|
-
// for default framebuffer, just update the stored size
|
|
82
|
-
if (this.handle === null) {
|
|
83
|
-
// assert(width === undefined && height === undefined);
|
|
84
|
-
this.width = this.gl.drawingBufferWidth;
|
|
85
|
-
this.height = this.gl.drawingBufferHeight;
|
|
86
|
-
return this;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (width === undefined) {
|
|
90
|
-
width = this.gl.drawingBufferWidth;
|
|
91
|
-
}
|
|
92
|
-
if (height === undefined) {
|
|
93
|
-
height = this.gl.drawingBufferHeight;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// TODO Not clear that this is better than default destroy/create implementation
|
|
97
|
-
|
|
98
|
-
for (const colorAttachment of this.colorAttachments) {
|
|
99
|
-
colorAttachment.texture.clone({width, height});
|
|
100
|
-
}
|
|
101
|
-
if (this.depthStencilAttachment) {
|
|
102
|
-
this.depthStencilAttachment.texture.resize({width, height});
|
|
103
|
-
}
|
|
104
|
-
return this;
|
|
105
|
-
}
|
|
106
|
-
*/
|
|
107
77
|
/**
|
|
108
78
|
* @param attachment
|
|
109
79
|
* @param texture
|
|
@@ -167,3 +137,33 @@ function _getFrameBufferStatus(status) {
|
|
|
167
137
|
return `${status}`;
|
|
168
138
|
}
|
|
169
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Attachment resize is expected to be a noop if size is same
|
|
142
|
+
*
|
|
143
|
+
protected override resizeAttachments(width: number, height: number): this {
|
|
144
|
+
// for default framebuffer, just update the stored size
|
|
145
|
+
if (this.handle === null) {
|
|
146
|
+
// assert(width === undefined && height === undefined);
|
|
147
|
+
this.width = this.gl.drawingBufferWidth;
|
|
148
|
+
this.height = this.gl.drawingBufferHeight;
|
|
149
|
+
return this;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
if (width === undefined) {
|
|
153
|
+
width = this.gl.drawingBufferWidth;
|
|
154
|
+
}
|
|
155
|
+
if (height === undefined) {
|
|
156
|
+
height = this.gl.drawingBufferHeight;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// TODO Not clear that this is better than default destroy/create implementation
|
|
160
|
+
|
|
161
|
+
for (const colorAttachment of this.colorAttachments) {
|
|
162
|
+
colorAttachment.texture.clone({width, height});
|
|
163
|
+
}
|
|
164
|
+
if (this.depthStencilAttachment) {
|
|
165
|
+
this.depthStencilAttachment.texture.resize({width, height});
|
|
166
|
+
}
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-texture.d.ts","sourceRoot":"","sources":["../../../src/adapter/resources/webgl-texture.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,YAAY,EAGZ,eAAe,EACf,aAAa,EAEb,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAC,OAAO,EAAM,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,EAAE,EACF,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EAAC,WAAW,EAAC,2BAAwB;AAE5C,OAAO,EAAC,YAAY,EAAC,2BAAwB;AAC7C,OAAO,EAAC,gBAAgB,EAAC,gCAA6B;AA2CtD;;GAEG;AACH,qBAAa,YAAa,SAAQ,OAAO;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,EAAE,EAAE,sBAAsB,CAAC;IACpC,MAAM,EAAE,YAAY,CAAC;IAErB,OAAO,EAAE,YAAY,CAAa;IAClC,IAAI,EAAE,gBAAgB,CAAa;IAEnC,OAAO,EAAE,OAAO,CAAS;IAEzB;;;;;;;OAOG;IACH,QAAQ,EAAE,eAAe,CAAC;IAI1B,uDAAuD;IACvD,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,uDAAuD;IACvD,MAAM,EAAE,WAAW,CAAC;IACpB,8EAA8E;IAC9E,gBAAgB,EAAE,EAAE,CAAC;IACrB,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC;IAWpB,2BAA2B;IAC3B,WAAW,EAAE,MAAM,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AAA;KAAC;IAsCnC,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAI3C,2BAA2B;IAC3B,gBAAgB,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,SAAI,GAAG,IAAI;IAmBzD;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAW3C;;;;;OAKG;IACH,kBAAkB,CAAC,IAAI,EAAE,eAAe,EAAE,KAAK,GAAE,MAAU,GAAG,IAAI;IASlE;;;OAGG;IACH,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAOjD;;;OAGG;IACH,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI;IAIzD,sBAAsB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,GAAE,MAAU,GAAG,IAAI;IAgB9F,8CAA8C;IAC9C,mBAAmB,CAAC,OAAO,KAAA,GAAG,IAAI;IAkClC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC;IAarE;;OAEG;IACH,qBAAqB,CAAC,UAAU,EAAE,mBAAmB,GAAG,IAAI;IAkG5D;;;OAGG;IACH,SAAS,CAAC,YAAY,CACpB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,aAAa,EAC1B,QAAQ,GAAE,EAAkB;IAgC9B,aAAa,IAAI,MAAM;IAIvB,IAAI,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM;IAYlC,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAWjD"}
|
|
@@ -89,6 +89,7 @@ export class WEBGLTexture extends Texture {
|
|
|
89
89
|
/** For automatically updating video */
|
|
90
90
|
_video = null;
|
|
91
91
|
constructor(device, props) {
|
|
92
|
+
props = Texture._fixProps(props);
|
|
92
93
|
// Note: Clear out `props.data` so that we don't hold a reference to any big memory chunks
|
|
93
94
|
super(device, { ...Texture.defaultProps, ...props, data: undefined });
|
|
94
95
|
this.device = device;
|
|
@@ -10,6 +10,7 @@ import type { BufferProps, ShaderProps, SamplerProps, TextureProps, ExternalText
|
|
|
10
10
|
import { WEBGLBuffer } from "./resources/webgl-buffer.js";
|
|
11
11
|
import { WEBGLShader } from "./resources/webgl-shader.js";
|
|
12
12
|
import { WEBGLSampler } from "./resources/webgl-sampler.js";
|
|
13
|
+
import { WEBGLTexture } from "./resources/webgl-texture.js";
|
|
13
14
|
import { WEBGLFramebuffer } from "./resources/webgl-framebuffer.js";
|
|
14
15
|
import { WEBGLRenderPass } from "./resources/webgl-render-pass.js";
|
|
15
16
|
import { WEBGLRenderPipeline } from "./resources/webgl-render-pipeline.js";
|
|
@@ -57,7 +58,7 @@ export declare class WebGLDevice extends Device {
|
|
|
57
58
|
isTextureFormatRenderable(format: TextureFormat): boolean;
|
|
58
59
|
createCanvasContext(props?: CanvasContextProps): CanvasContext;
|
|
59
60
|
createBuffer(props: BufferProps | ArrayBuffer | ArrayBufferView): WEBGLBuffer;
|
|
60
|
-
|
|
61
|
+
createTexture(props: TextureProps): WEBGLTexture;
|
|
61
62
|
createExternalTexture(props: ExternalTextureProps): ExternalTexture;
|
|
62
63
|
createSampler(props: SamplerProps): WEBGLSampler;
|
|
63
64
|
createShader(props: ShaderProps): WEBGLShader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webgl-device.d.ts","sourceRoot":"","sources":["../../src/adapter/webgl-device.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,MAAM,EACN,OAAO,EACP,WAAW,EACX,WAAW,EACX,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC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,KAAK,CAAC,EAAE,GAAG,CAAC;QACZ,OAAO,CAAC,EAAE,GAAG,CAAC;KACf,GAAG,IAAI;IAIC,UAAU,IAAI,IAAI;IAS3B;;;OAGG;IACM,UAAU,IAAI,OAAO;IAgB9B,8DAA8D;IAC9D,SAAS,IAAI,IAAI;IAKjB,8CAA8C;IAC9C,QAAQ,IAAI,IAAI;IAKhB;;;OAGG;IACH,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAMlE;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,sBAAsB,GAAG,MAAM;IAc7D,sBAAsB;IACtB,UAAU,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC;IAElC;;;;;OAKG;IACH,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI;IA2BvE,gDAAgD;IAChD,YAAY,CAAC,IAAI,EAAE,MAAM,YAAY,GAAG,YAAY;CAIrD"}
|
|
@@ -134,8 +134,7 @@ export class WebGLDevice extends Device {
|
|
|
134
134
|
const newProps = this._getBufferProps(props);
|
|
135
135
|
return new WEBGLBuffer(this, newProps);
|
|
136
136
|
}
|
|
137
|
-
|
|
138
|
-
_createTexture(props) {
|
|
137
|
+
createTexture(props) {
|
|
139
138
|
return new WEBGLTexture(this, props);
|
|
140
139
|
}
|
|
141
140
|
createExternalTexture(props) {
|
package/dist/dist.dev.js
CHANGED
|
@@ -2897,6 +2897,7 @@ var __exports__ = (() => {
|
|
|
2897
2897
|
/** For automatically updating video */
|
|
2898
2898
|
_video = null;
|
|
2899
2899
|
constructor(device, props) {
|
|
2900
|
+
props = import_core8.Texture._fixProps(props);
|
|
2900
2901
|
super(device, { ...import_core8.Texture.defaultProps, ...props, data: void 0 });
|
|
2901
2902
|
this.device = device;
|
|
2902
2903
|
this.gl = this.device.gl;
|
|
@@ -3374,36 +3375,6 @@ var __exports__ = (() => {
|
|
|
3374
3375
|
mipmaps: false
|
|
3375
3376
|
});
|
|
3376
3377
|
}
|
|
3377
|
-
/**
|
|
3378
|
-
* Attachment resize is expected to be a noop if size is same
|
|
3379
|
-
*
|
|
3380
|
-
protected override resizeAttachments(width: number, height: number): this {
|
|
3381
|
-
// for default framebuffer, just update the stored size
|
|
3382
|
-
if (this.handle === null) {
|
|
3383
|
-
// assert(width === undefined && height === undefined);
|
|
3384
|
-
this.width = this.gl.drawingBufferWidth;
|
|
3385
|
-
this.height = this.gl.drawingBufferHeight;
|
|
3386
|
-
return this;
|
|
3387
|
-
}
|
|
3388
|
-
|
|
3389
|
-
if (width === undefined) {
|
|
3390
|
-
width = this.gl.drawingBufferWidth;
|
|
3391
|
-
}
|
|
3392
|
-
if (height === undefined) {
|
|
3393
|
-
height = this.gl.drawingBufferHeight;
|
|
3394
|
-
}
|
|
3395
|
-
|
|
3396
|
-
// TODO Not clear that this is better than default destroy/create implementation
|
|
3397
|
-
|
|
3398
|
-
for (const colorAttachment of this.colorAttachments) {
|
|
3399
|
-
colorAttachment.texture.clone({width, height});
|
|
3400
|
-
}
|
|
3401
|
-
if (this.depthStencilAttachment) {
|
|
3402
|
-
this.depthStencilAttachment.texture.resize({width, height});
|
|
3403
|
-
}
|
|
3404
|
-
return this;
|
|
3405
|
-
}
|
|
3406
|
-
*/
|
|
3407
3378
|
/**
|
|
3408
3379
|
* @param attachment
|
|
3409
3380
|
* @param texture
|
|
@@ -5863,8 +5834,7 @@ ${source2}`;
|
|
|
5863
5834
|
const newProps = this._getBufferProps(props);
|
|
5864
5835
|
return new WEBGLBuffer(this, newProps);
|
|
5865
5836
|
}
|
|
5866
|
-
|
|
5867
|
-
_createTexture(props) {
|
|
5837
|
+
createTexture(props) {
|
|
5868
5838
|
return new WEBGLTexture(this, props);
|
|
5869
5839
|
}
|
|
5870
5840
|
createExternalTexture(props) {
|