瀏覽代碼

Check the passed geometryBufferRenderer before set it to this._geometryBufferRenderer

Xu Chen 7 年之前
父節點
當前提交
839cdad619
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/babylon.scene.ts

+ 1 - 2
src/babylon.scene.ts

@@ -934,8 +934,7 @@
             return this._geometryBufferRenderer;
         }
         public set geometryBufferRenderer(geometryBufferRenderer: Nullable<GeometryBufferRenderer>) {
-            this._geometryBufferRenderer = geometryBufferRenderer;
-            if (this._geometryBufferRenderer && !this._geometryBufferRenderer.isSupported) {
+            if (geometryBufferRenderer && geometryBufferRenderer.isSupported) {
                 this._geometryBufferRenderer = null;
             }
         }