I’m porting a crossplatform 2D library under OpenGL. And occured a strange problem.
Test application works fine. The scene is rendered properly, and CPU load is very small. But after drawing some antialiased lines using GL_LINES I encounter a strange effect: application runs perfect until some invisible polygons runs into rendered scene. At this moment CPU load is about 100% It holds until this elements are at the screen. As soon I move them into invisible space everything becomes normal.
All polygons are textured.
Does anyone knows the possible cause of this effect?
I’ve had some issues with mixing line smoothing and shaders (ARB_fp, ATI_fs) on this type of card, though it was never a performance problem. I don’t know a proper solution to this, unfortunately. On these cards I use either shaders or line smoothing, but not both.
Does your renderer use shaders?
If it does, try disabling GL_LINE_SMOOTH and see if it brings performance back to normal.