This clears the error from glewInit(), and ensures we check GL extensions only after selecting the desired GL profile. Also, consistently use the core profile flag to select the context.