@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.19 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import"../../core/has.js";import{BufferObject as r}from"./BufferObject.js";import{PrimitiveType as e,DataType as t}from"./enums.js";class i{constructor(r){this._rctx=r,this._indexBuffer=this._createIndexbuffer(),this._program=this._createHelperProgram()}static getShaderSources(){return{vertex:"#version 300 es\n precision highp float;\n\n void main(void) {\n gl_Position = vec4(0.0, 0.0, float(gl_VertexID)-2.0, 1.0);\n }",fragment:"#version 300 es\n precision highp float;\n\n out vec4 fragColor;\n\n void main(void) {\n fragColor = vec4(0.0, 0.0, 0.0, 1.0);\n }"}}_createHelperProgram(){const r=i.getShaderSources();return this._rctx.programCache.acquire(r.vertex,r.fragment,new Map([]))}_createIndexbuffer(){return r.createIndex(this._rctx,35044,new Uint32Array([0]))}run(){this._program.compiled&&this._indexBuffer&&(this._rctx.bindVAO(null),this._rctx.useProgram(this._program),this._rctx.bindBuffer(this._indexBuffer,34963),this._rctx.drawElements(e.POINTS,1,t.UNSIGNED_INT,0))}dispose(){this._program.dispose(),this._indexBuffer.dispose()}get test(){}}export{i as AppleAmdDriverHelper};