Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/renderers/webgl/WebGLTextures.js
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,

if ( texture.isVideoTexture ) updateVideoTexture( texture );

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

const image = texture.image;

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

}

} else if ( texture.isRawTexture ) {
} else if ( texture.isExternalTexture ) {

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

Expand Down
8 changes: 4 additions & 4 deletions src/renderers/webxr/WebXRDepthSensing.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PlaneGeometry } from '../../geometries/PlaneGeometry.js';
import { ShaderMaterial } from '../../materials/ShaderMaterial.js';
import { Mesh } from '../../objects/Mesh.js';
import { RawTexture } from '../../textures/RawTexture.js';
import { ExternalTexture } from '../../textures/ExternalTexture.js';

const _occlusion_vertex = `
void main() {
Expand Down Expand Up @@ -44,7 +44,7 @@ class WebXRDepthSensing {
/**
* An opaque texture representing the depth of the user's environment.
*
* @type {?RawTexture}
* @type {?ExternalTexture}
*/
this.texture = null;

Expand Down Expand Up @@ -81,7 +81,7 @@ class WebXRDepthSensing {

if ( this.texture === null ) {

const texture = new RawTexture( depthData.texture );
const texture = new ExternalTexture( depthData.texture );

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

Expand Down Expand Up @@ -142,7 +142,7 @@ class WebXRDepthSensing {
/**
* Returns a texture representing the depth of the user's environment.
*
* @return {?RawTexture} The depth texture.
* @return {?ExternalTexture} The depth texture.
*/
getDepthTexture() {

Expand Down
4 changes: 2 additions & 2 deletions src/renderers/webxr/WebXRManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { WebGLAnimation } from '../webgl/WebGLAnimation.js';
import { WebGLRenderTarget } from '../WebGLRenderTarget.js';
import { WebXRController } from './WebXRController.js';
import { DepthTexture } from '../../textures/DepthTexture.js';
import { RawTexture } from '../../textures/RawTexture.js';
import { ExternalTexture } from '../../textures/ExternalTexture.js';
import { DepthFormat, DepthStencilFormat, RGBAFormat, UnsignedByteType, UnsignedIntType, UnsignedInt248Type } from '../../constants.js';
import { WebXRDepthSensing } from './WebXRDepthSensing.js';

Expand Down Expand Up @@ -1023,7 +1023,7 @@ class WebXRManager extends EventDispatcher {

if ( ! cameraTex ) {

cameraTex = new RawTexture();
cameraTex = new ExternalTexture();
cameraAccessTextures[ camera ] = cameraTex;

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Texture } from './Texture.js';
*
* @augments Texture
*/
class RawTexture extends Texture {
class ExternalTexture extends Texture {

/**
* Creates a new raw texture.
Expand All @@ -36,10 +36,10 @@ class RawTexture extends Texture {
* @readonly
* @default true
*/
this.isRawTexture = true;
this.isExternalTexture = true;

}

}

export { RawTexture };
export { ExternalTexture };