public void prepareAll() { if (vertexVBO != null) { vertexVBO.prepare(); } if (colourVBO != null) { colourVBO.prepare(); } if (textureVBO != null) { textureVBO.prepare(); } }
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. }
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(); }