The name refers to the flags of the six different nations that have governed Texas : Spain , France , Mexico , the Republic of Texas , the United States of America , and the Confederate States of America .