glPolygonMode GL_LINE and GL_POINT performance drop!

Started by
3 comments, last by 21st Century Moose 11 years, 1 month ago

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,

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.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

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

-=[Megahertz]=-

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.

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.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

This topic is closed to new replies.

Advertisement