As I have explained at https://github.com/rovinbhandari/Dabblings-in-OpenGL/pull/5/files#r440919 , there's a problem with the bwPyramid function implementation.