Hello, im attempting to use a transformation method to modify my VBOS however I would like to know what toher way I can edit the positions within the VBO without having to create it again. This is how I am doing it at the moment. I get 30fps doing 10000 transformations.
public void translate(int x, int y) {
verticies.clear();
for (int i = 0; i < position.length; i++) {
float cx = position[i].getx();
float cy = position[i].gety();
verticies.put(cx + x);
verticies.put(cy + y);
position[i].setcoordinates(cx + x, cy + y);
}
verticies.rewind();
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vertid);
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verticies, GL15.GL_DYNAMIC_DRAW);
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
}
EDIT:
Note is that position is an array of vertex2d objects (not OpenGL ones).