Before it become a US state, Texas was ruled by many countries. First by Spain, after that by France, and then by Mexico. Spanish ruled Texas from 1519 till 1685, At that period, Texas officially used the Spanish flag.
After Spain French ruled Texas from 1685 to1690. French flag was used in that period. But from 1690 to 1821, Texas reverted to Spanish possession again and the Spanish flag was flown. Then Texas became part of Mexico in 1821, and flew the Mexican flag until 1836. In 1836, Republic of Texas declared its independence.
In December of 1836, the Congress approved the National flag of Texas. This flag was simple a yellow star in the middle of a dark blue background.
But in January 1939, the Texas Congress approved a new flag with same colors as the US flag but with a different design. That flag is the one we use today as Texas state flag.