فهرست منبع

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js into feature/shorthand-padding

Jordan Kintzle 4 سال پیش
والد
کامیت
3fa54c289c
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      Playground/src/components/rendererComponent.tsx

+ 2 - 1
Playground/src/components/rendererComponent.tsx

@@ -5,6 +5,7 @@ import { Nullable } from "babylonjs/types";
 import { Scene } from "babylonjs/scene";
 import { Scene } from "babylonjs/scene";
 import { Utilities } from "../tools/utilities";
 import { Utilities } from "../tools/utilities";
 import { DownloadManager } from "../tools/downloadManager";
 import { DownloadManager } from "../tools/downloadManager";
+import { WebGPUEngine } from "babylonjs";
 
 
 require("../scss/rendering.scss");
 require("../scss/rendering.scss");
 
 
@@ -94,7 +95,7 @@ export class RenderingComponent extends React.Component<IRenderingComponentProps
 
 
         const displayInspector = this._scene?.debugLayer.isVisible();
         const displayInspector = this._scene?.debugLayer.isVisible();
 
 
-        const useWebGPU = location.href.indexOf("webgpu") !== -1 ;
+        const useWebGPU = location.href.indexOf("webgpu") !== -1 && WebGPUEngine.IsSupported;
 
 
         if (this._engine) {
         if (this._engine) {
             try {
             try {