fixed OpenGl  issues and framework change