1.It reverts to opengl compatibility profile 2.1 and works.
2.Now making changes and code clean up.