After a decade when the struggle for equal rights for gay people made great progress, it looks like the counter-revolution is under way. In the past six months, there have been major defeats for gay rights in Africa, in Asia, and even in Europe.
In June, the Russian parliament passed a law banning "propaganda for non-traditional sexual relations" that effectively makes it illegal to speak publicly in defence of gay rights, let alone hold gay pride events.
Patriarch Kirill, the head of the Russian Orthodox Church, warned the following month that same-sex marriage (barely discussed in Russia) is "a very dangerous sign of the Apocalypse." In a 2013 poll, 16 per cent of Russians said that gay people should be isolated from society, 22 per cent said they should be forced to undergo treatment, and 5 per cent said they should just be "liquidated".
In Australia, on December 11, only a week after a law making same-sex marriage legal in the Australian Capital Territory came into effect, the federal High Court overturned it and 27 gay marriages were automatically dissolved.
"Whether same-sex marriage should be provided for by law is a matter for the Federal Parliament," said the judges, and should not be decided by the courts.
On the same day, in India, the Supreme Court reversed a 2009 ruling by the Delhi High Court that had struck down the infamous Section 377, which said that a same-sex relationship is an "unnatural offence" punishable by a 10-year jail term. The ruling only applied to the National Capital Territory, but it was widely assumed that other Indian courts would follow suit. However, the Indian Supreme Court has now jumped the other way.
The judgement actually said only that the law has to be changed by parliament, not by the courts. But meanwhile all the gays who were encouraged by the Delhi High Court ruling to come out of the closet are going to find it harder than ever to live like normal citizens.
Finally, on December 19, Uganda's parliament passed a law imposing life imprisonment for some homosexual "offences". The private member's bill also makes it a crime punishable by a three-year prison sentence not to report gay people to the police.
"I am glad the parliament has voted against evil," said David Bahati, the MP who sponsored the bill. "Because we are a God-fearing nation, we value life in a holistic way. It is because of those values that members of parliament passed this bill regardless of what the outside world thinks."
When you set it out like this, it looks as if a global counter-offensive against gay rights is under way, but it's not as bad as it looks.
Uganda's Prime Minister, Amama Mbabazi, opposes the new law and claims that there was not a quorum in parliament to pass it. It may be cancelled on that argument, or President Yoweri Museveni, who is conscious of the international damage to Uganda's reputation, may simply veto it. This is not yet a done deal.
Africa is the most anti-gay continent - 37 out of 52 African countries have laws that criminalise homosexual acts - but many of these laws are a legacy of the European colonial occupations and are not vigorously enforced. Some of the biggest African countries, including South Africa, the Democratic Republic of Congo, and Egypt, have no anti-gay laws. The glass is less than half-full in Africa, but it is not empty.
In Asia, anti-homosexual laws are rare except in Muslim-majority countries. India was the great exception to that rule. Section 377 was an embarrassment to the Congress government, which was quietly grateful to the Delhi High Court for striking it down.
The government has already filed a petition asking the Supreme Court to reconsider its decision on the grounds that it "violated the principle of equality." On the other hand, if a new law is actually required to kill Section 377, it is unlikely to risk outraging conservative opinion by passing such a law before next year's election.
In Russia, the battle for gay rights is already almost a century old. Homosexuality was decriminalised in 1917 after the revolution, recriminalised under Stalin in 1933, decriminalised again in 1993 - and homosexual relationships are still legal, although President Vladimir Putin is playing populist politics with his "anti-gay propaganda" law.
As for Australia, the issue is about the "last gay right" - same-sex marriage. New Prime Minister Tony Abbott has already said he opposes it, so there will be no new legislation there soon. But most Australian states already permit civil unions.
So do most other jurisdictions in the developed world, and in the past decade 16 countries, including almost all of Western Europe, Canada, Brazil, Argentina, and 16 US states, have gone further and legalised same-sex marriage (so has New Zealand, just as Australia was re-banning it).
The tipping point was passed some time ago, and the clock will not be turned back. Homosexuality is still illegal in 83 countries, but even including India they account for only one-third of the world's people.
The global glass is more than half-full.
Gwynne Dyer is an independent journalist whose articles are published in 45 countries