The performance difference might be because of your GPU model. What are you using? Which OS are you using?
Besides, you can always use shaders, regardless of these settings. Yet, the difference is that the code for shaders is slightly different when using GL3.2 or higher. The code you’ll find online most often is GL2 (which is the default, the one you set using ofSetupOpenGL(1024,768,OF_WINDOW); )
Take a look at the examples/shaders/ which have the shader code for both versions.
thanks for the quick answer ! i’m on windows 10 using a GTX 1080 Ti
I’d love to understand why it is like this if ever you have an idea.
is openframeworks lighting and 3D more optimized with GL2 than with GL3.2 ?
Hi, well you have a quite powerful GPU, so it is not a problem of capabilities. Try to run the app in release mode and do the comparisons in that mode rather than debug, as on windows, debug mode tends to slow down a lot of precesses.
GL3.2 is often called the “programmable pipeline” or “programmable renderer” as you have to program and define everything through shaders, incuding lights. This gives you a lot more flexibility but you might need to add a lot more code to leverage with GL2 (although OF already does so for you ). The lights in GL2 are part of the GL standard, you dont code anything of these but these are quite limited. In this sense, OF internaly uses shaders for lights when using GL3.2. These are quite standard so these should not behave slower than GL2. I would say that the problem is running on Debug mode. Let me know if running on Release mode fixes it