public void updateTerrain() throws Exception
{
Simulator sim = client.network.getCurrentSim();
heightMap = TerrainHelper.createHeightTable(sim.Terrain, heightMap);
MeshmerizerR renderer = new MeshmerizerR();
Face terrainFace = renderer.TerrainMesh(heightMap, 0f, 255f, 0f, 255f);
ColorVertex[] terrainVertices = TerrainHelper.genColorVertices(terrainFace);
newIndices = terrainFace.toIndicesArray();
byte[] data = ColorVertex.toBytes(terrainVertices);
newVertexVBO = new InterleavedVBO(data, ColorVertex.Size, 3, 3,
2, 0, 12, 24);