A Basic 3d Scene example from ofBook and openGL version

Hi, I tried running the “Basic 3d Scene” example code from ofBook.

http://openframeworks.cc/ofBook/chapters/openGL.html

The example uses ofLight, ofEasyCam, ofBoxPrimitive and ofMaterial.

And I found out in order to run the example properly, I had to add “settings.setGLVersion(3, 2);” in int main( ) {} in main.cpp file as written in the ofBook.

Without this line, I could just see a white box which doesn’t seem to get affected by ofLight or ofMaterial.

Could someone please tell me what is disabled in the default openGL version and what gets enabled by setting the openGL version to (3,2)? And why OF doesn’t use this version as default?

Thanks in advance!

(I’m using OF v.0.9.8_osx by the way)

Your GPU probably supports several OpenGL versions, developers can choose based on their preference. As different versions have different API and functionality. Lots of things are enabled/disabled when changing versions.

More on OpenGL versions

1 Like

I see, Thank you!!