Spermatogenesis and oogenesis are both types of gametogenesis, wherein a diploid gamete cell produces divides to produce haploid sperm cells and egg cells, respectively.