You can be charged with public lewdness for a wide array of conduct. Generally speaking, to be accused of public lewdness, it must be alleged that you've engaged in some form of prohibited sexual conduct, in a public place. By law, alleged acts of public lewdness can include various forms of sexual intercourse. However, in order to violate Texas law regarding public lewdness, it's not
sufficient that you simply engage in this behavior in a public place.
Additionally, in order for you to be found guilty of public lewdness, the state must prove that you did so in a manner that indicates you were "reckless about whether another is present who will be offended or alarmed" by your actions. For example, if you and someone are "getting frisky" on a deserted country road, miles from town, and are arrested, you might well have a defense to a public lewdness charge, given that it might successfully be argued that you had no reason to believe someone else might be present. Likewise, if you're a topless dancer who gets arrested by an undercover officer for giving an "overly-intimate" table dance, you may also have a defense to a public lewdness charge, by arguing that you would have no reason to believe that another person might be present who would be offended by your actions (i.e., because you're in a topless bar full of people who, presumably, have willingly placed themselves in a sexually-charged environment).
Public lewdness is a Class A misdemeanor, with a punishment scheme that can land you one year in the county jail, and up to a $4,000 fine.