See error handling for how these are used.
|No error has occurred.
|GLFW has not been initialized.
|No context is current for this thread.
|One of the arguments to the function was an invalid enum value.
|One of the arguments to the function was an invalid value.
|A memory allocation failed.
|GLFW could not find support for the requested API on the system.
|The requested OpenGL or OpenGL ES version is not available.
|A platform-specific error occurred that does not match any of the more specific categories.
|The requested format is not supported or available.
|The specified window does not have an OpenGL or OpenGL ES context.
|The specified cursor shape is not available.
|The requested feature is not provided by the platform.
|The requested feature is not implemented for the platform.
|Platform unavailable or no matching platform was found.
|#define GLFW_NO_ERROR 0
No error has occurred.
|#define GLFW_NOT_INITIALIZED 0x00010001
This occurs if a GLFW function was called that must not be called unless the library is initialized.
|#define GLFW_NO_CURRENT_CONTEXT 0x00010002
This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the calling thread. One such function is glfwSwapInterval.
|#define GLFW_INVALID_ENUM 0x00010003
|#define GLFW_INVALID_VALUE 0x00010004
One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.
Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a GLFW_VERSION_UNAVAILABLE error.
|#define GLFW_OUT_OF_MEMORY 0x00010005
A memory allocation failed.
|#define GLFW_API_UNAVAILABLE 0x00010006
GLFW could not find support for the requested API on the system.
|#define GLFW_VERSION_UNAVAILABLE 0x00010007
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
|#define GLFW_PLATFORM_ERROR 0x00010008
A platform-specific error occurred that does not match any of the more specific categories.
|#define GLFW_FORMAT_UNAVAILABLE 0x00010009
If emitted during window creation, the requested pixel format is not supported.
If emitted when querying the clipboard, the contents of the clipboard could not be converted to the requested format.
|#define GLFW_NO_WINDOW_CONTEXT 0x0001000A
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
|#define GLFW_CURSOR_UNAVAILABLE 0x0001000B
|#define GLFW_FEATURE_UNAVAILABLE 0x0001000C
The requested feature is not provided by the platform, so GLFW is unable to implement it. The documentation for each function notes if it could emit this error.
|#define GLFW_FEATURE_UNIMPLEMENTED 0x0001000D
The requested feature has not yet been implemented in GLFW for this platform.
|#define GLFW_PLATFORM_UNAVAILABLE 0x0001000E
If emitted during initialization, no matching platform was found. If the GLFW_PLATFORM init hint was set to
GLFW_ANY_PLATFORM, GLFW could not detect any of the platforms supported by this library binary, except for the Null platform. If the init hint was set to a specific platform, it is either not supported by this library binary or GLFW was not able to detect it.
If emitted by a native access function, GLFW was initialized for a different platform than the function is for.
Failure to detect a specific platform may have the same cause as above or be because support for that platform was not compiled in. Call glfwPlatformSupported to check whether a specific platform is supported by a library binary.
Last update on Fri Feb 23 2024 for GLFW 3.4.0