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); }
public void destroy() { vbo.destroy(); }