getting current raster pos problems

I am trying to find the screen coords of a
point in 3D space so that I can put som text in the scene. The code I am using is

int coords[4] = {0,0,0,0};

glBegin(GL_POINTS);
glVertex3f(…);
glEnd();

glGetIntegerv(GL_CURRENT_RATER_POS, coords);

glGetError() returns 0
but coords[0], coords[1] and coords[2] are always equal to 0

can any one help me out

Thanks

The current raster position has nothing to do with any glVertex call. You need to set it with glRasterPos calls. Note that the arguments to this call will be transformed just like vertex coordinates, but these are still two distinct things.

Btw, for getting a transformed coordinate back (as it appears you are trying this) have a look at gluProject.