Well, if you are friends with him, and he's ignoring you, then I would just ask him in a joking way if I did anything to upset him. 😆
If you're not friends with and just want to get him to talk to you, just go up and talk to him. Just start with a wave and hi, and then go to "What's up?" Then let the conversation build itself.
Looks like you are new here. Register for free, learn and
contribute.
The next time he stares at you for a long time, quickly look at him and wave. If he doesn't wave back or comes up to you, you go up to him, and just say hi or hello, and then while you guys are still talking, let loose on saying like tulipbaby said have i done anything to upset you.