Shadow Mapping for directional lightsource

I have a some question regarded to implementing shadow map.

Now I have use Perspective Projection for capturing light view for a directional light soure
, but the projection failed to capture all the area need to be shadow.

Later , I searched on the Internet and found article about shadow map On WIkipedia.
(Shadow mapping - Wikipedia)
It said that I should use Orthogonal Projection for directional light source

Can Someone Provide me more information on this , including how to setup Orthogonal Projection

Thank

Yes if your light source is directional, like the sun, you only need an orthogonal projection.

Search for glOrtho function for setting up ortho projection. Just make sure your projection includes all the objects you care about.