Advertisement Jump to content


This topic is now archived and is closed to further replies.


Testing of an vertex is visible

This topic is 6079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I test if an single vertex (x,y,z) is visible. I have drawn things behind and may draw polygon in front of it. I only need to do this very little, so a slow opengl way is fine. Sorry i am a new to opengl and sorry for bad english

Share this post

Link to post
Share on other sites

Si tu parles frnçais, lis ceci :

Il s''agit du Frustum Culling. Tu trouveras un lien (en anglais) qui t''expliqueras comment l''implémenter. Personnelement, j''ai utilisé cette technique pour tester si des polygones étaient visibles ou pas dans mon moteur 3D.

Le lien :


Here''s a link for using frustum culling. I used this technic for my engine and it''s works well ...

Leyder Dylan

Share this post

Link to post
Share on other sites
I don''t think fustrum is the answer here.
There are 2 ways.
line of sight ''ray trace'' test. mathmatically testing if the line between you and the point is clear,
do a depth read at the point after you have done all your rendering and logic calculations.
using glReadPixels.
use gluProject to find where on the screen to read.
It MUST be done after as many other calculations as possible. Otherwise, you could litterally lower your frame rate to as low as 20% of it''s original speed (I''ve managed even less).
When you have the depth value, you will need to work out what values equate to a visible point... Ie, if you are rendering a lens flare, then don''t use depth testing when rendering your sky. That way, when you do the depth test, the value you get back will always be the clear value if it is visible.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!