When Frank Ocean, a rising star in the R&B world, announced on Tuesday that his first true love had been a man, he seemed to be taking a giant risk with his career.


After all, Mr. Ocean, 24, is a rising star in the hypermasculine world of urban music, where singers cultivate images as lady-killers. He is a member of the Odd Future hip-hop collective, whose rappers are known for using anti-gay slurs. No other mainstream R&B artists have acknowledged having homosexual relationships. For decades, even the rumor of homosexuality had ruined artists in hip-hop circles.


But how big a gamble was it? Mr. Ocean has received strong support from other artists, his record label and cultural commentators, while the negative reactions have been largely muted and equivocal.


That lack of uproar seems to echo a broader shift in attitudes toward homosexuality and gay culture: Coming out is not as controversial as it once was. Mr. Ocean’s revelation occurred just days after Anderson Cooper, the CNN anchor, acknowledged that he was gay. It also comes just months after Jay-Z, Russell Simmons and other hip-hop figures forcefully supported President Obama after he announced his support for gay marriage.


“Ten or 15 years ago Frank Ocean could never have come out,” said Mark Anthony Neal, a professor of African-American studies at Duke University. “It would have been death to his career.”


It is too early to tell if Mr. Ocean, who declined to be interviewed for this article, will suffer for his honesty when his debut album, “Channel Orange” (Island Def Jam), is released later this month. Sales of his record will be viewed as a measure of how much times have changed. “It’s going to be a kind of litmus test,” said Nelson George, a filmmaker and the author of the novel “The Plot Against Hip-Hop.” “You can’t really know the real impact of this for six months to a year.”


It is worth noting that several major hip-hop stars have seemingly remained silent about Mr. Ocean’s decision, among them Kanye West, Lil Wayne, Rick Ross, Drake and Nicki Minaj. Mr. Ocean was also the target of dozens of death threats and antigay comments on Twitter, mostly from men.


“There is still a very nasty streak of homophobia in this country that we have to overcome,” Mr. Simmons, a founder and former owner of the Def Jam label, said. “I’m hoping the support by his friends and the members of the creative community will override it and, whatever he loses, he will gain more.”


But Mr. Ocean’s declaration that he had fallen in love with a man and carried on an intimate relationship for more than a year, which he made in a rambling, poetic letter that he posted online, immediately attracted support from Mr. Simmons, who praised Mr. Ocean for his “courage and honesty,” adding that his statement “gives hope and light to so many young people still living in fear.”


Other hip-hop heavyweights signaled their support. Jay-Z, the rapper and label owner, posted a long defense of Mr. Ocean on his Web site written by the critic Dream Hampton. Joie Manda, the president of Island Def Jam, said that Mr. Ocean “broke down a wall that should never have been built.” Female R&B artists like Solange Knowles and Rita Ora published supportive messages online.


And Tyler, the Creator, the shock rapper who has collaborated with Mr. Ocean in the cutting-edge group Odd Future, said on Twitter that he stood beside him. The statement was all the more surprising since Tyler, the Creator, often insults gay men in his lyrics.


The positive reaction suggests that there has been a cultural shift, music critics said. For a new generation of R&B fans, it seems, just as for the rest of the population, sexual orientation has become a less toxic issue.


“To even have a climate where a relatively young person — he’s 24 — is comfortable enough not only to intimate this in his lyrics but to make a statement about it and put it on Tumblr says we have come a way as a society,” said Joan Morgan, a critic and the author of “When Chickenheads Come Home to Roost,” essays about feminism in hip-hop.


Jerry Boulding, urban editor for All Access, a radio trade publication, predicted urban program directors would still play Mr. Ocean’s songs if he maintained the quality of his previous work. “It becomes a question of talent — he obviously is talented,” Mr. Boulding said. “But he is going to have to pick his material well, because some of the things he sang about before he came out obviously won’t have the same meaning now.”


The publicity surrounding Mr. Ocean’s announcement might even work in his favor, generating interest in the new album, Mr. Boulding said.