glfwInit

Initializes the GLFW library.

This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.

If this function fails, it calls @ref glfwTerminate before returning. If it succeeds, you should call @ref glfwTerminate before the application exits.

Additional calls to this function after successful initialization but before termination will return GLFW_TRUE immediately.

extern (C) @nogc nothrow __gshared
int
glfwInit
()

Return Value

Type: int

GLFW_TRUE if successful, or GLFW_FALSE if an error occurred.

Errors: Possible errors include @ref GLFW_PLATFORM_ERROR.

@remark @macos This function will change the current directory of the application to the Contents/Resources subdirectory of the application's bundle, if present. This can be disabled with the @ref GLFW_COCOA_CHDIR_RESOURCES init hint.

Thread Safety

This function must only be called from the main thread.

@sa @ref intro_init @sa @ref glfwTerminate

Meta

Since

Added in version 1.0.

Ingroup: init