MCPcopy Create free account
hub / github.com/microsoft/SandDance / polyfillVertexArrayObject

Function polyfillVertexArrayObject

docs/tests/v3/es6/js/sanddance-test-es6.js:7267–7283  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

7265 if (this.currentArrayBuffer !== currentBinding) original.bindBuffer.call(gl, 34962, this.currentArrayBuffer);
7266};
7267function polyfillVertexArrayObject(gl) {
7268 if (typeof gl.createVertexArray === "function") return;
7269 var original_getSupportedExtensions = gl.getSupportedExtensions;
7270 gl.getSupportedExtensions = function getSupportedExtensions() {
7271 var list = original_getSupportedExtensions.call(this) || [];
7272 if (list.indexOf("OES_vertex_array_object") < 0) list.push("OES_vertex_array_object");
7273 return list;
7274 };
7275 var original_getExtension = gl.getExtension;
7276 gl.getExtension = function getExtension(name) {
7277 var ext = original_getExtension.call(this, name);
7278 if (ext) return ext;
7279 if (name !== "OES_vertex_array_object") return null;
7280 if (!gl.__OESVertexArrayObject) this.__OESVertexArrayObject = new OESVertexArrayObject(this);
7281 return this.__OESVertexArrayObject;
7282 };
7283}
7284
7285},{"probe.gl/env":"4WXZh","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"lOb37":[function(require,module,exports) {
7286var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected