OpenGL Performance in 8.3 vs 7.4

Hello there.
I have ported one graphic application from Openframeworks 7.4 to 8.3 under Visual Studio. The code is just the same for both of them, nothing changes.

However fps performance have decreased from 250 fps in 7.4, to 170 fps in 8.3. I am running the app in the same PC. Of course, I am using the release file.

Mostly I am using ofLine and glColor3f calls for drawing.
Is it normal, have you seen the same behavior? Is there something that I can do?

Thank you.

The code for ofLine is exactly the same so not sure what might be the difference.

ofLine might be relatively slow if you are drawing lots of them since you are sending vertices 2 by 2 to the graphics card, in order to optimize it, i would use an ofVboMesh in OF_PRIMITIVE_LINES mode and only update the lines that change every frame. Then you will have 1 draw instead of lots of them which should make the application run much faster.

Thank you Arturo. Will try that ofVboMesh, however I would like to find the “difference”.

Anyway, I forgot to mention that I am also usinf ofxUI from rezaali, but I think the problem is not there because if I disable it the performance boost is similar in both versions.

Besides, the rendering of ofLine is not exactly the same, in the old OFv7.4 the lines were sharper. That is why I asked about if OpenGL has changed.

oh that’s because in 0.8 we’ve enabled antialiasing by default, you can disable it by using ofDisableAntiAliasing().

Ok, I see. Thank you.

Now disabling antialiasing has increased the framerate from 170 to 210 fps. Still 40 fps missing ;).
Is there any other default setting changed?

even if you disable antialiasing the context is now created with support for it so it might be that that’s affecting the performance. you can try to use a glut window which should have the same defaults as before to see if that’s the reason. i wouldn’t care much unless you hit the 60fps of the vsync and in any case there’s ways to optimize the code, like not using ofLine, which should give you much more performance raise than disabling antialiasing

also we changed the way to measure the fps since there were some things wrong before 0.8 so that might be another difference

Thank you Arturo.

Actually I needed those fps, since I am storing some data in each loop, wether it was drawn or not (beacuse of the vsync).

If we disable the draw of ofxUI the fps are the same now, so it seems to meet with what you said about the fps are measured now.

Thank you for the outstanding help!!!