Yes, he was most likely showing off. Especially if he has a nice body.
If he stares at you from afar and finds excuses to be close to you, he is showing signs of interest but may also be looking for signs of interest from you as well.
Taking off his shirt was something that he may have felt would set him apart from everyone else.
He may be getting desperate in an attempt to figure out whether you are attracted to him or not.