Cap webgl maxAtlasPages to 32
This commit is contained in:
@@ -119,7 +119,7 @@ export class GlyphRenderer extends Disposable {
|
|||||||
|
|
||||||
if (TextureAtlas.maxAtlasPages === undefined) {
|
if (TextureAtlas.maxAtlasPages === undefined) {
|
||||||
// Typically 8 or 16
|
// 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
|
// Almost all clients will support >= 4096
|
||||||
TextureAtlas.maxTextureSize = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_SIZE) as number | null);
|
TextureAtlas.maxTextureSize = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_SIZE) as number | null);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user