3D Midpoint displacement algorithm with OpenGL 2