getAttributes method

dynamic getAttributes(
  1. dynamic shaderStage
)

Implementation

getAttributes(shaderStage) {
  var snippet = '';

  if (shaderStage == 'vertex') {
    var attributes = this.attributes;

    for (var index = 0; index < attributes.length; index++) {
      var attribute = attributes[index];

      snippet +=
          "layout(location = ${index}) in ${attribute.type} ${attribute.name}; ";
    }
  }

  return snippet;
}