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.
7 lines
2.0 KiB
7 lines
2.0 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 ./BufferObject ./enums ./FramebufferObject ./renderState ./TextureDescriptor ./VertexArrayObject ./VertexElementDescriptor ./WebGLDriverTestModule".split(" "),function(g,k,b,l,h,m,n,p,q){class r extends q.WebGLDriverTestModule{constructor(c){super();this._rctx=c;c.gl&&c.capabilities.colorBufferFloat?.textureFloat&&c.capabilities.colorBufferFloat?.floatBlend&&(this._program=c.programCache.acquire("\n precision highp float;\n attribute vec2 a_pos;\n\n void main() {\n gl_Position \x3d vec4(a_pos * 2.0 - 1.0, 0.0, 1.0);\n }\n ", |
|
"\n precision highp float;\n\n void main() {\n gl_FragColor \x3d vec4(0.5, 0.5, 0.5, 0.5);\n }\n ",new Map([["a_pos",0]])))}_test(c){const a=this._rctx;var d=new m.TextureDescriptor(1);d.wrapMode=b.TextureWrapMode.CLAMP_TO_EDGE;d.dataType=b.PixelType.FLOAT;d.internalFormat=b.SizedPixelFormat.RGBA32F;d.samplingMode=b.TextureSamplingMode.NEAREST;d=new l.FramebufferObject(a,d);var e=k.BufferObject.createVertex(a,b.Usage.STATIC_DRAW,new Uint16Array([0,0,1,0,0,1,1,1]));e=new n.VertexArrayObject(a, |
|
new Map([["a_pos",0]]),{geometry:[new p.VertexElementDescriptor("a_pos",2,b.DataType.UNSIGNED_SHORT,0,4)]},{geometry:e});a.gl.getError();a.useProgram(c);c=a.getBoundFramebufferObject();const {x:t,y:u,width:v,height:w}=a.getViewport();a.bindFramebuffer(d);a.setViewport(0,0,1,1);a.bindVAO(e);a.drawArrays(b.PrimitiveType.TRIANGLE_STRIP,0,4);var f=h.makePipelineState({blending:h.simpleBlendingParams(b.BlendFactor.ZERO,b.BlendFactor.ONE_MINUS_SRC_ALPHA)});a.setPipelineState(f);a.drawArrays(b.PrimitiveType.TRIANGLE_STRIP, |
|
0,4);f=a.gl.getError();a.setViewport(t,u,v,w);a.bindFramebuffer(c);e.dispose();d.dispose();return f===a.gl.INVALID_OPERATION?(console.warn("Device claims support for WebGL extension EXT_float_blend but does not support it. Using fall back."),!1):!0}}g.FloatBufferBlend=r;Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})}); |