Skip to content

Commit

Permalink
Merge pull request #4274 from JasonXJ/cap-atlas-pages
Browse files Browse the repository at this point in the history
Cap webgl maxAtlasPages to 32
  • Loading branch information
Tyriar committed Nov 26, 2022
2 parents 452241c + b7c119a commit ed1773c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/xterm-addon-webgl/src/GlyphRenderer.ts
Expand Up @@ -119,7 +119,7 @@ export class GlyphRenderer extends Disposable {

if (TextureAtlas.maxAtlasPages === undefined) {
// Typically 8 or 16
TextureAtlas.maxAtlasPages = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS) as number | null);
TextureAtlas.maxAtlasPages = Math.min(32, 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);
}
Expand Down

0 comments on commit ed1773c

Please sign in to comment.