you welcome roccio, i really appreciate it.
but in term of performance, the demo wasn't efficient and algorithm is a bit buggy. when i start this project wasn't in my mind to optimize it, the main goal for me was to implement diamond square algorithm in CPU side because wasn't an easy to retrieve the values from GPU for the debugging propose. after i finished the demo i saw couple of places that obviously can be optimized. for instance, i send the height data which is one dimensional array twice to GPU every frame, once with pixel buffer in HeightMap class and once with array buffer in GroundMesh class. theoretically, this is inefficient since this data will be present for every active shader better to be sent only once. also pixel buffer wasn't really necessary, i just test how to implement it, like when i start learn c++ i was wondering how to use the various of STL containers and adapters, same thing with OpenGL many buffers and textures just to allocate and store data as one dimensional array or two dimensional array in GPU.
for diamond square algorithm, it has an ugly artifacts mountain tops appear pinched, this might be fixed by using filters like blur or smooth. and from where i read about this algorithm, it suggests the seed atleast for starting corners but i haven't seen any different when i tested it, may be a personal choice.
i will re-visit the project once again and implement these.