How would gay nobles produced heirs?

by DrippyWaffler

The scene with Renly Baratheon after his wedding in Game of Thrones made me wonder - back in the day, how did gay guys do the deed with a woman if they weren't physically attracted to them if they needed to continue a royal line or whatever?

Illius_Willius

Follow up question, how often did nobles allow a family member to openly express homosexuality in feudal Europe?