Integrality of framing and geometric origin of 2-functions