UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 766 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{RenderbufferFormat as e}from"../../../webgl/enums.js";import{FramebufferObject as t}from"../../../webgl/FramebufferObject.js";import{RenderbufferDescriptor as r}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as s}from"../../../webgl/TextureDescriptor.js";class o{constructor(e){this._rctx=e,this._fbos=new Map}get(e){return this._getPool(e)}dispose(){this._fbos.forEach((e=>e.dispose())),this._fbos.clear()}_getPool(o){const i=this._fbos.get(o);if(i)return i;const f=new t(this._rctx,new s(o),new r(e.DEPTH24_STENCIL8,o));return this._fbos.set(o,f),f}}export{o as MultiSizeFramebuffer};