glfwInit function

int glfwInit()

! @brief 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.

@return GLFW_TRUE if successful, or GLFW_FALSE if an error(@ref error_handling) 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.

@remark @x11 This function will set the LC_CTYPE category of the application locale according to the current environment if that category is still "C". This is because the "C" locale breaks Unicode text input.

@thread_safety This function must only be called from the main thread.

@sa @ref intro_init @sa @ref glfwTerminate

@since Added in version 1.0.

@ingroup init

GLFWAPI int glfwInit(void)

Implementation

int glfwInit() {
  final glfwInitLookupFunction =
      libglfw.lookupFunction<Int32 Function(), int Function()>('glfwInit');
  return glfwInitLookupFunction();
}