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

Function getDebugTableForVertexArray

docs/app/js/sanddance-app.js:66574–66590  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66572var _attributeUtils = require("../webgl-utils/attribute-utils");
66573var _utils = require("../utils");
66574function getDebugTableForVertexArray() {
66575 var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, vertexArray = _ref.vertexArray, _ref$header = _ref.header, header = _ref$header === void 0 ? "Attributes" : _ref$header;
66576 if (!vertexArray.configuration) return {};
66577 var table = {};
66578 if (vertexArray.elements) table.ELEMENT_ARRAY_BUFFER = getDebugTableRow(vertexArray, vertexArray.elements, null, header);
66579 var attributes = vertexArray.values;
66580 for(var attributeLocation in attributes){
66581 var info = vertexArray._getAttributeInfo(attributeLocation);
66582 if (info) {
66583 var rowHeader = "".concat(attributeLocation, ": ").concat(info.name);
66584 var accessor = vertexArray.accessors[info.location];
66585 if (accessor) rowHeader = "".concat(attributeLocation, ": ").concat(getGLSLDeclaration(info.name, accessor));
66586 table[rowHeader] = getDebugTableRow(vertexArray, attributes[attributeLocation], accessor, header);
66587 }
66588 }
66589 return table;
66590}
66591function getDebugTableRow(vertexArray, attribute, accessor, header) {
66592 var _ref4;
66593 var gl = vertexArray.gl;

Callers

nothing calls this directly

Calls 2

getDebugTableRowFunction · 0.70
getGLSLDeclarationFunction · 0.70

Tested by

no test coverage detected