No, it is not legal to be driving while drinking and alcoholic beverage.
It is a class C misdemeanor for you to operate a car while you personally possess an open alcoholic beverage container.
This penalty, as noted earlier, increases if you are arrested for DWI.
Additionally, recent legislation also prohibits any passenger from having an open alcoholic container unless the person is a passenger in the living quarters of a motor home, a limousine, a bus, a taxi, or a motor vehicle designed, maintained, or used primarily for transportation of persons for compensation.