Autodesk-Forge/forge-bim360-issues

Switching loading models will throw many errors of __webglFramebuffer in console

Closed this issue · 1 comments

After loading first model, when switching loading models will throw many errors of __webglFramebuffer in console. The solution of the SO article can work:
https://stackoverflow.com/questions/45354065/getting-webgl-error-in-autodesk-viewer

e.g. what I modified is:

`function launchViewer(urn) {
if (viewerApp != null) {
var thisviewer = viewerApp.getCurrentViewer();
if (thisviewer) {
thisviewer.tearDown()
thisviewer.finish()
thisviewer = null
$("#forgeViewer").empty();
}
}

var options = {
env: 'AutodeskProduction',
getAccessToken: getForgeToken
};
var documentId = 'urn:' + urn;
Autodesk.Viewing.Initializer(options, function onInitialized() {
viewerApp = new Autodesk.Viewing.ViewingApplication('forgeViewer');
viewerApp.registerViewer(viewerApp.k3D, Autodesk.Viewing.Private.GuiViewer3D, { extensions: ['BIM360IssueExtension'] });
viewerApp.loadDocument(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
});
}`

thanks, I'll fix that on the tutorial code (which I reused here)