You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
6 lines
1.5 KiB
6 lines
1.5 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define(["exports","./enums","./GLObjectType","./RenderbufferDescriptor"],function(d,e,h,k){class l{constructor(a,c){this._context=a;this._descriptor=c;this.type=h.GLObjectType.RenderBuffer;this._context.instanceCounter.increment(e.ResourceType.Renderbuffer,this);a=this._context.gl;this.glName=a.createRenderbuffer();this._context.bindRenderbuffer(this);const {width:b,height:f,internalFormat:g,multisampled:m}=c;m?a.renderbufferStorageMultisample(a.RENDERBUFFER,this.samples,g,b,f):a.renderbufferStorage(a.RENDERBUFFER, |
|
g,b,f);this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const a=this._descriptor.samples,c=this._context.parameters.maxSamples;return a?Math.min(a,c):c}get usedMemory(){return k.estimateMemory(this._descriptor)}resize(a,c){const b=this._descriptor;if(b.width!==a||b.height!==c)b.width=a,b.height=c,a=this._context.gl,this._context.bindRenderbuffer(this),b.multisampled?a.renderbufferStorageMultisample(a.RENDERBUFFER,this.samples,b.internalFormat,b.width,b.height): |
|
a.renderbufferStorage(a.RENDERBUFFER,b.internalFormat,b.width,b.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(e.ResourceType.Renderbuffer,this),this._context=null)}}d.Renderbuffer=l;Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})}); |