فهرست منبع

WebGPURenderer: Remove swapChain term. (#23213)

Michael Herzog 3 سال پیش
والد
کامیت
e78d9ce109
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      examples/jsm/renderers/webgpu/WebGPURenderer.js

+ 3 - 5
examples/jsm/renderers/webgpu/WebGPURenderer.js

@@ -92,7 +92,6 @@ class WebGPURenderer {
 		this._adapter = null;
 		this._device = null;
 		this._context = null;
-		this._swapChain = null;
 		this._colorBuffer = null;
 		this._depthBuffer = null;
 
@@ -166,15 +165,14 @@ class WebGPURenderer {
 
 		const context = ( parameters.context !== undefined ) ? parameters.context : this.domElement.getContext( 'webgpu' );
 
-		const swapChain = context.configure( {
+		context.configure( {
 			device: device,
-			format: GPUTextureFormat.BGRA8Unorm // this is the only valid swap chain format right now (r121)
+			format: GPUTextureFormat.BGRA8Unorm // this is the only valid context format right now (r121)
 		} );
 
 		this._adapter = adapter;
 		this._device = device;
 		this._context = context;
-		this._swapChain = swapChain;
 
 		this._info = new WebGPUInfo();
 		this._properties = new WebGPUProperties();
@@ -489,7 +487,7 @@ class WebGPURenderer {
 
 		} else {
 
-			format = GPUTextureFormat.BGRA8Unorm; // default swap chain format
+			format = GPUTextureFormat.BGRA8Unorm; // default context format
 
 		}