Enforce a maximum page merge amount

This commit is contained in:
Daniel Imms
2022-11-02 05:28:47 -07:00
parent 0271fdf49d
commit 6406fd79c1
5 changed files with 90 additions and 72 deletions
@@ -120,6 +120,7 @@ export class GlyphRenderer extends Disposable {
if (TextureAtlas.maxAtlasPages === undefined) {
TextureAtlas.maxAtlasPages = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS) as number | null);
TextureAtlas.maxTextureSize = throwIfFalsy(gl.getParameter(gl.MAX_TEXTURE_SIZE) as number | null);
}
this._program = throwIfFalsy(createProgram(gl, vertexShaderSource, createFragmentShaderSource(TextureAtlas.maxAtlasPages)));