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

Function polyfillVertexArrayObject

docs/app/js/sanddance-app.js:59336–59352  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

59334 if (this.currentArrayBuffer !== currentBinding) original.bindBuffer.call(gl, 34962, this.currentArrayBuffer);
59335};
59336function polyfillVertexArrayObject(gl) {
59337 if (typeof gl.createVertexArray === "function") return;
59338 var original_getSupportedExtensions = gl.getSupportedExtensions;
59339 gl.getSupportedExtensions = function getSupportedExtensions() {
59340 var list = original_getSupportedExtensions.call(this) || [];
59341 if (list.indexOf("OES_vertex_array_object") < 0) list.push("OES_vertex_array_object");
59342 return list;
59343 };
59344 var original_getExtension = gl.getExtension;
59345 gl.getExtension = function getExtension(name) {
59346 var ext = original_getExtension.call(this, name);
59347 if (ext) return ext;
59348 if (name !== "OES_vertex_array_object") return null;
59349 if (!gl.__OESVertexArrayObject) this.__OESVertexArrayObject = new OESVertexArrayObject(this);
59350 return this.__OESVertexArrayObject;
59351 };
59352}
59353
59354},{"probe.gl/env":"btEBf","@parcel/transformer-js/src/esmodule-helpers.js":"jA2du"}],"fCLDZ":[function(require,module,exports) {
59355var parcelHelpers = require("@parcel/transformer-js/src/esmodule-helpers.js");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected