Пример #1
0
  private void updateData() {
    // top left
    vertices[0].setXY(position.x - dimension.x, position.y + dimension.y);
    // bottom left
    vertices[1].setXY(position.x - dimension.x, position.y - dimension.y);
    // bottom right
    vertices[2].setXY(position.x + dimension.x, position.y - dimension.y);
    // top right
    vertices[3].setXY(position.x + dimension.x, position.y + dimension.y);

    vbo.setVertices(vertices);
  }
Пример #2
0
 public void destroy() {
   vbo.destroy();
 }