fixed opengl context in timer