/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../chunks/_rollupPluginBabelHelpers","../../../core/maybe","../../../chunks/vec2f32","../../webgl/enums","../../webgl/FramebufferObject"],(function(e,t,i,r,o,s){"use strict";let n=function(){function e(e,t){this.size=r.create(),this._fbo=null,this._fbo=new s.FramebufferObject(e,{colorTarget:o.TargetType.TEXTURE,depthStencilTarget:o.DepthStencilTargetType.NONE},{target:o.TextureType.TEXTURE_2D,pixelFormat:o.PixelFormat.RGBA,dataType:o.PixelType.UNSIGNED_BYTE,wrapMode:o.TextureWrapMode.CLAMP_TO_EDGE,samplingMode:o.TextureSamplingMode.LINEAR_MIPMAP_LINEAR,hasMipmap:t,maxAnisotropy:8,width:0,height:0})}var n=e.prototype;return n.dispose=function(){this._fbo=i.disposeMaybe(this._fbo)},n.getTexture=function(){return this._fbo?this._fbo.colorTexture:null},n.isValid=function(){return null!==this._fbo},n.resize=function(e,t){this.size[0]=e,this.size[1]=t,this._fbo.resize(this.size[0],this.size[1])},n.bind=function(e){e.bindFramebuffer(this._fbo)},n.generateMipMap=function(){this._fbo.colorTexture.descriptor.hasMipmap&&this._fbo.colorTexture.generateMipmap()},n.disposeRenderTargetMemory=function(){var e;null==(e=this._fbo)||e.resize(0,0)},t._createClass(e,[{key:"gpuMemoryUsage",get:function(){var e,t;return null!=(e=null==(t=this._fbo)?void 0:t.gpuMemoryUsage)?e:0}}]),e}();e.OverlayFramebufferObject=n,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
