• Advertisement
Sign in to follow this  

glPolygonMode GL_LINE and GL_POINT performance drop!

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

Greetings,

 

When rendering with glPolygonMode GL_LINE or GL_POINT, I'm getting a performance drop compared to GL_FILL. Even with GL_LINE_SMOOTH disabled. Someone in another thread mentioned to disable the user clipping... it does not make sense to me as I wouldn't know how to do that in the first place. Any secret of the ancient here?

 

thx,

Share this post


Link to post
Share on other sites
Advertisement

If it doesn't make sense to you then the probability is high that you're not doing it.  You can double-check by searching your code for calls to glEnable (GL_CLIP_PLANE...) and glClipPlane, but I'm almost certain that you won't find any - for the reason I gave in my first sentence.

 

Explanations for lower performance might include your hardware just not being good at drawing points and/or lines.  Or you might be drawing wide lines (via calls to glLineWidth) but your hardware can only accelerate width-1 lines.  Or - simplest of all - you're not doing any visibility determination and drawing with points or lines means that your hardware's early-Z capabilities can't work.

Share this post


Link to post
Share on other sites

GL_LINE has always been slower than GL_FILL from my experience. I dont think there's a way to speed it up.

Share this post


Link to post
Share on other sites

Thank you for your input guys,

well I have probably the most powerful video card on the market right now, NVidia 690 GTX that can render millions of polygon without any trouble but once in LINE or POINT mode it goes down to 1 FPS... there is clearly something fishy with these features. Even with all the recommendation suggested.

Edited by Neosettler

Share this post


Link to post
Share on other sites

1 fps is a sure indication that you're hitting a software emulated path in the per-fragment stages.  A quick test here (on the 650M I'm using at the mo) shows that using GL_LINE incurs an extra 1ms per frame overhead (with fairly lightweight geometry) - i.e. it's still more than fast enough - so it's almost certainly a case of some odd interaction with other states dropping it back.

 

I think you may need to construct a minimal repro case and post it before we can help any more.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement