1. I was looking for my glasses.
2. I have been looking for my glasses.
3. I had been looking for my glasses.
1 is used to emphasize the duration. I was looking for my glasses for three hour without luck. It's also used to say what you were doing when something else happened. I was looking for my glasses when I...
2 is connected to the present in some way. What have you been doing all morning? I've been looking for my glasses and I still haven't found them.
3 is used to show that something was going on when something else happened to interrupt it. I had been looking for my glasses when I found the million dollars in gold.