Convection in the atmospheres and envelopes of turnoff and giant branch stars of globular clusters