question on how to manipulate camera

Hi, just wondering how I can program the camera so it follows an object in a scene either top down or first person view, thanks in advance.

Have a look at this.

It’s not strictly OpenGL but it has the kinds of matrix manipulations you need to do this sort of thing.