moved obengl enable depth buffer in draw() function of graph for propper handling of rendering