bindByName method

void bindByName(
  1. String name
)

Implementation

void bindByName(String name) {
  var id = -1;
  for (var i = 0; i < textures.length; i++) {
    if (textures[i].name == name) {
      id = i;
    }
  }
  if (id != -1) {
    textures[id].bind();
  } else {
    if (kDebugMode) {
      print('failed to bind texture $name');
    }
  }
}