Texas law is designed to allow “social gambling”. From the law, it is legal to gamble if:
(1) the actor engaged in gambling in a private place;
(2) no person received any economic benefit other than personal winnings; and

(3) except for the advantage of skill or luck, the risks of losing and the chances of winning were the same for all participants.
(1) means the gambling must be on private property; you can’t gamble in public, or in an open bar or restaurant, at all. Most bar or restaurant owners don’t want you playing poker in their bar even if it’s not for money.
(3) makes “house edge” games like blackjack, craps, pai gow, etc. generally illegal. It would probably be legal to have a slot onlain game if everybody bet the same amount slot online and the person acting as the house rotated every hand. Certainly almost every type of poker offers all players equal chance of losing and winning so poker is OK here.
It’s almost always (2) that makes a poker game illegal in Texas. It’s also important to realize that the purpose of (2) is to prevent people from becoming professional gambling promoters — the law’s intent is to allow people to gamble for fun, but does not want anybody to be making a living from running poker games, or being a bookie, etc.
The definition of what constitutes “economic benefit” in (2) is somewhat hazy. Here’s what is clear. If there is money raked from pots, or a seat time charge, or a door fee, or a mandatory food charge, or a mandatory “donation”, the game is illegal under Texas law since that money is going to somebody, and they are getting an “economic benefit” from the gambling.
It is a little more hazy if you’re playing in a game where there’s no rake or game charge, but there is a dealer or waitress who is getting tipped. That’s probably still illegal. Genuinely voluntary donations, or asking people to chip in for beer or pizza, or selling someone something like cigarettes during the game, probably would still make the game technically illegal but it seems extremly unlikely that anything like that alone would cause a game to get busted.
There has been at least one case where the illegality of a poker game was established. In Gaudio v. Texas 1994, Gaudio was convicted of keeping a gambling place which in this case was an apartment rented to play poker games. The judge ruled that what made the game illegal was that the pots were raked to pay the rent of the apartment and that since not having to pay the full rent of the place was an economic benefit, the game was illegal. The judge also said, though, that even if the pot wasn’t raked, the fact that the dealer and waitress received tips probably made the game illegal.
do illegal games get busted?
In Texas the answer is yes, but rarely. The only cases in the last several years I’ve heard of have been two high-profile operations, the Austin Poker Club which was shut down in April 2003 (see here) and the Redmen’s club, shut down in February 2004 (see here). Neither has gone to trial yet.
Little one- or two- table home games, illegal or legal, rarely attract the attention of the law anywhere in the US. Larger illegal cardrooms or poker clubs more frequently do because they are a higher profile and easier to prosecute.
The Austin Poker Club was a very high-profile club. They were trying to operate as a legitimate business, including having a public website, a labeled location, membership dues and apparently even paying taxes. The owners believed, and still do, that their club was legal. Only the outcome of the trial will determine that for sure.
what would happen to me if i was playing in a game that got busted?
Probably not too much. You’d almost certainly be questioned for several hours about the game, probably at a police office. You’d probably lose your buyin and the chips you had in front of you.
In the event you did get any charges, you’d just get charged with Gambling, which is a Class C Misdemeanor (basically a parking ticket, with a fine up to $500).
There’s a firsthand account of the Austin Poker Club bust here.