Functions | |
int | glfwInit (void) |
Initializes the GLFW library. More... | |
void | glfwTerminate (void) |
Terminates the GLFW library. More... | |
void | glfwGetVersion (int *major, int *minor, int *rev) |
Retrieves the version of the GLFW library. More... | |
const char * | glfwGetVersionString (void) |
Returns a string describing the compile-time configuration. More... | |
GLFW version macros | |
#define | GLFW_VERSION_MAJOR 3 |
The major version number of the GLFW library. More... | |
#define | GLFW_VERSION_MINOR 0 |
The minor version number of the GLFW library. More... | |
#define | GLFW_VERSION_REVISION 4 |
The revision number of the GLFW library. More... | |
#define GLFW_VERSION_MAJOR 3 |
This is incremented when the API is changed in non-compatible ways.
#define GLFW_VERSION_MINOR 0 |
This is incremented when features are added to the API but it remains backward-compatible.
#define GLFW_VERSION_REVISION 4 |
This is incremented when a bug fix release is made that does not contain any API changes.
void glfwGetVersion | ( | int * | major, |
int * | minor, | ||
int * | rev | ||
) |
This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.
[out] | major | Where to store the major version number, or NULL . |
[out] | minor | Where to store the minor version number, or NULL . |
[out] | rev | Where to store the revision number, or NULL . |
const char* glfwGetVersionString | ( | void | ) |
This function returns a static string generated at compile-time according to which configuration macros were defined. This is intended for use when submitting bug reports, to allow developers to see which code paths are enabled in a binary.
The format of the string is as follows:
For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL back ends, the version string may look something like this:
3.0.0 Win32 WGL MinGW
int glfwInit | ( | void | ) |
This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before a program terminates GLFW should be terminated in order to free any resources allocated during or after initialization.
If this function fails, it calls glfwTerminate before returning. If it succeeds, you should call glfwTerminate before the program exits.
Additional calls to this function after successful initialization but before termination will succeed but will do nothing.
GL_TRUE
if successful, or GL_FALSE
if an error occurred.atexit
.Contents/Resources
subdirectory of the application's bundle, if present.void glfwTerminate | ( | void | ) |
This function destroys all remaining windows, frees any allocated resources and sets the library to an uninitialized state. Once this is called, you must again call glfwInit successfully before you will be able to use most GLFW functions.
If GLFW has been successfully initialized, this function should be called before the program exits. If initialization fails, there is no need to call this function, as it is called by glfwInit before it returns failure.
Last update on Sun Nov 4 2018 for GLFW 3.0.4