From 525d9b52fe845529fa336ba160e1b7732e417383 Mon Sep 17 00:00:00 2001 From: Tom Date: Thu, 18 Jan 2024 13:47:14 -0500 Subject: [PATCH] more test details logged --- src/webgldrawer.js | 2 +- test/modules/viewport.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/webgldrawer.js b/src/webgldrawer.js index 309d247b..fde11a9d 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -281,7 +281,7 @@ if(maxTextures <= 0){ this._numGlMaxTextureErrors += 1; $.console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`); - console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`); + console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures}), total errors = ${this._numGlMaxTextureErrors}`); return; } else { this._numGlMaxTextureOks += 1; diff --git a/test/modules/viewport.js b/test/modules/viewport.js index 995447bd..47573ede 100644 --- a/test/modules/viewport.js +++ b/test/modules/viewport.js @@ -8,7 +8,7 @@ var SPRING_STIFFNESS = 100; // Faster animation = faster tests var EPSILON = 0.0000000001; - QUnit.module("viewport", { + QUnit.module.only("viewport", { beforeEach: function () { $('
').appendTo("#qunit-fixture"); @@ -22,6 +22,17 @@ }, afterEach: function () { if (viewer){ + let drawers = [viewer.drawer, viewer.navigator && viewer.navigator.drawer]; + for(const drawer of drawers){ + if(!drawer){ + return; + } + let errors = drawer._numGlMaxTextureErrors; + let ok = drawer._numGlMaxTextureErrors; + errors === 0 ? console.log('No GL errors') : errors ? console.log(`GL errors: ${errors}`) : null; + ok === 0 ? console.log('No GL calls') : ok ? console.log(`GL calls: ${ok}`) : null; + } + viewer.destroy(); }