Pre-GL 3.0, the only way to affect perspective-correct interpolation is with a hint. Generally, glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST)
will activate perspective-correct interpolation on all varyings, while glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST)
will generally turn it off. Note that these are driver hints and nothing more; drivers don't have to react this way.
In GLSL 1.30+ (OpenGL 3.0+), you have the ability to force each output/input to interpolate in a specific way. The interpolation qualifier smooth
means perspective-correct; this is the default if you don't specify a qualifier. noperspective
means... the obvious.
Clipping is always done in such a way that it will work exactly as if it weren't clipped (or near enough within hardware precision). So if a value is interpolated perspective-correctly, then the value generated for the clipped vertex must also use perspective-correct interpolation.