Fix exception when last 4 smallest pages are merged

This commit is contained in:
Daniel Imms
2022-11-02 05:40:13 -07:00
parent 6406fd79c1
commit c22e684904
2 changed files with 13 additions and 15 deletions
@@ -119,7 +119,9 @@ export class GlyphRenderer extends Disposable {
const gl = this._gl;
if (TextureAtlas.maxAtlasPages === undefined) {
// Typically 8 or 16
TextureAtlas.maxAtlasPages = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS) as number | null);
// Almost all clients will support >= 4096
TextureAtlas.maxTextureSize = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_SIZE) as number | null);
}