A survey has revealed that gay actors still feel that coming out affects the roles they get to play. Though recent years have seen successful, out actors from Russell Tovey to Ian McKellen playing heterosexual parts like Steve in Him & Her and King Lear respectively, only 57% of the gay actors who responded to the survey, by the actors union Equity, felt they could be open about their sexuality to agents.

One gay actor, quoted in theatre trade paper the Stage, said: "A previous agent of mine once told me to keep quiet about my sexuality and though I am out, I do not broadcast it."

However, 81% described themselves as out in their professional lives and 94% said they did not conceal their sexuality to fellow performers.

Over half of the gay actors who responded to the survey said that they feared being offered only stereotypical roles if they came out, while being denied romantic leads in particular.

One said: "I have seen others sidelined due to their sexuality and I know that I have been sidelined too." Another said: "It's OK for a straight actor to play gay roles but harder, if not impossible, the other way round."

Last January, Rupert Everett told the Observer that he regretted coming out, saying: "For an actor to be working (at all) is a kind of miracle, because most actors aren't. So it's just silly for a working actor to say, 'Oh, I don't care if anybody knows I'm gay' – especially if you're a leading man."

In 2010, the gay actor Jonathan Groff was criticised as "unconvincing" as a heterosexual character in Glee by Newsweek critic Ramin Setoodeh, who wrote: "When he smiles or giggles, he seems more like your average theatre queen, a better romantic match for Kurt than for Rachel."

Though the theatre is renowned as one of the most gay-friendly industries, a third of gay actors surveyed said that they had experienced homophobia within it, 57% saying it had come from other performers. Equity equalities officer Max Beckmann said: "This goes some way to explaining that many respondents, while not hiding their orientation often do not 'broadcast it'."

She added that the nature of acting, in which people are continually working with strangers, meant that gay people continually felt they had to come out to new people. Many said they waited a few days before judging whether or not it was safe to disclose their sexuality.

Comments on the survey suggested that lesbians felt they were less supported than gay men by the industry. One woman said she had "twice been made to feel very uncomfortable, always from ignorance not malice and always from straight male directors."

Another commented: "The representation of gay women in the media is usually of young feminine women. Casting directors are usually looking for a 'type' based on the heterosexual model. Which means you have to act straight regardless."

However, Beckmann said that the picture was broadly positive, and that the survey was part of a process of encouraging Equity members to be open about their sexuality.

Most actors surveyed said that they would encourage others to come out, with one saying: "Being true to yourself is a step to being true to the character you play."

The agents the Guardian contacted could not be reached for comment.