Skip to content

Commit 5468138

Browse files
authored
RawTexture: Rename to ExternalTexture. (#31543)
1 parent a0daeb5 commit 5468138

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/renderers/webgl/WebGLTextures.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
515515

516516
if ( texture.isVideoTexture ) updateVideoTexture( texture );
517517

518-
if ( texture.isRenderTargetTexture === false && texture.isRawTexture !== true && texture.version > 0 && textureProperties.__version !== texture.version ) {
518+
if ( texture.isRenderTargetTexture === false && texture.isExternalTexture !== true && texture.version > 0 && textureProperties.__version !== texture.version ) {
519519

520520
const image = texture.image;
521521

@@ -534,7 +534,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
534534

535535
}
536536

537-
} else if ( texture.isRawTexture ) {
537+
} else if ( texture.isExternalTexture ) {
538538

539539
textureProperties.__webglTexture = texture.sourceTexture ? texture.sourceTexture : null;
540540

src/renderers/webxr/WebXRDepthSensing.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PlaneGeometry } from '../../geometries/PlaneGeometry.js';
22
import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
33
import { Mesh } from '../../objects/Mesh.js';
4-
import { RawTexture } from '../../textures/RawTexture.js';
4+
import { ExternalTexture } from '../../textures/ExternalTexture.js';
55

66
const _occlusion_vertex = `
77
void main() {
@@ -44,7 +44,7 @@ class WebXRDepthSensing {
4444
/**
4545
* An opaque texture representing the depth of the user's environment.
4646
*
47-
* @type {?RawTexture}
47+
* @type {?ExternalTexture}
4848
*/
4949
this.texture = null;
5050

@@ -81,7 +81,7 @@ class WebXRDepthSensing {
8181

8282
if ( this.texture === null ) {
8383

84-
const texture = new RawTexture( depthData.texture );
84+
const texture = new ExternalTexture( depthData.texture );
8585

8686
if ( ( depthData.depthNear !== renderState.depthNear ) || ( depthData.depthFar !== renderState.depthFar ) ) {
8787

@@ -142,7 +142,7 @@ class WebXRDepthSensing {
142142
/**
143143
* Returns a texture representing the depth of the user's environment.
144144
*
145-
* @return {?RawTexture} The depth texture.
145+
* @return {?ExternalTexture} The depth texture.
146146
*/
147147
getDepthTexture() {
148148

src/renderers/webxr/WebXRManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { WebGLAnimation } from '../webgl/WebGLAnimation.js';
99
import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
1010
import { WebXRController } from './WebXRController.js';
1111
import { DepthTexture } from '../../textures/DepthTexture.js';
12-
import { RawTexture } from '../../textures/RawTexture.js';
12+
import { ExternalTexture } from '../../textures/ExternalTexture.js';
1313
import { DepthFormat, DepthStencilFormat, RGBAFormat, UnsignedByteType, UnsignedIntType, UnsignedInt248Type } from '../../constants.js';
1414
import { WebXRDepthSensing } from './WebXRDepthSensing.js';
1515

@@ -1023,7 +1023,7 @@ class WebXRManager extends EventDispatcher {
10231023

10241024
if ( ! cameraTex ) {
10251025

1026-
cameraTex = new RawTexture();
1026+
cameraTex = new ExternalTexture();
10271027
cameraAccessTextures[ camera ] = cameraTex;
10281028

10291029
}

src/textures/RawTexture.js renamed to src/textures/ExternalTexture.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { Texture } from './Texture.js';
1010
*
1111
* @augments Texture
1212
*/
13-
class RawTexture extends Texture {
13+
class ExternalTexture extends Texture {
1414

1515
/**
1616
* Creates a new raw texture.
@@ -36,10 +36,10 @@ class RawTexture extends Texture {
3636
* @readonly
3737
* @default true
3838
*/
39-
this.isRawTexture = true;
39+
this.isExternalTexture = true;
4040

4141
}
4242

4343
}
4444

45-
export { RawTexture };
45+
export { ExternalTexture };

0 commit comments

Comments
 (0)