Esempio n. 1
0
 public void prepareAll() {
   if (vertexVBO != null) {
     vertexVBO.prepare();
   }
   if (colourVBO != null) {
     colourVBO.prepare();
   }
   if (textureVBO != null) {
     textureVBO.prepare();
   }
 }
Esempio n. 2
0
 private int getNumElements() {
   if (vertexVBO != null) {
     return vertexVBO.getNumElements();
   }
   if (colourVBO != null) {
     return colourVBO.getNumElements();
   }
   if (textureVBO != null) {
     return textureVBO.getNumElements();
   }
   return 0; // We have no VBOs to ask.
 }
Esempio n. 3
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);
  }
Esempio n. 4
0
 public void destroy() {
   vbo.destroy();
 }