I am trying to use glew 1.10.0 with the latest XCode(5.0.2) an the latest Mac OsX version. So far, I have tried different things:
I am always getting the error "'GL/glew.h' file not found"
Since there is a single library you link to whether you get the legacy OpenGL 2.1 renderer or a core 3.2+ renderer, GLEW is completely unnecessary on OS X. This means that things from OpenGL 3.2+ will resolve at link-time (before you even have a render context to check whether it is supported or not). If you try to use functions that are not implemented by your renderer at run-time however, you will either get a GL_INVALID_OPERATION error or the operation will silently fail. It is a difference between link-time (OS X) and run-time (Windows, Linux, etc.) resolution of GL functions.
Just include <OpenGL/gl3.h> if you are going to use functionality from OpenGL 3.2+ core on OS X and forget about GLEW. The set of implemented extensions across all hardware OS X officially supports is relatively homogeneous depending more on the renderer version than the actual hardware vendor (Apple writes all of the drivers). You should refer to this matrix that Apple publishes for more details on GL capabilities, rather than relying on GLEW.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With