I point you to the story in Houston 2 years ago about the man who heard his neighbors house being robbed. He stated on the 911 call that he was going to stop them, he killed them in his neighbors home and is sitting at home right now watching TV.
Again with respect.
Last year a CCW permit holder was walking his dog in a park in Terrell Texas when a few punks tried to rob him. I believe he killed one thug and wounded the other. Not at home, work, and was no where near his vehicle. He was not charged.
Because,
your first example occurs in someone's home, and in the second, the attempted robbery was at gunpoint.
Neither case allows you to draw the conclusion that you can always shoot someone in the back after they snatch some bills from your hand. In any State, including Texas.