How to know if a particular point is visible/Not?

Hello,
As you know that in Opengl, we can enable depth to exclude all those points from drawing mesh which are masked by other objects while viewing from camera - glEnable(GL_DEPTH_TEST);

Now, my question is, how can I know if a particular point will be visible or not. I don’t want to draw that point, but somehow I want to know if that point is visible from camera or occluded/masked by other objects in the way, thereby making it invisible. Is there any function in OpenGl that can tell this?

What exactly I am looking for is some kind of an output which tells like “true/false” if a particular point will be visible or not?

Thanks

This sounds like a job for occlusion queries
http://www.opengl.org/wiki/Occlusion_Query
http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt

Hi, Thanks for your answer. I will look into it and see if it works.