

Note GLFW does not provide any of the API headers mentioned below. Only one of these may be defined at a time. The following macros control which OpenGL or OpenGL ES API header is included. GLFW_DLL is required on Windows when using the GLFW DLL, to tell the compiler that the GLFW functions are defined in a DLL. These macros may be defined before the inclusion of the GLFW header and affect its behavior. Most extension loaders also define macros that disable similar headers below it. GLFW attempts to detect any OpenGL or OpenGL ES header or extension loader header included before it and will then disable the inclusion of the default OpenGL header.

If you are using an OpenGL extension loading library such as glad, the extension loader header should be included before the GLFW one. If you do need such headers, include them before the GLFW header.Do not include window system headers unless you will use those APIs directly.Use the GLFW header to include OpenGL or OpenGL ES headers portably.windows.h cannot cope if any Win32 symbols have already been defined. It does this only when needed, so if window system headers are included, the GLFW header does not try to redefine those symbols. The GLFW header also defines any platform-specific macros needed by your OpenGL header, so that it can be included without needing any window system headers.
Cmake link library directory how to#
See option macros below for how to select OpenGL ES headers and more. By default it also includes the OpenGL header from your development environment. This header defines all the constants and declares all the types and function prototypes of the GLFW API.
