/*
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","./WGLContainer","../../../webgl/enums"],(function(e,t,r,n){"use strict";let o=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).requiresDedicatedFBO=!1,t}t._inheritsLoose(r,e);var o=r.prototype;return o.dispose=function(){},o.doRender=function(e){const t=this.createRenderParams(e),{context:r,painter:o,profiler:i}=t;this._prevFBO=r.getBoundFramebufferObject(),i.recordContainerStart(this.name);const s=this._getFbo(t),a=o.getRenderTarget();r.bindFramebuffer(s),o.setRenderTarget(s),r.setDepthWriteEnabled(!0),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setClearDepth(1),r.clear(r.gl.COLOR_BUFFER_BIT|r.gl.DEPTH_BUFFER_BIT),r.setDepthWriteEnabled(!1);for(const n of this.children)n.beforeRender(e);for(const n of this.children)n.processRender(t);for(const n of this.children)n.afterRender(e);o.setRenderTarget(a),o.releaseFbo(s),r.bindFramebuffer(this._prevFBO),o.beforeRenderLayer(t,this._clippingInfos?255:0,this.computedOpacity),r.setStencilTestEnabled(!1),r.setStencilWriteMask(0),o.blitTexture(r,s.colorTexture,n.TextureSamplingMode.NEAREST),o.compositeLayer(t,this.computedOpacity),i.recordContainerEnd()},o.createRenderParams=function(t){return{...e.prototype.createRenderParams.call(this,t),blendMode:this.blendMode,effects:this.computedEffects,globalOpacity:1}},o._getFbo=function(e){const{context:t,painter:r}=e,{width:n,height:o}=t.getViewport();return r.acquireFbo(n,o)},r}(r);e.GroupContainer=o,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
