Package org.lwjgl.glfw
GLFW comes with extensive documentation, which you can read online here. The Frequently Asked Questions are also useful.
Using GLFW on macOS
On macOS the JVM must be started with the -XstartOnFirstThread argument for GLFW to work. This is necessary because most GLFW functions must be
called on the main thread and the Cocoa API requires that thread to be the first thread in the process. GLFW windows and the GLFW event loop are
incompatible with other window toolkits (such as AWT/Swing or JavaFX).
Applications that cannot function with the above limitation may set GLFW_LIBRARY_NAME to the
value "glfw_async". This will instruct LWJGL to load an alternative GLFW build that dispatches Cocoa calls to the main thread in blocking mode.
The other window toolkit must be initialized (e.g. with AWT's Toolkit.getDefaultToolkit()) before Init is called.
Resources
-
ClassDescriptionUtility class for GLFW callbacks.Contains the function pointers loaded from the glfw
SharedLibrary.Callback function:GLFWallocatefunCallback function:GLFWallocatefunstruct GLFWallocator {GLFWallocatefunallocate;GLFWreallocatefunreallocate;GLFWdeallocatefundeallocate; void * user; }An array ofGLFWAllocatorstructs.Callback function:GLFWcharfunCallback function:GLFWcharfunCallback function:GLFWcharmodsfunCallback function:GLFWcharmodsfunCallback function:GLFWcursorenterfunCallback function:GLFWcursorenterfunCallback function:GLFWcursorposfunCallback function:GLFWcursorposfunCallback function:GLFWdeallocatefunCallback function:GLFWdeallocatefunCallback function:GLFWdropfunCallback function:GLFWdropfunCallback function:GLFWerrorfunCallback function:GLFWerrorfunCallback function:GLFWframebuffersizefunCallback function:GLFWframebuffersizefunstruct GLFWgamepadstate { unsigned char buttons[15]; float axes[6]; }An array ofGLFWGamepadStatestructs.struct GLFWgammaramp { unsigned short * red; unsigned short * green; unsigned short * blue; unsigned int size; }An array ofGLFWGammaRampstructs.struct GLFWimage { int width; int height; unsigned char * pixels; }An array ofGLFWImagestructs.Callback function:GLFWimestatusfunCallback function:GLFWimestatusfunCallback function:GLFWjoystickfunCallback function:GLFWjoystickfunCallback function:GLFWkeyfunCallback function:GLFWkeyfunCallback function:GLFWmonitorfunCallback function:GLFWmonitorfunCallback function:GLFWmousebuttonfunCallback function:GLFWmousebuttonfunContains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Contains the function pointers loaded fromGLFW.getLibrary().Callback function:GLFWpreeditfunCallback function:GLFWpreeditfunCallback function:GLFWpreeditcandidatefunCallback function:GLFWpreeditcandidatefunCallback function:GLFWreallocatefunCallback function:GLFWreallocatefunCallback function:GLFWscrollfunCallback function:GLFWscrollfunstruct GLFWvidmode { int width; int height; int redBits; int greenBits; int blueBits; int refreshRate; }An array ofGLFWVidModestructs.Contains the function pointers loaded fromGLFW.getLibrary().Callback function:GLFWwindowclosefunCallback function:GLFWwindowclosefunCallback function:GLFWwindowcontentscalefunCallback function:GLFWwindowcontentscalefunCallback function:GLFWwindowfocusfunCallback function:GLFWwindowfocusfunCallback function:GLFWwindowiconifyfunCallback function:GLFWwindowiconifyfunCallback function:GLFWwindowmaximizefunCallback function:GLFWwindowmaximizefunCallback function:GLFWwindowposfunCallback function:GLFWwindowposfunCallback function:GLFWwindowrefreshfunCallback function:GLFWwindowrefreshfunCallback function:GLFWwindowsizefunCallback function:GLFWwindowsizefun