Jump to content
  • Advertisement

Archived

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

Amar0k

GL_POINTS on a mesh vertices

This topic is 5224 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

Woof... Writing that subject was hard. Im not sure how to explain exactely what i need, but here is my best. What im trying to do is placing GL_POINTS primitives with size 4 or 5, exactely at the positions of a mesh vertices. The problem is that the depth test affects the whole 'surface' of the point primitive. Which is to say that the corners of the mesh cut through the point, and the edges of the mesh occlude part of the point is the point is in the far side of a face with hight slope. This is clearly not the effect im looking for. What i'd like is to have the points unaffected by the depth test. Perfect quads. Now, if i disable depth test points will be drawn in all verts of the mesh, even those occluded by other faces. Depth test is therefore needed. If i could 'say' to opengl: 'See if the vertex is unoccluded (ie depth test) and if it is, disable depth test and draw the point.' then the problem would be solved. This is part of a picking mechanism wich works much like in Wings3D with face, edge and vertex mode. Everything is working, except this point thing wich looks really ugly. If you have an idea on how i could this, please post. If anyone could steer me in the right direction i would really appreciate (and have a peaceful night). Edit: now i notice that maybe i didnt make it clear that the mesh faces are rendered before the verts in solid mode. So the points have to be rendered 'over' those faces. TIA. .Amar0k. "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." -- Douglas Adams [edited by - Amar0k on June 6, 2004 8:06:52 AM]

Share this post


Link to post
Share on other sites
Advertisement
maybe u can draw points with depth test into the stencil buffer and then draw big points without any depth test but with some stencil tests?

i think i should re-read ur post to understand waht u want haha

Share this post


Link to post
Share on other sites
I think this is the kind of situation where a screenshot would help

Maybe the stencil buffer is exactely what im missing. I dont even know what it is! Oh well, red book, here i come.

And i think you did get what im trying to do.

Share this post


Link to post
Share on other sites
stencil buffer is your friend
red book is also your friend
and someone said msdn is your friend on some other post around

hope u figure out ur little problem, shouldn't be too hard though. i think.

[edited by - Lord Gzoo on June 6, 2004 8:29:49 AM]

Share this post


Link to post
Share on other sites
Wouldn''t it be much faster if you used particles/billboards instead of points ?? and yeah, offset is the ticket

Share this post


Link to post
Share on other sites
I will now try the offset approach.

Why would billboards be faster? Billboards require 4 primitive calls while points only require one...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!