Buddha asked people to refrain from engaging in sexual misconduct. By ‘Sexual misconduct’, Buddha meant all wrong behavior includinggays, inter-course with animals, prostitutes, and women/men other than your spouse, because all those things existed even during his life time.
There is a Buddha story
regarding a Queen named Mallika, who had been a great devotee of Buddha. She
was the woman who gave the “unrivalled alms giving” (“Asadisadana”) a
Buddha may receive only once in his lifetime. She did only one deed in her
entire life which had evil results; which made her reborn in hell and suffer
seven days there. It was, to have sexual intercourse with a dog and lying
about it when her husband, King Pasenadi of Kosala in
the Ganges Valley saw it. It’s your own deeds which decide
whether you should suffer, or you should flourish.