In case of gymnosperm, the endosperm is haploid and formed before fertilisation and in case of angiosperm the endosperm is triploid and formed after fertilisation. In angiosperms, two haploid polar nuclei fuse with haploid male gamete forming triploid endosperm.