glPolygonMode slows down[solved]

Started by
22 comments, last by swiftcoder 11 years, 1 month ago
Quote:Original post by Ravuya
The line rendering mode is very slow; I suspect it's done in software.

But it shouldn't be. There must be something wrong with the states...

--
Advertisement
render direct as GL_LINES - not with polygonmode. i think you will get the same performance like in DX.
1 fps sounds like software
make sure u havent got something enabled that can cause that eg antialaising, eg LINE_SMOOTH or something enabled
Are you specifying LINE mode for both front and back facing triangles? I can imagine scenarios where mixed polygon modes will slow down - but if you specify LINE for both faces, it should remain on the fast path.

If you have a standalone test app which demonstrates the problem, I can take a look. Source code is preferable but an executable will suffice.
Quote:Original post by gold
Are you specifying LINE mode for both front and back facing triangles? I can imagine scenarios where mixed polygon modes will slow down - but if you specify LINE for both faces, it should remain on the fast path.

Do you have a dedicated hardware path for line rendering on your non-quadro FX product line, or do you simulate lines with thin triangles ?

I remember playing around with wireframe rendering some time ago, and it was indeed pretty fast on NVidia chipsets (I think it was the 6800). But it was horribly slow an ATI X1600 card I tried (which was no surprise, to be honest).
Both GeForce and Quadro have line rendering hardware, although the latter is much faster.
No AA, but I am still rendering with GLSL but calling these functions

if(gRenderMode)glPolygonMode(GL_FRONT, GL_FILL);	//GL_FRONT_AND_BACKelseglPolygonMode(GL_FRONT, GL_LINE);



and these are the hints I have set

	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);	glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);	glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);


Other than that nothing comes to mind what would cause this...

as has been mentioned glPolygonMode(GL_FRONT, GL_LINE); + glPolygonMode(GL_BACK, GL_FILL); might be slow so use GL_FRONT_AND_BACK
Quote:Original post by zedzeek
as has been mentioned glPolygonMode(GL_FRONT, GL_LINE); + glPolygonMode(GL_BACK, GL_FILL); might be slow so use GL_FRONT_AND_BACK


I already did and nothing changes still 1 fps...
Quote:Original post by Ravuya
The line rendering mode is very slow; I suspect it's done in software.


I also noticed that, I was using glPolygoneMode for cell-shading, which was very slow. It's much faster using lines instead.

Could it have something to do with requirements about rendering polygon edges? If you think about it, when rendering thick edges, the expected outputs would differ in the two methods.
-- Top10 Racing Simulation needs more developers!http://www.top10-racing.org

This topic is closed to new replies.

Advertisement