fixed openGL error with video settings, added openGL error checking