Brazilians are pretty laid-back when it comes to most sexual issues, and homosexuality is more accepted here than in any other part of Latin America. That said, the degree to which you can be out in Brazil varies greatly by region, and in some smaller towns discrimination is prevalent.
Rio is the gay capital of Latin America, though São Paulo and to a lesser extent Salvador also have lively scenes. Gay bars in Brazil are all-welcome affairs attended by GLS (Gays, Lesbians e Simpatizantes), a mixed heterosexual and homosexual crowd far more concerned with dancing and having a good time than anything else.
There is no law against homosexuality in Brazil, and the age of consent is 18, the same as for heterosexuals.