mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
add logging of gl max_texture_image_units errors to multi-image test
This commit is contained in:
parent
b902256a59
commit
db11611d7d
@ -89,6 +89,10 @@
|
||||
this._setupRenderer();
|
||||
|
||||
this.context = this._outputContext; // API required by tests
|
||||
|
||||
// for use with qunit tests
|
||||
this._numGlMaxTextureErrors = 0;
|
||||
|
||||
}
|
||||
|
||||
// Public API required by all Drawer implementations
|
||||
@ -274,6 +278,7 @@
|
||||
|
||||
let maxTextures = this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS);
|
||||
if(maxTextures <= 0){
|
||||
this._numGlMaxTextureErrors += 1;
|
||||
$.console.error(`There was a WebGL problem: bad value for MAX_TEXTURE_IMAGE_UNITS (${maxTextures})`);
|
||||
return;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
function runDrawerTests(drawerType){
|
||||
|
||||
QUnit.module( 'Multi-Image-'+drawerType, {
|
||||
QUnit.module.only( 'Multi-Image-'+drawerType, {
|
||||
beforeEach: function() {
|
||||
$( '<div id="example"></div>' ).appendTo( "#qunit-fixture" );
|
||||
|
||||
@ -22,6 +22,10 @@
|
||||
},
|
||||
afterEach: function() {
|
||||
if (viewer){
|
||||
let errors = viewer.drawer._numGlMaxTextureErrors;
|
||||
if(errors > 0){
|
||||
console.log('Number of times MAX_TEXTURE_IMAGE_UNITS had a bad value:', errors);
|
||||
}
|
||||
viewer.destroy();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user