Esempio n. 1
0
  private GLListProperty(GLStateType type, List<IGLProperty> props) {
    mList = props;
    mType = type;

    for (IGLProperty p : mList) {
      p.setParent(this);
    }
  }
Esempio n. 2
0
  /**
   * Construct a list of properties of given size from the provided template.
   *
   * @param template property that will be cloned and used as members of the list
   * @param size size of the list
   */
  public GLListProperty(GLStateType type, IGLProperty template, int size) {
    mType = type;
    mTemplate = template;

    mList = new ArrayList<IGLProperty>(size);
    for (int i = 0; i < size; i++) {
      IGLProperty p = template.clone();
      mList.add(p);

      p.setParent(this);
    }
  }
Esempio n. 3
0
 public void set(int index, IGLProperty property) {
   ensureCapacity(index + 1);
   mList.set(index, property);
   property.setParent(this);
 }
Esempio n. 4
0
 public boolean add(IGLProperty property) {
   property.setParent(this);
   return mList.add(property);
 }