警告:“活动WebGL上下文过多。最旧的上下文将丢失”(WebGLRenderer.js)

问题描述 投票:0回答:1

在Autodesk Forge Viewer中,我无法在同一页面上实例化6个以上的查看器(Autodesk.Viewing.ViewingApplication)。

我已经尝试了此处提出的无效解决方案:There are too many active WebGL contexts on this page, the oldest context will be lost. [dedup.min.js]

我使用的功能:

Autodesk.Viewing.Initializer(options, function onInitialized(){
                this.viewerApp = new Autodesk.Viewing.ViewingApplication(this.div_id);
                this.viewerApp.registerViewer(this.viewerApp.k3D, Autodesk.Viewing.Private.GuiViewer3D, { extensions: ['PropertyInspectorExtension']});
                this.viewerApp.loadDocument(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
            }.bind(this));

[显然,可以使用Three.js来实现,但是可以在Autodesk Forge中实现吗?否则我自己不知道该怎么做。

*答案:Display multiple instances of three.js in a single pageIs it possible to enable unbounded number of renderers in THREE.js?

*结果示例:https://threejs.org/examples/webgl_multiple_elements.html

webgl autodesk-viewer
1个回答
0
投票

我知道这是一种解决方法,但是您可以在Chrome中使用此命令行开关:

© www.soinside.com 2019 - 2024. All rights reserved.