public class GLFW
extends java.lang.Object
GLFW is a free, Open Source, multi-platform library for opening a window, creating an OpenGL context and managing input. It is easy to integrate into existing applications and does not lay claim to the main loop.
| Modifier and Type | Class and Description |
|---|---|
static class |
GLFW.Functions
Contains the function pointers loaded from the glfw
SharedLibrary. |
| Modifier and Type | Field and Description |
|---|---|
static int |
GLFW_ACCUM_ALPHA_BITS
PixelFormat hints.
|
static int |
GLFW_ACCUM_BLUE_BITS
PixelFormat hints.
|
static int |
GLFW_ACCUM_GREEN_BITS
PixelFormat hints.
|
static int |
GLFW_ACCUM_RED_BITS
PixelFormat hints.
|
static int |
GLFW_ALPHA_BITS
PixelFormat hints.
|
static int |
GLFW_ANY_RELEASE_BEHAVIOR
Values for the
CONTEXT_RELEASE_BEHAVIOR hint. |
static int |
GLFW_API_UNAVAILABLE
Error codes.
|
static int |
GLFW_ARROW_CURSOR
The regular arrow cursor shape.
|
static int |
GLFW_AUTO_ICONIFY
Window attributes.
|
static int |
GLFW_AUX_BUFFERS
PixelFormat hints.
|
static int |
GLFW_BLUE_BITS
PixelFormat hints.
|
static int |
GLFW_CENTER_CURSOR
Window attributes.
|
static int |
GLFW_CLIENT_API
Client API hints.
|
static int |
GLFW_COCOA_CHDIR_RESOURCES
Init hints.
|
static int |
GLFW_COCOA_FRAME_NAME
Specifies the UTF-8 encoded name to use for autosaving the window frame, or if empty disables frame autosaving for the window.
|
static int |
GLFW_COCOA_GRAPHICS_SWITCHING
Specifies whether to enable Automatic Graphics Switching, i.e.
|
static int |
GLFW_COCOA_MENUBAR
Init hints.
|
static int |
GLFW_COCOA_RETINA_FRAMEBUFFER
Specifies whether to use full resolution framebuffers on Retina displays.
|
static int |
GLFW_CONNECTED
Monitor events.
|
static int |
GLFW_CONTEXT_CREATION_API
Client API hints.
|
static int |
GLFW_CONTEXT_NO_ERROR
Client API hints.
|
static int |
GLFW_CONTEXT_RELEASE_BEHAVIOR
Client API hints.
|
static int |
GLFW_CONTEXT_REVISION
Client API hints.
|
static int |
GLFW_CONTEXT_ROBUSTNESS
Client API hints.
|
static int |
GLFW_CONTEXT_VERSION_MAJOR
Client API hints.
|
static int |
GLFW_CONTEXT_VERSION_MINOR
Client API hints.
|
static int |
GLFW_CROSSHAIR_CURSOR
The crosshair cursor shape.
|
static int |
GLFW_CURSOR
Input options.
|
static int |
GLFW_CURSOR_DISABLED
Cursor state.
|
static int |
GLFW_CURSOR_HIDDEN
Cursor state.
|
static int |
GLFW_CURSOR_NORMAL
Cursor state.
|
static int |
GLFW_CURSOR_UNAVAILABLE
Error codes.
|
static int |
GLFW_DECORATED
Window attributes.
|
static int |
GLFW_DEPTH_BITS
PixelFormat hints.
|
static int |
GLFW_DISCONNECTED
Monitor events.
|
static int |
GLFW_DONT_CARE
Don't care value.
|
static int |
GLFW_DOUBLEBUFFER
PixelFormat hints.
|
static int |
GLFW_EGL_CONTEXT_API
Values for the
CONTEXT_CREATION_API hint. |
static int |
GLFW_FALSE
Boolean values.
|
static int |
GLFW_FLOATING
Window attributes.
|
static int |
GLFW_FOCUS_ON_SHOW
Window attributes.
|
static int |
GLFW_FOCUSED
Window attributes.
|
static int |
GLFW_FORMAT_UNAVAILABLE
Error codes.
|
static int |
GLFW_GAMEPAD_AXIS_LAST
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_LEFT_TRIGGER
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_LEFT_X
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_LEFT_Y
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_RIGHT_X
Gamepad axes.
|
static int |
GLFW_GAMEPAD_AXIS_RIGHT_Y
Gamepad axes.
|
static int |
GLFW_GAMEPAD_BUTTON_A
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_B
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_BACK
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_CIRCLE
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_CROSS
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_DPAD_DOWN
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_DPAD_LEFT
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_DPAD_RIGHT
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_DPAD_UP
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_GUIDE
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_LAST
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_LEFT_BUMPER
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_LEFT_THUMB
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_RIGHT_THUMB
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_SQUARE
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_START
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_TRIANGLE
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_X
Gamepad buttons.
|
static int |
GLFW_GAMEPAD_BUTTON_Y
Gamepad buttons.
|
static int |
GLFW_GREEN_BITS
PixelFormat hints.
|
static int |
GLFW_HAND_CURSOR
Legacy name for compatibility.
|
static int |
GLFW_HAT_CENTERED
Joystick hat states.
|
static int |
GLFW_HAT_DOWN
Joystick hat states.
|
static int |
GLFW_HAT_LEFT
Joystick hat states.
|
static int |
GLFW_HAT_LEFT_DOWN
Joystick hat states.
|
static int |
GLFW_HAT_LEFT_UP
Joystick hat states.
|
static int |
GLFW_HAT_RIGHT
Joystick hat states.
|
static int |
GLFW_HAT_RIGHT_DOWN
Joystick hat states.
|
static int |
GLFW_HAT_RIGHT_UP
Joystick hat states.
|
static int |
GLFW_HAT_UP
Joystick hat states.
|
static int |
GLFW_HOVERED
Window attributes.
|
static int |
GLFW_HRESIZE_CURSOR
Legacy name for compatibility.
|
static int |
GLFW_IBEAM_CURSOR
The text input I-beam cursor shape.
|
static int |
GLFW_ICONIFIED
Window attributes.
|
static int |
GLFW_INVALID_ENUM
Error codes.
|
static int |
GLFW_INVALID_VALUE
Error codes.
|
static int |
GLFW_JOYSTICK_1
Joysticks.
|
static int |
GLFW_JOYSTICK_10
Joysticks.
|
static int |
GLFW_JOYSTICK_11
Joysticks.
|
static int |
GLFW_JOYSTICK_12
Joysticks.
|
static int |
GLFW_JOYSTICK_13
Joysticks.
|
static int |
GLFW_JOYSTICK_14
Joysticks.
|
static int |
GLFW_JOYSTICK_15
Joysticks.
|
static int |
GLFW_JOYSTICK_16
Joysticks.
|
static int |
GLFW_JOYSTICK_2
Joysticks.
|
static int |
GLFW_JOYSTICK_3
Joysticks.
|
static int |
GLFW_JOYSTICK_4
Joysticks.
|
static int |
GLFW_JOYSTICK_5
Joysticks.
|
static int |
GLFW_JOYSTICK_6
Joysticks.
|
static int |
GLFW_JOYSTICK_7
Joysticks.
|
static int |
GLFW_JOYSTICK_8
Joysticks.
|
static int |
GLFW_JOYSTICK_9
Joysticks.
|
static int |
GLFW_JOYSTICK_HAT_BUTTONS
Init hints.
|
static int |
GLFW_JOYSTICK_LAST
Joysticks.
|
static int |
GLFW_KEY_0
Printable keys.
|
static int |
GLFW_KEY_1
Printable keys.
|
static int |
GLFW_KEY_2
Printable keys.
|
static int |
GLFW_KEY_3
Printable keys.
|
static int |
GLFW_KEY_4
Printable keys.
|
static int |
GLFW_KEY_5
Printable keys.
|
static int |
GLFW_KEY_6
Printable keys.
|
static int |
GLFW_KEY_7
Printable keys.
|
static int |
GLFW_KEY_8
Printable keys.
|
static int |
GLFW_KEY_9
Printable keys.
|
static int |
GLFW_KEY_A
Printable keys.
|
static int |
GLFW_KEY_APOSTROPHE
Printable keys.
|
static int |
GLFW_KEY_B
Printable keys.
|
static int |
GLFW_KEY_BACKSLASH
Printable keys.
|
static int |
GLFW_KEY_BACKSPACE
Function keys.
|
static int |
GLFW_KEY_C
Printable keys.
|
static int |
GLFW_KEY_CAPS_LOCK
Function keys.
|
static int |
GLFW_KEY_COMMA
Printable keys.
|
static int |
GLFW_KEY_D
Printable keys.
|
static int |
GLFW_KEY_DELETE
Function keys.
|
static int |
GLFW_KEY_DOWN
Function keys.
|
static int |
GLFW_KEY_E
Printable keys.
|
static int |
GLFW_KEY_END
Function keys.
|
static int |
GLFW_KEY_ENTER
Function keys.
|
static int |
GLFW_KEY_EQUAL
Printable keys.
|
static int |
GLFW_KEY_ESCAPE
Function keys.
|
static int |
GLFW_KEY_F
Printable keys.
|
static int |
GLFW_KEY_F1
Function keys.
|
static int |
GLFW_KEY_F10
Function keys.
|
static int |
GLFW_KEY_F11
Function keys.
|
static int |
GLFW_KEY_F12
Function keys.
|
static int |
GLFW_KEY_F13
Function keys.
|
static int |
GLFW_KEY_F14
Function keys.
|
static int |
GLFW_KEY_F15
Function keys.
|
static int |
GLFW_KEY_F16
Function keys.
|
static int |
GLFW_KEY_F17
Function keys.
|
static int |
GLFW_KEY_F18
Function keys.
|
static int |
GLFW_KEY_F19
Function keys.
|
static int |
GLFW_KEY_F2
Function keys.
|
static int |
GLFW_KEY_F20
Function keys.
|
static int |
GLFW_KEY_F21
Function keys.
|
static int |
GLFW_KEY_F22
Function keys.
|
static int |
GLFW_KEY_F23
Function keys.
|
static int |
GLFW_KEY_F24
Function keys.
|
static int |
GLFW_KEY_F25
Function keys.
|
static int |
GLFW_KEY_F3
Function keys.
|
static int |
GLFW_KEY_F4
Function keys.
|
static int |
GLFW_KEY_F5
Function keys.
|
static int |
GLFW_KEY_F6
Function keys.
|
static int |
GLFW_KEY_F7
Function keys.
|
static int |
GLFW_KEY_F8
Function keys.
|
static int |
GLFW_KEY_F9
Function keys.
|
static int |
GLFW_KEY_G
Printable keys.
|
static int |
GLFW_KEY_GRAVE_ACCENT
Printable keys.
|
static int |
GLFW_KEY_H
Printable keys.
|
static int |
GLFW_KEY_HOME
Function keys.
|
static int |
GLFW_KEY_I
Printable keys.
|
static int |
GLFW_KEY_INSERT
Function keys.
|
static int |
GLFW_KEY_J
Printable keys.
|
static int |
GLFW_KEY_K
Printable keys.
|
static int |
GLFW_KEY_KP_0
Function keys.
|
static int |
GLFW_KEY_KP_1
Function keys.
|
static int |
GLFW_KEY_KP_2
Function keys.
|
static int |
GLFW_KEY_KP_3
Function keys.
|
static int |
GLFW_KEY_KP_4
Function keys.
|
static int |
GLFW_KEY_KP_5
Function keys.
|
static int |
GLFW_KEY_KP_6
Function keys.
|
static int |
GLFW_KEY_KP_7
Function keys.
|
static int |
GLFW_KEY_KP_8
Function keys.
|
static int |
GLFW_KEY_KP_9
Function keys.
|
static int |
GLFW_KEY_KP_ADD
Function keys.
|
static int |
GLFW_KEY_KP_DECIMAL
Function keys.
|
static int |
GLFW_KEY_KP_DIVIDE
Function keys.
|
static int |
GLFW_KEY_KP_ENTER
Function keys.
|
static int |
GLFW_KEY_KP_EQUAL
Function keys.
|
static int |
GLFW_KEY_KP_MULTIPLY
Function keys.
|
static int |
GLFW_KEY_KP_SUBTRACT
Function keys.
|
static int |
GLFW_KEY_L
Printable keys.
|
static int |
GLFW_KEY_LAST
Function keys.
|
static int |
GLFW_KEY_LEFT
Function keys.
|
static int |
GLFW_KEY_LEFT_ALT
Function keys.
|
static int |
GLFW_KEY_LEFT_BRACKET
Printable keys.
|
static int |
GLFW_KEY_LEFT_CONTROL
Function keys.
|
static int |
GLFW_KEY_LEFT_SHIFT
Function keys.
|
static int |
GLFW_KEY_LEFT_SUPER
Function keys.
|
static int |
GLFW_KEY_M
Printable keys.
|
static int |
GLFW_KEY_MENU
Function keys.
|
static int |
GLFW_KEY_MINUS
Printable keys.
|
static int |
GLFW_KEY_N
Printable keys.
|
static int |
GLFW_KEY_NUM_LOCK
Function keys.
|
static int |
GLFW_KEY_O
Printable keys.
|
static int |
GLFW_KEY_P
Printable keys.
|
static int |
GLFW_KEY_PAGE_DOWN
Function keys.
|
static int |
GLFW_KEY_PAGE_UP
Function keys.
|
static int |
GLFW_KEY_PAUSE
Function keys.
|
static int |
GLFW_KEY_PERIOD
Printable keys.
|
static int |
GLFW_KEY_PRINT_SCREEN
Function keys.
|
static int |
GLFW_KEY_Q
Printable keys.
|
static int |
GLFW_KEY_R
Printable keys.
|
static int |
GLFW_KEY_RIGHT
Function keys.
|
static int |
GLFW_KEY_RIGHT_ALT
Function keys.
|
static int |
GLFW_KEY_RIGHT_BRACKET
Printable keys.
|
static int |
GLFW_KEY_RIGHT_CONTROL
Function keys.
|
static int |
GLFW_KEY_RIGHT_SHIFT
Function keys.
|
static int |
GLFW_KEY_RIGHT_SUPER
Function keys.
|
static int |
GLFW_KEY_S
Printable keys.
|
static int |
GLFW_KEY_SCROLL_LOCK
Function keys.
|
static int |
GLFW_KEY_SEMICOLON
Printable keys.
|
static int |
GLFW_KEY_SLASH
Printable keys.
|
static int |
GLFW_KEY_SPACE
Printable keys.
|
static int |
GLFW_KEY_T
Printable keys.
|
static int |
GLFW_KEY_TAB
Function keys.
|
static int |
GLFW_KEY_U
Printable keys.
|
static int |
GLFW_KEY_UNKNOWN
The unknown key.
|
static int |
GLFW_KEY_UP
Function keys.
|
static int |
GLFW_KEY_V
Printable keys.
|
static int |
GLFW_KEY_W
Printable keys.
|
static int |
GLFW_KEY_WORLD_1
Printable keys.
|
static int |
GLFW_KEY_WORLD_2
Printable keys.
|
static int |
GLFW_KEY_X
Printable keys.
|
static int |
GLFW_KEY_Y
Printable keys.
|
static int |
GLFW_KEY_Z
Printable keys.
|
static int |
GLFW_LOCK_KEY_MODS
Input options.
|
static int |
GLFW_LOSE_CONTEXT_ON_RESET
Values for the
CONTEXT_ROBUSTNESS hint. |
static int |
GLFW_MAXIMIZED
Window attributes.
|
static int |
GLFW_MOD_ALT
If this bit is set one or more Alt keys were held down.
|
static int |
GLFW_MOD_CAPS_LOCK
If this bit is set the Caps Lock key is enabled and the
LOCK_KEY_MODS input mode is set. |
static int |
GLFW_MOD_CONTROL
If this bit is set one or more Control keys were held down.
|
static int |
GLFW_MOD_NUM_LOCK
If this bit is set the Num Lock key is enabled and the
LOCK_KEY_MODS input mode is set. |
static int |
GLFW_MOD_SHIFT
If this bit is set one or more Shift keys were held down.
|
static int |
GLFW_MOD_SUPER
If this bit is set one or more Super keys were held down.
|
static int |
GLFW_MOUSE_BUTTON_1
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_2
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_3
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_4
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_5
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_6
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_7
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_8
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_LAST
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_LEFT
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_MIDDLE
Mouse buttons.
|
static int |
GLFW_MOUSE_BUTTON_RIGHT
Mouse buttons.
|
static int |
GLFW_NATIVE_CONTEXT_API
Values for the
CONTEXT_CREATION_API hint. |
static int |
GLFW_NO_API
Values for the
CLIENT_API hint. |
static int |
GLFW_NO_CURRENT_CONTEXT
Error codes.
|
static int |
GLFW_NO_ERROR
Error codes.
|
static int |
GLFW_NO_RESET_NOTIFICATION
Values for the
CONTEXT_ROBUSTNESS hint. |
static int |
GLFW_NO_ROBUSTNESS
Values for the
CONTEXT_ROBUSTNESS hint. |
static int |
GLFW_NO_WINDOW_CONTEXT
Error codes.
|
static int |
GLFW_NOT_ALLOWED_CURSOR
The operation-not-allowed shape.
|
static int |
GLFW_NOT_INITIALIZED
Error codes.
|
static int |
GLFW_OPENGL_ANY_PROFILE
Values for the
OPENGL_PROFILE hint. |
static int |
GLFW_OPENGL_API
Values for the
CLIENT_API hint. |
static int |
GLFW_OPENGL_COMPAT_PROFILE
Values for the
OPENGL_PROFILE hint. |
static int |
GLFW_OPENGL_CORE_PROFILE
Values for the
OPENGL_PROFILE hint. |
static int |
GLFW_OPENGL_DEBUG_CONTEXT
Client API hints.
|
static int |
GLFW_OPENGL_ES_API
Values for the
CLIENT_API hint. |
static int |
GLFW_OPENGL_FORWARD_COMPAT
Client API hints.
|
static int |
GLFW_OPENGL_PROFILE
Client API hints.
|
static int |
GLFW_OSMESA_CONTEXT_API
Values for the
CONTEXT_CREATION_API hint. |
static int |
GLFW_OUT_OF_MEMORY
Error codes.
|
static int |
GLFW_PLATFORM_ERROR
Error codes.
|
static int |
GLFW_POINTING_HAND_CURSOR
The pointing hand cursor shape.
|
static int |
GLFW_PRESS
The key or button was pressed.
|
static int |
GLFW_RAW_MOUSE_MOTION
Input options.
|
static int |
GLFW_RED_BITS
PixelFormat hints.
|
static int |
GLFW_REFRESH_RATE
PixelFormat hints.
|
static int |
GLFW_RELEASE
The key or button was released.
|
static int |
GLFW_RELEASE_BEHAVIOR_FLUSH
Values for the
CONTEXT_RELEASE_BEHAVIOR hint. |
static int |
GLFW_RELEASE_BEHAVIOR_NONE
Values for the
CONTEXT_RELEASE_BEHAVIOR hint. |
static int |
GLFW_REPEAT
The key was held down until it repeated.
|
static int |
GLFW_RESIZABLE
Window attributes.
|
static int |
GLFW_RESIZE_ALL_CURSOR
The omni-directional resize cursor/move shape.
|
static int |
GLFW_RESIZE_EW_CURSOR
The horizontal resize/move arrow shape.
|
static int |
GLFW_RESIZE_NESW_CURSOR
The top-right to bottom-left diagonal resize/move shape.
|
static int |
GLFW_RESIZE_NS_CURSOR
The vertical resize/move shape.
|
static int |
GLFW_RESIZE_NWSE_CURSOR
The top-left to bottom-right diagonal resize/move shape.
|
static int |
GLFW_SAMPLES
PixelFormat hints.
|
static int |
GLFW_SCALE_TO_MONITOR
Client API hints.
|
static int |
GLFW_SRGB_CAPABLE
PixelFormat hints.
|
static int |
GLFW_STENCIL_BITS
PixelFormat hints.
|
static int |
GLFW_STEREO
PixelFormat hints.
|
static int |
GLFW_STICKY_KEYS
Input options.
|
static int |
GLFW_STICKY_MOUSE_BUTTONS
Input options.
|
static int |
GLFW_TRANSPARENT_FRAMEBUFFER
Window attributes.
|
static int |
GLFW_TRUE
Boolean values.
|
static int |
GLFW_VERSION_MAJOR
The major version number of the GLFW library.
|
static int |
GLFW_VERSION_MINOR
The minor version number of the GLFW library.
|
static int |
GLFW_VERSION_REVISION
The revision number of the GLFW library.
|
static int |
GLFW_VERSION_UNAVAILABLE
Error codes.
|
static int |
GLFW_VISIBLE
Window attributes.
|
static int |
GLFW_VRESIZE_CURSOR
Legacy name for compatibility.
|
static int |
GLFW_WIN32_KEYBOARD_MENU
Specifies whether to allow access to the window menu via the Alt+Space and Alt-and-then-Space keyboard shortcuts.
|
static int |
GLFW_X11_CLASS_NAME
The desired ASCII encoded class and instance parts of the ICCCM
WM_CLASS window property. |
static int |
GLFW_X11_INSTANCE_NAME
The desired ASCII encoded class and instance parts of the ICCCM
WM_CLASS window property. |
| Modifier and Type | Method and Description |
|---|---|
static org.lwjgl.system.SharedLibrary |
getLibrary()
Returns the glfw
SharedLibrary. |
static long |
glfwCreateCursor(GLFWImage image,
int xhot,
int yhot)
Creates a new custom cursor image that can be set for a window with
SetCursor. |
static long |
glfwCreateStandardCursor(int shape)
Returns a cursor with a standard shape, that can be set for a window with
SetCursor. |
static long |
glfwCreateWindow(int width,
int height,
java.nio.ByteBuffer title,
long monitor,
long share)
Creates a window and its associated OpenGL or OpenGL ES context.
|
static long |
glfwCreateWindow(int width,
int height,
java.lang.CharSequence title,
long monitor,
long share)
Creates a window and its associated OpenGL or OpenGL ES context.
|
static void |
glfwDefaultWindowHints()
Resets all window hints to their default values.
|
static void |
glfwDestroyCursor(long cursor)
Destroys a cursor previously created with
CreateCursor. |
static void |
glfwDestroyWindow(long window)
Destroys the specified window and its context.
|
static boolean |
glfwExtensionSupported(java.nio.ByteBuffer extension)
Returns whether the specified API extension is supported by the current
OpenGL or OpenGL ES context.
|
static boolean |
glfwExtensionSupported(java.lang.CharSequence extension)
Returns whether the specified API extension is supported by the current
OpenGL or OpenGL ES context.
|
static void |
glfwFocusWindow(long window)
Brings the specified window to front and sets input focus.
|
static java.lang.String |
glfwGetClipboardString(long window)
Returns the contents of the system clipboard, if it contains or is convertible to a UTF-8 encoded string.
|
static long |
glfwGetCurrentContext()
Returns the window whose OpenGL or OpenGL ES context is current on the calling thread.
|
static void |
glfwGetCursorPos(long window,
double[] xpos,
double[] ypos)
Array version of:
GetCursorPos |
static void |
glfwGetCursorPos(long window,
java.nio.DoubleBuffer xpos,
java.nio.DoubleBuffer ypos)
Returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the content area of the specified window.
|
static int |
glfwGetError(org.lwjgl.PointerBuffer description)
Returns and clears the last error for the calling thread.
|
static void |
glfwGetFramebufferSize(long window,
int[] width,
int[] height)
Array version of:
GetFramebufferSize |
static void |
glfwGetFramebufferSize(long window,
java.nio.IntBuffer width,
java.nio.IntBuffer height)
Retrieves the size, in pixels, of the framebuffer of the specified window.
|
static java.lang.String |
glfwGetGamepadName(int jid)
Returns the human-readable name of the gamepad from the gamepad mapping assigned to the specified joystick.
|
static boolean |
glfwGetGamepadState(int jid,
GLFWGamepadState state)
Retrieves the state of the specified joystick remapped to an Xbox-like gamepad.
|
static GLFWGammaRamp |
glfwGetGammaRamp(long monitor)
Returns the current gamma ramp of the specified monitor.
|
static int |
glfwGetInputMode(long window,
int mode)
Returns the value of an input option for the specified window.
|
static java.nio.FloatBuffer |
glfwGetJoystickAxes(int jid)
Returns the values of all axes of the specified joystick.
|
static java.nio.ByteBuffer |
glfwGetJoystickButtons(int jid)
Returns the state of all buttons of the specified joystick.
|
static java.lang.String |
glfwGetJoystickGUID(int jid)
Returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick.
|
static java.nio.ByteBuffer |
glfwGetJoystickHats(int jid)
Returns the state of all hats of the specified joystick.
|
static java.lang.String |
glfwGetJoystickName(int jid)
Returns the name, encoded as UTF-8, of the specified joystick.
|
static long |
glfwGetJoystickUserPointer(int jid)
Returns the user pointer of the specified joystick.
|
static int |
glfwGetKey(long window,
int key)
Returns the last state reported for the specified key to the specified window.
|
static java.lang.String |
glfwGetKeyName(int key,
int scancode)
Returns the layout-specific name of the specified printable key.
|
static int |
glfwGetKeyScancode(int key)
Returns the platform dependent scancode of the specified key.
|
static void |
glfwGetMonitorContentScale(long monitor,
float[] xscale,
float[] yscale)
Array version of:
GetMonitorContentScale |
static void |
glfwGetMonitorContentScale(long monitor,
java.nio.FloatBuffer xscale,
java.nio.FloatBuffer yscale)
Retrieves the content scale for the specified monitor.
|
static java.lang.String |
glfwGetMonitorName(long monitor)
Returns a human-readable name, encoded as UTF-8, of the specified monitor.
|
static void |
glfwGetMonitorPhysicalSize(long monitor,
int[] widthMM,
int[] heightMM)
Array version of:
GetMonitorPhysicalSize |
static void |
glfwGetMonitorPhysicalSize(long monitor,
java.nio.IntBuffer widthMM,
java.nio.IntBuffer heightMM)
Returns the size, in millimetres, of the display area of the specified monitor.
|
static void |
glfwGetMonitorPos(long monitor,
int[] xpos,
int[] ypos)
Array version of:
GetMonitorPos |
static void |
glfwGetMonitorPos(long monitor,
java.nio.IntBuffer xpos,
java.nio.IntBuffer ypos)
Returns the position, in screen coordinates, of the upper-left corner of the specified monitor.
|
static org.lwjgl.PointerBuffer |
glfwGetMonitors()
Returns an array of handles for all currently connected monitors.
|
static long |
glfwGetMonitorUserPointer(long monitor)
Returns the user pointer of the specified monitor.
|
static void |
glfwGetMonitorWorkarea(long monitor,
int[] xpos,
int[] ypos,
int[] width,
int[] height)
Array version of:
GetMonitorWorkarea |
static void |
glfwGetMonitorWorkarea(long monitor,
java.nio.IntBuffer xpos,
java.nio.IntBuffer ypos,
java.nio.IntBuffer width,
java.nio.IntBuffer height)
Retrieves the work area of the monitor.
|
static int |
glfwGetMouseButton(long window,
int button)
Returns the last state reported for the specified mouse button to the specified window.
|
static long |
glfwGetPrimaryMonitor()
Returns the primary monitor.
|
static long |
glfwGetProcAddress(java.nio.ByteBuffer procname)
Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context.
|
static long |
glfwGetProcAddress(java.lang.CharSequence procname)
Returns the address of the specified OpenGL or OpenGL ES core or extension function, if it is supported by the current context.
|
static double |
glfwGetTime()
Returns the value of the GLFW timer.
|
static long |
glfwGetTimerFrequency()
Returns the frequency, in Hz, of the raw timer.
|
static long |
glfwGetTimerValue()
Returns the current value of the raw timer.
|
static void |
glfwGetVersion(int[] major,
int[] minor,
int[] rev)
Array version of:
GetVersion |
static void |
glfwGetVersion(java.nio.IntBuffer major,
java.nio.IntBuffer minor,
java.nio.IntBuffer rev)
Retrieves the major, minor and revision numbers of the GLFW library.
|
static java.lang.String |
glfwGetVersionString()
Returns the compile-time generated version string of the GLFW library binary.
|
static GLFWVidMode |
glfwGetVideoMode(long monitor)
Returns the current video mode of the specified monitor.
|
static GLFWVidMode.Buffer |
glfwGetVideoModes(long monitor)
Returns an array of all video modes supported by the specified monitor.
|
static int |
glfwGetWindowAttrib(long window,
int attrib)
Returns the value of an attribute of the specified window or its OpenGL or OpenGL ES context.
|
static void |
glfwGetWindowContentScale(long window,
float[] xscale,
float[] yscale)
Array version of:
GetWindowContentScale |
static void |
glfwGetWindowContentScale(long window,
java.nio.FloatBuffer xscale,
java.nio.FloatBuffer yscale)
Retrieves the content scale for the specified window.
|
static void |
glfwGetWindowFrameSize(long window,
int[] left,
int[] top,
int[] right,
int[] bottom)
Array version of:
GetWindowFrameSize |
static void |
glfwGetWindowFrameSize(long window,
java.nio.IntBuffer left,
java.nio.IntBuffer top,
java.nio.IntBuffer right,
java.nio.IntBuffer bottom)
Retrieves the size, in screen coordinates, of each edge of the frame of the specified window.
|
static long |
glfwGetWindowMonitor(long window)
Returns the handle of the monitor that the specified window is in full screen on.
|
static float |
glfwGetWindowOpacity(long window)
Returns the opacity of the whole window.
|
static void |
glfwGetWindowPos(long window,
int[] xpos,
int[] ypos)
Array version of:
GetWindowPos |
static void |
glfwGetWindowPos(long window,
java.nio.IntBuffer xpos,
java.nio.IntBuffer ypos)
Retrieves the position, in screen coordinates, of the upper-left corner of the content area of the specified window.
|
static void |
glfwGetWindowSize(long window,
int[] width,
int[] height)
Array version of:
GetWindowSize |
static void |
glfwGetWindowSize(long window,
java.nio.IntBuffer width,
java.nio.IntBuffer height)
Retrieves the size, in screen coordinates, of the content area of the specified window.
|
static long |
glfwGetWindowUserPointer(long window)
Returns the current value of the user-defined pointer of the specified window.
|
static void |
glfwHideWindow(long window)
Hides the specified window, if it was previously visible.
|
static void |
glfwIconifyWindow(long window)
Iconifies (minimizes) the specified window if it was previously restored.
|
static boolean |
glfwInit()
Initializes the GLFW library.
|
static void |
glfwInitHint(int hint,
int value)
Sets hints for the next initialization of GLFW.
|
static boolean |
glfwJoystickIsGamepad(int jid)
Returns whether the specified joystick is both present and has a gamepad mapping.
|
static boolean |
glfwJoystickPresent(int jid)
Returns whether the specified joystick is present.
|
static void |
glfwMakeContextCurrent(long window)
Makes the OpenGL or OpenGL ES context of the specified window current on the calling thread.
|
static void |
glfwMaximizeWindow(long window)
Maximizes the specified window if it was previously not maximized.
|
static void |
glfwPollEvents()
Processes all pending events.
|
static void |
glfwPostEmptyEvent()
Posts an empty event from the current thread to the main thread event queue, causing
WaitEvents or WaitEventsTimeout to return. |
static boolean |
glfwRawMouseMotionSupported()
Returns whether raw mouse motion is supported.
|
static void |
glfwRequestWindowAttention(long window)
Requests user attention to the specified window.
|
static void |
glfwRestoreWindow(long window)
Restores the specified window if it was previously iconified (minimized) or maximized.
|
static GLFWCharCallback |
glfwSetCharCallback(long window,
GLFWCharCallbackI cbfun)
Sets the character callback of the specified window, which is called when a Unicode character is input.
|
static GLFWCharModsCallback |
glfwSetCharModsCallback(long window,
GLFWCharModsCallbackI cbfun)
Sets the character with modifiers callback of the specified window, which is called when a Unicode character is input regardless of what modifier keys
are used.
|
static void |
glfwSetClipboardString(long window,
java.nio.ByteBuffer string)
Sets the system clipboard to the specified, UTF-8 encoded string.
|
static void |
glfwSetClipboardString(long window,
java.lang.CharSequence string)
Sets the system clipboard to the specified, UTF-8 encoded string.
|
static void |
glfwSetCursor(long window,
long cursor)
Sets the cursor image to be used when the cursor is over the content area of the specified window.
|
static GLFWCursorEnterCallback |
glfwSetCursorEnterCallback(long window,
GLFWCursorEnterCallbackI cbfun)
Sets the cursor boundary crossing callback of the specified window, which is called when the cursor enters or leaves the content area of the window.
|
static void |
glfwSetCursorPos(long window,
double xpos,
double ypos)
Sets the position, in screen coordinates, of the cursor relative to the upper-left corner of the content area of the specified window.
|
static GLFWCursorPosCallback |
glfwSetCursorPosCallback(long window,
GLFWCursorPosCallbackI cbfun)
Sets the cursor position callback of the specified window, which is called when the cursor is moved.
|
static GLFWDropCallback |
glfwSetDropCallback(long window,
GLFWDropCallbackI cbfun)
Sets the file drop callback of the specified window, which is called when one or more dragged files are dropped on the window.
|
static GLFWErrorCallback |
glfwSetErrorCallback(GLFWErrorCallbackI cbfun)
Sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.
|
static GLFWFramebufferSizeCallback |
glfwSetFramebufferSizeCallback(long window,
GLFWFramebufferSizeCallbackI cbfun)
Sets the framebuffer resize callback of the specified window, which is called when the framebuffer of the specified window is resized.
|
static void |
glfwSetGamma(long monitor,
float gamma)
Generates a gamma ramp and sets it for the specified monitor.
|
static void |
glfwSetGammaRamp(long monitor,
GLFWGammaRamp ramp)
Sets the current gamma ramp for the specified monitor.
|
static void |
glfwSetInputMode(long window,
int mode,
int value)
Sets an input option for the specified window.
|
static GLFWJoystickCallback |
glfwSetJoystickCallback(GLFWJoystickCallbackI cbfun)
Sets the joystick configuration callback, or removes the currently set callback.
|
static void |
glfwSetJoystickUserPointer(int jid,
long pointer)
Sets the user pointer of the specified joystick.
|
static GLFWKeyCallback |
glfwSetKeyCallback(long window,
GLFWKeyCallbackI cbfun)
Sets the key callback of the specified window, which is called when a key is pressed, repeated or released.
|
static GLFWMonitorCallback |
glfwSetMonitorCallback(GLFWMonitorCallbackI cbfun)
Sets the monitor configuration callback, or removes the currently set callback.
|
static void |
glfwSetMonitorUserPointer(long monitor,
long pointer)
Sets the user pointer of the specified monitor.
|
static GLFWMouseButtonCallback |
glfwSetMouseButtonCallback(long window,
GLFWMouseButtonCallbackI cbfun)
Sets the mouse button callback of the specified window, which is called when a mouse button is pressed or released.
|
static GLFWScrollCallback |
glfwSetScrollCallback(long window,
GLFWScrollCallbackI cbfun)
Sets the scroll callback of the specified window, which is called when a scrolling device is used.
|
static void |
glfwSetTime(double time)
Sets the value of the GLFW timer.
|
static void |
glfwSetWindowAspectRatio(long window,
int numer,
int denom)
Sets the required aspect ratio of the content area of the specified window.
|
static void |
glfwSetWindowAttrib(long window,
int attrib,
int value)
Sets an attribute of the specified window.
|
static GLFWWindowCloseCallback |
glfwSetWindowCloseCallback(long window,
GLFWWindowCloseCallbackI cbfun)
Sets the close callback of the specified window, which is called when the user attempts to close the window, for example by clicking the close widget in
the title bar.
|
static GLFWWindowContentScaleCallback |
glfwSetWindowContentScaleCallback(long window,
GLFWWindowContentScaleCallbackI cbfun)
Sets the window content scale callback for the specified window, which is called when the content scale of the specified window changes.
|
static GLFWWindowFocusCallback |
glfwSetWindowFocusCallback(long window,
GLFWWindowFocusCallbackI cbfun)
Sets the focus callback of the specified window, which is called when the window gains or loses input focus.
|
static void |
glfwSetWindowIcon(long window,
GLFWImage.Buffer images)
Sets the icon for the specified window.
|
static GLFWWindowIconifyCallback |
glfwSetWindowIconifyCallback(long window,
GLFWWindowIconifyCallbackI cbfun)
Sets the iconification callback of the specified window, which is called when the window is iconified or restored.
|
static GLFWWindowMaximizeCallback |
glfwSetWindowMaximizeCallback(long window,
GLFWWindowMaximizeCallbackI cbfun)
Sets the maximization callback of the specified window, which is called when the window is maximized or restored.
|
static void |
glfwSetWindowMonitor(long window,
long monitor,
int xpos,
int ypos,
int width,
int height,
int refreshRate)
Sets the mode, monitor, video mode and placement of a window.
|
static void |
glfwSetWindowOpacity(long window,
float opacity)
Sets the opacity of the whole window.
|
static void |
glfwSetWindowPos(long window,
int xpos,
int ypos)
Sets the position, in screen coordinates, of the upper-left corner of the content area of the specified windowed mode window.
|
static GLFWWindowPosCallback |
glfwSetWindowPosCallback(long window,
GLFWWindowPosCallbackI cbfun)
Sets the position callback of the specified window, which is called when the window is moved.
|
static GLFWWindowRefreshCallback |
glfwSetWindowRefreshCallback(long window,
GLFWWindowRefreshCallbackI cbfun)
Sets the refresh callback of the specified window, which is called when the content area of the window needs to be redrawn, for example if the window has
been exposed after having been covered by another window.
|
static void |
glfwSetWindowShouldClose(long window,
boolean value)
Sets the value of the close flag of the specified window.
|
static void |
glfwSetWindowSize(long window,
int width,
int height)
Sets the size, in pixels, of the content area of the specified window.
|
static GLFWWindowSizeCallback |
glfwSetWindowSizeCallback(long window,
GLFWWindowSizeCallbackI cbfun)
Sets the size callback of the specified window, which is called when the window is resized.
|
static void |
glfwSetWindowSizeLimits(long window,
int minwidth,
int minheight,
int maxwidth,
int maxheight)
Sets the size limits of the content area of the specified window.
|
static void |
glfwSetWindowTitle(long window,
java.nio.ByteBuffer title)
Sets the window title, encoded as UTF-8, of the specified window.
|
static void |
glfwSetWindowTitle(long window,
java.lang.CharSequence title)
Sets the window title, encoded as UTF-8, of the specified window.
|
static void |
glfwSetWindowUserPointer(long window,
long pointer)
Sets the user-defined pointer of the specified window.
|
static void |
glfwShowWindow(long window)
Makes the specified window visible if it was previously hidden.
|
static void |
glfwSwapBuffers(long window)
Swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES.
|
static void |
glfwSwapInterval(int interval)
Sets the swap interval for the current OpenGL or OpenGL ES context, i.e.
|
static void |
glfwTerminate()
Destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources.
|
static boolean |
glfwUpdateGamepadMappings(java.nio.ByteBuffer string)
Adds the specified SDL_GameControllerDB gamepad mappings.
|
static void |
glfwWaitEvents()
Waits until events are queued and processes them.
|
static void |
glfwWaitEventsTimeout(double timeout)
Waits with timeout until events are queued and processes them.
|
static void |
glfwWindowHint(int hint,
int value)
Sets hints for the next call to
CreateWindow. |
static void |
glfwWindowHintString(int hint,
java.nio.ByteBuffer value)
Sets the specified window hint to the desired value.
|
static void |
glfwWindowHintString(int hint,
java.lang.CharSequence value)
Sets the specified window hint to the desired value.
|
static boolean |
glfwWindowShouldClose(long window)
Returns the value of the close flag of the specified window.
|
static long |
nglfwCreateCursor(long image,
int xhot,
int yhot)
Unsafe version of:
CreateCursor |
static long |
nglfwCreateWindow(int width,
int height,
long title,
long monitor,
long share)
Unsafe version of:
CreateWindow |
static int |
nglfwExtensionSupported(long extension)
Unsafe version of:
ExtensionSupported |
static long |
nglfwGetClipboardString(long window)
Unsafe version of:
GetClipboardString |
static void |
nglfwGetCursorPos(long window,
long xpos,
long ypos)
Unsafe version of:
GetCursorPos |
static int |
nglfwGetError(long description)
Unsafe version of:
GetError |
static void |
nglfwGetFramebufferSize(long window,
long width,
long height)
Unsafe version of:
GetFramebufferSize |
static long |
nglfwGetGamepadName(int jid)
Unsafe version of:
GetGamepadName |
static int |
nglfwGetGamepadState(int jid,
long state)
Unsafe version of:
GetGamepadState |
static long |
nglfwGetGammaRamp(long monitor)
Unsafe version of:
GetGammaRamp |
static long |
nglfwGetJoystickAxes(int jid,
long count)
Unsafe version of:
GetJoystickAxes |
static long |
nglfwGetJoystickButtons(int jid,
long count)
Unsafe version of:
GetJoystickButtons |
static long |
nglfwGetJoystickGUID(int jid)
Unsafe version of:
GetJoystickGUID |
static long |
nglfwGetJoystickHats(int jid,
long count)
Unsafe version of:
GetJoystickHats |
static long |
nglfwGetJoystickName(int jid)
Unsafe version of:
GetJoystickName |
static long |
nglfwGetKeyName(int key,
int scancode)
Unsafe version of:
GetKeyName |
static void |
nglfwGetMonitorContentScale(long monitor,
long xscale,
long yscale)
Unsafe version of:
GetMonitorContentScale |
static long |
nglfwGetMonitorName(long monitor)
Unsafe version of:
GetMonitorName |
static void |
nglfwGetMonitorPhysicalSize(long monitor,
long widthMM,
long heightMM)
Unsafe version of:
GetMonitorPhysicalSize |
static void |
nglfwGetMonitorPos(long monitor,
long xpos,
long ypos)
Unsafe version of:
GetMonitorPos |
static long |
nglfwGetMonitors(long count)
Unsafe version of:
GetMonitors |
static void |
nglfwGetMonitorWorkarea(long monitor,
long xpos,
long ypos,
long width,
long height)
Unsafe version of:
GetMonitorWorkarea |
static long |
nglfwGetProcAddress(long procname)
Unsafe version of:
GetProcAddress |
static void |
nglfwGetVersion(long major,
long minor,
long rev)
Unsafe version of:
GetVersion |
static long |
nglfwGetVersionString()
Unsafe version of:
GetVersionString |
static long |
nglfwGetVideoMode(long monitor)
Unsafe version of:
GetVideoMode |
static long |
nglfwGetVideoModes(long monitor,
long count)
Unsafe version of:
GetVideoModes |
static void |
nglfwGetWindowContentScale(long window,
long xscale,
long yscale)
Unsafe version of:
GetWindowContentScale |
static void |
nglfwGetWindowFrameSize(long window,
long left,
long top,
long right,
long bottom)
Unsafe version of:
GetWindowFrameSize |
static void |
nglfwGetWindowPos(long window,
long xpos,
long ypos)
Unsafe version of:
GetWindowPos |
static void |
nglfwGetWindowSize(long window,
long width,
long height)
Unsafe version of:
GetWindowSize |
static long |
nglfwSetCharCallback(long window,
long cbfun)
Unsafe version of:
SetCharCallback |
static long |
nglfwSetCharModsCallback(long window,
long cbfun)
Unsafe version of:
SetCharModsCallback |
static void |
nglfwSetClipboardString(long window,
long string)
Unsafe version of:
SetClipboardString |
static long |
nglfwSetCursorEnterCallback(long window,
long cbfun)
Unsafe version of:
SetCursorEnterCallback |
static long |
nglfwSetCursorPosCallback(long window,
long cbfun)
Unsafe version of:
SetCursorPosCallback |
static long |
nglfwSetDropCallback(long window,
long cbfun)
Unsafe version of:
SetDropCallback |
static long |
nglfwSetErrorCallback(long cbfun)
Unsafe version of:
SetErrorCallback |
static long |
nglfwSetFramebufferSizeCallback(long window,
long cbfun)
Unsafe version of:
SetFramebufferSizeCallback |
static void |
nglfwSetGammaRamp(long monitor,
long ramp)
Unsafe version of:
SetGammaRamp |
static long |
nglfwSetJoystickCallback(long cbfun)
Unsafe version of:
SetJoystickCallback |
static long |
nglfwSetKeyCallback(long window,
long cbfun)
Unsafe version of:
SetKeyCallback |
static long |
nglfwSetMonitorCallback(long cbfun)
Unsafe version of:
SetMonitorCallback |
static long |
nglfwSetMouseButtonCallback(long window,
long cbfun)
Unsafe version of:
SetMouseButtonCallback |
static long |
nglfwSetScrollCallback(long window,
long cbfun)
Unsafe version of:
SetScrollCallback |
static long |
nglfwSetWindowCloseCallback(long window,
long cbfun)
Unsafe version of:
SetWindowCloseCallback |
static long |
nglfwSetWindowContentScaleCallback(long window,
long cbfun)
Unsafe version of:
SetWindowContentScaleCallback |
static long |
nglfwSetWindowFocusCallback(long window,
long cbfun)
Unsafe version of:
SetWindowFocusCallback |
static void |
nglfwSetWindowIcon(long window,
int count,
long images)
Unsafe version of:
SetWindowIcon |
static long |
nglfwSetWindowIconifyCallback(long window,
long cbfun)
Unsafe version of:
SetWindowIconifyCallback |
static long |
nglfwSetWindowMaximizeCallback(long window,
long cbfun)
Unsafe version of:
SetWindowMaximizeCallback |
static long |
nglfwSetWindowPosCallback(long window,
long cbfun)
Unsafe version of:
SetWindowPosCallback |
static long |
nglfwSetWindowRefreshCallback(long window,
long cbfun)
Unsafe version of:
SetWindowRefreshCallback |
static long |
nglfwSetWindowSizeCallback(long window,
long cbfun)
Unsafe version of:
SetWindowSizeCallback |
static void |
nglfwSetWindowTitle(long window,
long title)
Unsafe version of:
SetWindowTitle |
static int |
nglfwUpdateGamepadMappings(long string)
Unsafe version of:
UpdateGamepadMappings |
static void |
nglfwWindowHintString(int hint,
long value)
Unsafe version of:
WindowHintString |
public static final int GLFW_VERSION_MAJOR
public static final int GLFW_VERSION_MINOR
public static final int GLFW_VERSION_REVISION
public static final int GLFW_TRUE
public static final int GLFW_FALSE
public static final int GLFW_RELEASE
public static final int GLFW_PRESS
public static final int GLFW_REPEAT
public static final int GLFW_HAT_CENTERED
public static final int GLFW_HAT_UP
public static final int GLFW_HAT_RIGHT
public static final int GLFW_HAT_DOWN
public static final int GLFW_HAT_LEFT
public static final int GLFW_HAT_RIGHT_UP
public static final int GLFW_HAT_RIGHT_DOWN
public static final int GLFW_HAT_LEFT_UP
public static final int GLFW_HAT_LEFT_DOWN
public static final int GLFW_KEY_UNKNOWN
public static final int GLFW_KEY_SPACE
public static final int GLFW_KEY_APOSTROPHE
public static final int GLFW_KEY_COMMA
public static final int GLFW_KEY_MINUS
public static final int GLFW_KEY_PERIOD
public static final int GLFW_KEY_SLASH
public static final int GLFW_KEY_0
public static final int GLFW_KEY_1
public static final int GLFW_KEY_2
public static final int GLFW_KEY_3
public static final int GLFW_KEY_4
public static final int GLFW_KEY_5
public static final int GLFW_KEY_6
public static final int GLFW_KEY_7
public static final int GLFW_KEY_8
public static final int GLFW_KEY_9
public static final int GLFW_KEY_SEMICOLON
public static final int GLFW_KEY_EQUAL
public static final int GLFW_KEY_A
public static final int GLFW_KEY_B
public static final int GLFW_KEY_C
public static final int GLFW_KEY_D
public static final int GLFW_KEY_E
public static final int GLFW_KEY_F
public static final int GLFW_KEY_G
public static final int GLFW_KEY_H
public static final int GLFW_KEY_I
public static final int GLFW_KEY_J
public static final int GLFW_KEY_K
public static final int GLFW_KEY_L
public static final int GLFW_KEY_M
public static final int GLFW_KEY_N
public static final int GLFW_KEY_O
public static final int GLFW_KEY_P
public static final int GLFW_KEY_Q
public static final int GLFW_KEY_R
public static final int GLFW_KEY_S
public static final int GLFW_KEY_T
public static final int GLFW_KEY_U
public static final int GLFW_KEY_V
public static final int GLFW_KEY_W
public static final int GLFW_KEY_X
public static final int GLFW_KEY_Y
public static final int GLFW_KEY_Z
public static final int GLFW_KEY_LEFT_BRACKET
public static final int GLFW_KEY_BACKSLASH
public static final int GLFW_KEY_RIGHT_BRACKET
public static final int GLFW_KEY_GRAVE_ACCENT
public static final int GLFW_KEY_WORLD_1
public static final int GLFW_KEY_WORLD_2
public static final int GLFW_KEY_ESCAPE
public static final int GLFW_KEY_ENTER
public static final int GLFW_KEY_TAB
public static final int GLFW_KEY_BACKSPACE
public static final int GLFW_KEY_INSERT
public static final int GLFW_KEY_DELETE
public static final int GLFW_KEY_RIGHT
public static final int GLFW_KEY_LEFT
public static final int GLFW_KEY_DOWN
public static final int GLFW_KEY_UP
public static final int GLFW_KEY_PAGE_UP
public static final int GLFW_KEY_PAGE_DOWN
public static final int GLFW_KEY_HOME
public static final int GLFW_KEY_END
public static final int GLFW_KEY_CAPS_LOCK
public static final int GLFW_KEY_SCROLL_LOCK
public static final int GLFW_KEY_NUM_LOCK
public static final int GLFW_KEY_PRINT_SCREEN
public static final int GLFW_KEY_PAUSE
public static final int GLFW_KEY_F1
public static final int GLFW_KEY_F2
public static final int GLFW_KEY_F3
public static final int GLFW_KEY_F4
public static final int GLFW_KEY_F5
public static final int GLFW_KEY_F6
public static final int GLFW_KEY_F7
public static final int GLFW_KEY_F8
public static final int GLFW_KEY_F9
public static final int GLFW_KEY_F10
public static final int GLFW_KEY_F11
public static final int GLFW_KEY_F12
public static final int GLFW_KEY_F13
public static final int GLFW_KEY_F14
public static final int GLFW_KEY_F15
public static final int GLFW_KEY_F16
public static final int GLFW_KEY_F17
public static final int GLFW_KEY_F18
public static final int GLFW_KEY_F19
public static final int GLFW_KEY_F20
public static final int GLFW_KEY_F21
public static final int GLFW_KEY_F22
public static final int GLFW_KEY_F23
public static final int GLFW_KEY_F24
public static final int GLFW_KEY_F25
public static final int GLFW_KEY_KP_0
public static final int GLFW_KEY_KP_1
public static final int GLFW_KEY_KP_2
public static final int GLFW_KEY_KP_3
public static final int GLFW_KEY_KP_4
public static final int GLFW_KEY_KP_5
public static final int GLFW_KEY_KP_6
public static final int GLFW_KEY_KP_7
public static final int GLFW_KEY_KP_8
public static final int GLFW_KEY_KP_9
public static final int GLFW_KEY_KP_DECIMAL
public static final int GLFW_KEY_KP_DIVIDE
public static final int GLFW_KEY_KP_MULTIPLY
public static final int GLFW_KEY_KP_SUBTRACT
public static final int GLFW_KEY_KP_ADD
public static final int GLFW_KEY_KP_ENTER
public static final int GLFW_KEY_KP_EQUAL
public static final int GLFW_KEY_LEFT_SHIFT
public static final int GLFW_KEY_LEFT_CONTROL
public static final int GLFW_KEY_LEFT_ALT
public static final int GLFW_KEY_LEFT_SUPER
public static final int GLFW_KEY_RIGHT_SHIFT
public static final int GLFW_KEY_RIGHT_CONTROL
public static final int GLFW_KEY_RIGHT_ALT
public static final int GLFW_KEY_RIGHT_SUPER
public static final int GLFW_KEY_MENU
public static final int GLFW_KEY_LAST
public static final int GLFW_MOD_SHIFT
public static final int GLFW_MOD_CONTROL
public static final int GLFW_MOD_ALT
public static final int GLFW_MOD_SUPER
public static final int GLFW_MOD_CAPS_LOCK
LOCK_KEY_MODS input mode is set.public static final int GLFW_MOD_NUM_LOCK
LOCK_KEY_MODS input mode is set.public static final int GLFW_MOUSE_BUTTON_1
public static final int GLFW_MOUSE_BUTTON_2
public static final int GLFW_MOUSE_BUTTON_3
public static final int GLFW_MOUSE_BUTTON_4
public static final int GLFW_MOUSE_BUTTON_5
public static final int GLFW_MOUSE_BUTTON_6
public static final int GLFW_MOUSE_BUTTON_7
public static final int GLFW_MOUSE_BUTTON_8
public static final int GLFW_MOUSE_BUTTON_LAST
public static final int GLFW_MOUSE_BUTTON_LEFT
public static final int GLFW_MOUSE_BUTTON_RIGHT
public static final int GLFW_MOUSE_BUTTON_MIDDLE
public static final int GLFW_JOYSTICK_1
public static final int GLFW_JOYSTICK_2
public static final int GLFW_JOYSTICK_3
public static final int GLFW_JOYSTICK_4
public static final int GLFW_JOYSTICK_5
public static final int GLFW_JOYSTICK_6
public static final int GLFW_JOYSTICK_7
public static final int GLFW_JOYSTICK_8
public static final int GLFW_JOYSTICK_9
public static final int GLFW_JOYSTICK_10
public static final int GLFW_JOYSTICK_11
public static final int GLFW_JOYSTICK_12
public static final int GLFW_JOYSTICK_13
public static final int GLFW_JOYSTICK_14
public static final int GLFW_JOYSTICK_15
public static final int GLFW_JOYSTICK_16
public static final int GLFW_JOYSTICK_LAST
public static final int GLFW_GAMEPAD_BUTTON_A
public static final int GLFW_GAMEPAD_BUTTON_B
public static final int GLFW_GAMEPAD_BUTTON_X
public static final int GLFW_GAMEPAD_BUTTON_Y
public static final int GLFW_GAMEPAD_BUTTON_LEFT_BUMPER
public static final int GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER
public static final int GLFW_GAMEPAD_BUTTON_BACK
public static final int GLFW_GAMEPAD_BUTTON_START
public static final int GLFW_GAMEPAD_BUTTON_GUIDE
public static final int GLFW_GAMEPAD_BUTTON_LEFT_THUMB
public static final int GLFW_GAMEPAD_BUTTON_RIGHT_THUMB
public static final int GLFW_GAMEPAD_BUTTON_DPAD_UP
public static final int GLFW_GAMEPAD_BUTTON_DPAD_RIGHT
public static final int GLFW_GAMEPAD_BUTTON_DPAD_DOWN
public static final int GLFW_GAMEPAD_BUTTON_DPAD_LEFT
public static final int GLFW_GAMEPAD_BUTTON_LAST
public static final int GLFW_GAMEPAD_BUTTON_CROSS
public static final int GLFW_GAMEPAD_BUTTON_CIRCLE
public static final int GLFW_GAMEPAD_BUTTON_SQUARE
public static final int GLFW_GAMEPAD_BUTTON_TRIANGLE
public static final int GLFW_GAMEPAD_AXIS_LEFT_X
public static final int GLFW_GAMEPAD_AXIS_LEFT_Y
public static final int GLFW_GAMEPAD_AXIS_RIGHT_X
public static final int GLFW_GAMEPAD_AXIS_RIGHT_Y
public static final int GLFW_GAMEPAD_AXIS_LEFT_TRIGGER
public static final int GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
public static final int GLFW_GAMEPAD_AXIS_LAST
public static final int GLFW_NO_ERROR
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_NOT_INITIALIZED
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_NO_CURRENT_CONTEXT
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_INVALID_ENUM
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_INVALID_VALUE
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_OUT_OF_MEMORY
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_API_UNAVAILABLE
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_VERSION_UNAVAILABLE
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_PLATFORM_ERROR
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_FORMAT_UNAVAILABLE
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_NO_WINDOW_CONTEXT
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_CURSOR_UNAVAILABLE
NO_ERROR - No error has occurred.NOT_INITIALIZED -
GLFW has not been initialized.
This occurs if a GLFW function was called that may not be called unless the library is initialized.
NO_CURRENT_CONTEXT -
No context is current for this thread.
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 SwapInterval.
INVALID_ENUM -
One of the arguments to the function was an invalid enum value.
One of the arguments to the function was an invalid enum value, for example requesting RED_BITS with GetWindowAttrib.
INVALID_VALUE -
One of the arguments to the function was an invalid value.
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 VERSION_UNAVAILABLE error.
OUT_OF_MEMORY -
A memory allocation failed.
A bug in GLFW or the underlying operating system. Report the bug to our issue tracker.
API_UNAVAILABLE -
GLFW could not find support for the requested API on the system.
The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples:
Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan.
VERSION_UNAVAILABLE -
The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.
The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this
error and not INVALID_VALUE, because GLFW cannot know what future versions will exist.
PLATFORM_ERROR -
A platform-specific error occurred that does not match any of the more specific categories.
A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our issue tracker.
FORMAT_UNAVAILABLE -
The requested format is not supported or available.
If emitted during window creation, one or more hard constraints did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.
If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate.
NO_WINDOW_CONTEXT -
The specified window does not have an OpenGL or OpenGL ES context.
A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.
Application programmer error. Fix the offending call.
CURSOR_UNAVAILABLE -
The specified cursor shape is not available.
The specified standard cursor shape is not available, either because the current system cursor theme does not provide it or because it is not available on the platform.
Platform or system settings limitation. Pick another standard cursor shape or create a custom cursor.
public static final int GLFW_FOCUSED
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_ICONIFIED
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_RESIZABLE
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_VISIBLE
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_DECORATED
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_AUTO_ICONIFY
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_FLOATING
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_MAXIMIZED
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_CENTER_CURSOR
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_TRANSPARENT_FRAMEBUFFER
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_HOVERED
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_FOCUS_ON_SHOW
FOCUSED -
WindowHint: Specifies whether the windowed mode window will be given input focus when created. This hint is ignored for full screen and
initially hidden windows.
GetWindowAttrib: Indicates whether the specified window has input focus.
ICONIFIED - GetWindowAttrib: Indicates whether the specified window is iconified, whether by the user or with IconifyWindow.RESIZABLE -
WindowHint: Specifies whether the windowed mode window will be resizable by the user. The window will still be resizable using the
SetWindowSize function. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is resizable by the user.
VISIBLE -
WindowHint: Specifies whether the windowed mode window will be initially visible. This hint is ignored for full screen windows. Windows created
hidden are completely invisible to the user until shown. This can be useful if you need to set up your window further before showing it, for
example moving it to a specific location.
GetWindowAttrib: Indicates whether the specified window is visible. Window visibility can be controlled with ShowWindow and HideWindow.
DECORATED -
WindowHint: Specifies whether the windowed mode window will have window decorations such as a border, a close widget, etc. An undecorated window
may still allow the user to generate close events on some platforms. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window has decorations such as a border, a close widget, etc.
AUTO_ICONIFY -
WindowHint: Specifies whether the full screen window will automatically iconify and restore the previous video mode on input focus loss. This
hint is ignored for windowed mode windows.
FLOATING -
WindowHint: Specifies whether the windowed mode window will be floating above other regular windows, also called topmost or always-on-top. This
is intended primarily for debugging purposes and cannot be used to implement proper full screen windows. This hint is ignored for full screen
windows.
GetWindowAttrib: Indicates whether the specified window is floating, also called topmost or always-on-top.
MAXIMIZED -
WindowHint: Specifies whether the windowed mode window will be maximized when created. This hint is ignored for full screen windows.
GetWindowAttrib: Indicates whether the specified window is maximized, whether by the user or MaximizeWindow.
CENTER_CURSOR -
WindowHint: Specifies whether the cursor should be centered over newly created full screen windows. This hint is ignored for windowed mode
windows.
TRANSPARENT_FRAMEBUFFER -
WindowHint: specifies whether the window framebuffer will be transparent. If enabled and supported by the system, the window framebuffer
alpha channel will be used to combine the framebuffer with the background. This does not affect window decorations.
HOVERED - GetWindowAttrib: indicates whether the cursor is currently directly over the content area of the window, with no other windows between.FOCUS_ON_SHOW -
WindowHint: specifies whether input focuses on calling show window.
GetWindowAttrib: Indicates whether input focuses on calling show window.
public static final int GLFW_CURSOR
public static final int GLFW_STICKY_KEYS
public static final int GLFW_STICKY_MOUSE_BUTTONS
public static final int GLFW_LOCK_KEY_MODS
public static final int GLFW_RAW_MOUSE_MOTION
public static final int GLFW_CURSOR_NORMAL
public static final int GLFW_CURSOR_HIDDEN
public static final int GLFW_CURSOR_DISABLED
public static final int GLFW_ARROW_CURSOR
public static final int GLFW_IBEAM_CURSOR
public static final int GLFW_CROSSHAIR_CURSOR
public static final int GLFW_POINTING_HAND_CURSOR
public static final int GLFW_RESIZE_EW_CURSOR
This is usually a horizontal double-headed arrow.
public static final int GLFW_RESIZE_NS_CURSOR
This is usually a vertical double-headed arrow.
public static final int GLFW_RESIZE_NWSE_CURSOR
This is usually a diagonal double-headed arrow.
CURSOR_UNAVAILABLE in the future.public static final int GLFW_RESIZE_NESW_CURSOR
This is usually a diagonal double-headed arrow.
CURSOR_UNAVAILABLE in the future.public static final int GLFW_RESIZE_ALL_CURSOR
This is usually either a combined horizontal and vertical double-headed arrow or a grabbing hand.
public static final int GLFW_NOT_ALLOWED_CURSOR
This is usually a circle with a diagonal line through it.
public static final int GLFW_HRESIZE_CURSOR
public static final int GLFW_VRESIZE_CURSOR
public static final int GLFW_HAND_CURSOR
public static final int GLFW_CONNECTED
public static final int GLFW_DISCONNECTED
public static final int GLFW_JOYSTICK_HAT_BUTTONS
public static final int GLFW_COCOA_CHDIR_RESOURCES
public static final int GLFW_COCOA_MENUBAR
public static final int GLFW_DONT_CARE
public static final int GLFW_RED_BITS
public static final int GLFW_GREEN_BITS
public static final int GLFW_BLUE_BITS
public static final int GLFW_ALPHA_BITS
public static final int GLFW_DEPTH_BITS
public static final int GLFW_STENCIL_BITS
public static final int GLFW_ACCUM_RED_BITS
public static final int GLFW_ACCUM_GREEN_BITS
public static final int GLFW_ACCUM_BLUE_BITS
public static final int GLFW_ACCUM_ALPHA_BITS
public static final int GLFW_AUX_BUFFERS
public static final int GLFW_STEREO
public static final int GLFW_SAMPLES
public static final int GLFW_SRGB_CAPABLE
public static final int GLFW_REFRESH_RATE
public static final int GLFW_DOUBLEBUFFER
public static final int GLFW_CLIENT_API
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_VERSION_MAJOR
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_VERSION_MINOR
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_REVISION
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_ROBUSTNESS
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_OPENGL_FORWARD_COMPAT
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_OPENGL_DEBUG_CONTEXT
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_OPENGL_PROFILE
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_RELEASE_BEHAVIOR
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_NO_ERROR
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_CONTEXT_CREATION_API
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_SCALE_TO_MONITOR
CLIENT_API -
WindowHint: Specifies which client API to create the context for. Possible values are OPENGL_API, OPENGL_ES_API and NO_API. This is a hard
constraint.
GetWindowAttrib: Indicates the client API provided by the window's context; either OPENGL_API, OPENGL_ES_API or NO_API.
CONTEXT_VERSION_MAJOR -
WindowHint: Specifies the client API major version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the
created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will
still get backwards-compatible contexts of version 3.0 and above when available.CONTEXT_VERSION_MAJOR and CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL ES version
of the created context is less than the one requested. Additionally, OpenGL ES 1.x cannot be returned if 2.0 or later was requested, and vice
versa. This is because OpenGL ES 3.x is backward compatible with 2.0, but OpenGL ES 2.0 is not backward compatible with 1.x.GetWindowAttrib: Indicate the client API major version of the window's context.
CONTEXT_VERSION_MINOR -
WindowHint: Specifies the client API minor version that the created context must be compatible with. The exact behavior of this hint depends on
the requested client API.
GetWindowAttrib: Indicate the client API minor version of the window's context.
CONTEXT_REVISION - GetWindowAttrib: Indicates the client API version of the window's context.CONTEXT_ROBUSTNESS -
WindowHint: Specifies the robustness strategy to be used by the context. This can be one of NO_RESET_NOTIFICATION or LOSE_CONTEXT_ON_RESET, or
NO_ROBUSTNESS to not request a robustness strategy.
GetWindowAttrib: Indicates the robustness strategy used by the context. This is LOSE_CONTEXT_ON_RESET or NO_RESET_NOTIFICATION if the window's
context supports robustness, or NO_ROBUSTNESS otherwise.
OPENGL_FORWARD_COMPAT -
WindowHint: Specifies whether the OpenGL context should be forward-compatible, i.e. one where all functionality deprecated in the requested
version of OpenGL is removed. This must only be used if the requested OpenGL version is 3.0 or above. If OpenGL ES is requested, this hint is
ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL forward-compatible one.
OPENGL_DEBUG_CONTEXT -
WindowHint: Specifies whether to create a debug OpenGL context, which may have additional error and performance issue reporting functionality.
If OpenGL ES is requested, this hint is ignored.
GetWindowAttrib: Indicates if the window's context is an OpenGL debug context.
OPENGL_PROFILE -
WindowHint: Specifies which OpenGL profile to create the context for. Possible values are one of OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE,
or OPENGL_ANY_PROFILE to not request a specific profile. If requesting an OpenGL version below 3.2, OPENGL_ANY_PROFILE must be used. If OpenGL ES
is requested, this hint is ignored.
GetWindowAttrib: Indicates the OpenGL profile used by the context. This is OPENGL_CORE_PROFILE or OPENGL_COMPAT_PROFILE if the context uses a
known profile, or OPENGL_ANY_PROFILE if the OpenGL profile is unknown or the context is an OpenGL ES context. Note that the returned profile may
not match the profile bits of the context flags, as GLFW will try other means of detecting the profile when no bits are set.
CONTEXT_RELEASE_BEHAVIOR -
WindowHint: Specifies the release behavior to be used by the context. If the behavior is ANY_RELEASE_BEHAVIOR, the default behavior of the
context creation API will be used. If the behavior is RELEASE_BEHAVIOR_FLUSH, the pipeline will be flushed whenever the context is released from
being the current one. If the behavior is RELEASE_BEHAVIOR_NONE, the pipeline will not be flushed on release.
CONTEXT_NO_ERROR -
WindowHint: Specifies whether errors should be generated by the context. If enabled, situations that would have generated errors instead cause
undefined behavior.
CONTEXT_CREATION_API -
WindowHint: Specifies which context creation API to use to create the context. Possible values are NATIVE_CONTEXT_API and EGL_CONTEXT_API.
This is a hard constraint. If no client API is requested, this hint is ignored.
GetProcAddress, which always uses the selected API.GetWindowAttrib: Indicates the context creation API used to create the window's context; either NATIVE_CONTEXT_API or EGL_CONTEXT_API.
SCALE_TO_MONITOR -
WindowHint: Specifies whether the window content area should be resized based on the monitor content scale of any monitor it is placed on.
This includes the initial placement when the window is created. Possible values are TRUE and FALSE.
This hint only has an effect on platforms where screen coordinates and pixels always map 1:1 such as Windows and X11. On platforms like macOS the resolution of the framebuffer is changed independently of the window size.
public static final int GLFW_COCOA_RETINA_FRAMEBUFFER
public static final int GLFW_COCOA_FRAME_NAME
WindowHintString.public static final int GLFW_COCOA_GRAPHICS_SWITCHING
public static final int GLFW_X11_CLASS_NAME
WM_CLASS window property. These are set with WindowHintString.public static final int GLFW_X11_INSTANCE_NAME
WM_CLASS window property. These are set with WindowHintString.public static final int GLFW_WIN32_KEYBOARD_MENU
This is ignored on other platforms.
public static final int GLFW_NO_API
CLIENT_API hint.public static final int GLFW_OPENGL_API
CLIENT_API hint.public static final int GLFW_OPENGL_ES_API
CLIENT_API hint.public static final int GLFW_NO_ROBUSTNESS
CONTEXT_ROBUSTNESS hint.public static final int GLFW_NO_RESET_NOTIFICATION
CONTEXT_ROBUSTNESS hint.public static final int GLFW_LOSE_CONTEXT_ON_RESET
CONTEXT_ROBUSTNESS hint.public static final int GLFW_OPENGL_ANY_PROFILE
OPENGL_PROFILE hint.public static final int GLFW_OPENGL_CORE_PROFILE
OPENGL_PROFILE hint.public static final int GLFW_OPENGL_COMPAT_PROFILE
OPENGL_PROFILE hint.public static final int GLFW_ANY_RELEASE_BEHAVIOR
CONTEXT_RELEASE_BEHAVIOR hint.public static final int GLFW_RELEASE_BEHAVIOR_FLUSH
CONTEXT_RELEASE_BEHAVIOR hint.public static final int GLFW_RELEASE_BEHAVIOR_NONE
CONTEXT_RELEASE_BEHAVIOR hint.public static final int GLFW_NATIVE_CONTEXT_API
CONTEXT_CREATION_API hint.public static final int GLFW_EGL_CONTEXT_API
CONTEXT_CREATION_API hint.public static final int GLFW_OSMESA_CONTEXT_API
CONTEXT_CREATION_API hint.public static org.lwjgl.system.SharedLibrary getLibrary()
SharedLibrary.public static boolean glfwInit()
If this function fails, it calls Terminate before returning. If it succeeds, you should call Terminate before the application exits.
Additional calls to this function after successful initialization but before termination will return TRUE immediately.
COCOA_CHDIR_RESOURCES init hint.public static void glfwTerminate()
Init successfully before you will be able to use most GLFW functions.
If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to
call this function, as it is called by Init before it returns failure.
Init.public static void glfwInitHint(int hint,
int value)
The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you set will be ignored until the library is terminated and initialized again.
Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will simply ignore them. Setting these hints requires no platform specific headers or functions.
Init.hint - the init hint to set. One of:JOYSTICK_HAT_BUTTONS | COCOA_CHDIR_RESOURCES | COCOA_MENUBAR |
value - the new value of the init hintpublic static void nglfwGetVersion(long major,
long minor,
long rev)
GetVersionpublic static void glfwGetVersion(@Nullable
java.nio.IntBuffer major,
@Nullable
java.nio.IntBuffer minor,
@Nullable
java.nio.IntBuffer rev)
NULL.Init.major - where to store the major version number, or NULLminor - where to store the minor version number, or NULLrev - where to store the revision number, or NULLpublic static long nglfwGetVersionString()
GetVersionStringpublic static java.lang.String glfwGetVersionString()
glGetString.
Do not use the version string to parse the GLFW library version. The GetVersion function already provides the version of the library binary
in numerical format.
Init.public static int nglfwGetError(long description)
GetErrorpublic static int glfwGetError(@Nullable
org.lwjgl.PointerBuffer description)
This function returns and clears the error code of the last error that occurred on the calling thread and optionally a UTF-8 encoded human-readable
description of it. If no error has occurred since the last call, it returns NO_ERROR (zero), and the description pointer is set to NULL.
Init.description - where to store the error description pointer, or NULLNO_ERROR (zero)public static long nglfwSetErrorCallback(long cbfun)
SetErrorCallback@Nullable public static GLFWErrorCallback glfwSetErrorCallback(@Nullable GLFWErrorCallbackI cbfun)
The error code is set before the callback is called. Calling GetError from the error callback will return the same value as the error code argument.
The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.
Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.
Once set, the error callback remains set even after the library has been terminated.
Init.cbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwGetMonitors(long count)
GetMonitorscount - where to store the number of monitors in the returned array. This is set to zero if an error occurred.@Nullable public static org.lwjgl.PointerBuffer glfwGetMonitors()
NULL.
The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.
This function must only be called from the main thread.
NULL if no monitors were found or if an error occurredpublic static long glfwGetPrimaryMonitor()
This function must only be called from the main thread.
The primary monitor is always first in the array returned by GetMonitors.
NULL if no monitors were found or if an error occurredpublic static void nglfwGetMonitorPos(long monitor,
long xpos,
long ypos)
GetMonitorPospublic static void glfwGetMonitorPos(long monitor,
@Nullable
java.nio.IntBuffer xpos,
@Nullable
java.nio.IntBuffer ypos)
Any or all of the position arguments may be NULL. If an error occurs, all non-NULL position arguments will be set to zero.
This function must only be called from the main thread.
monitor - the monitor to queryxpos - where to store the monitor x-coordinate, or NULLypos - where to store the monitor y-coordinate, or NULLpublic static void nglfwGetMonitorWorkarea(long monitor,
long xpos,
long ypos,
long width,
long height)
GetMonitorWorkareapublic static void glfwGetMonitorWorkarea(long monitor,
@Nullable
java.nio.IntBuffer xpos,
@Nullable
java.nio.IntBuffer ypos,
@Nullable
java.nio.IntBuffer width,
@Nullable
java.nio.IntBuffer height)
This function returns the position, in screen coordinates, of the upper-left corner of the work area of the specified monitor along with the work area size in screen coordinates. The work area is defined as the area of the monitor not occluded by the operating system task bar where present. If no task bar exists then the work area is the monitor resolution in screen coordinates.
Any or all of the position and size arguments may be NULL. If an error occurs, all non-NULL position and size arguments will be set to zero.
This function must only be called from the main thread.
monitor - the monitor to queryxpos - where to store the working area x-coordinate, or NULLypos - where to store the working area y-coordinate, or NULLwidth - where to store the working area width, or NULLheight - where to store the working area height, or NULLpublic static void nglfwGetMonitorPhysicalSize(long monitor,
long widthMM,
long heightMM)
GetMonitorPhysicalSizepublic static void glfwGetMonitorPhysicalSize(long monitor,
@Nullable
java.nio.IntBuffer widthMM,
@Nullable
java.nio.IntBuffer heightMM)
Some systems do not provide accurate monitor size information, either because the monitor EDID data is incorrect or because the driver does not report it accurately.
Any or all of the size arguments may be NULL. If an error occurs, all non-NULL size arguments will be set to zero.
monitor - the monitor to querywidthMM - where to store the width, in millimetres, of the monitor's display area, or NULLheightMM - where to store the height, in millimetres, of the monitor's display area, or NULLpublic static void nglfwGetMonitorContentScale(long monitor,
long xscale,
long yscale)
GetMonitorContentScalepublic static void glfwGetMonitorContentScale(long monitor,
@Nullable
java.nio.FloatBuffer xscale,
@Nullable
java.nio.FloatBuffer yscale)
This function retrieves the content scale for the specified monitor. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.
The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.
This function must only be called from the main thread.
monitor - the monitor to queryxscale - where to store the x-axis content scale, or NULLyscale - where to store the y-axis content scale, or NULLpublic static long nglfwGetMonitorName(long monitor)
GetMonitorName@Nullable public static java.lang.String glfwGetMonitorName(long monitor)
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.
This function must only be called from the main thread.
monitor - the monitor to queryNULL if an error occurredpublic static void glfwSetMonitorUserPointer(long monitor,
long pointer)
This function sets the user-defined pointer of the specified monitor. The current value is retained until the monitor is disconnected. The initial
value is NULL.
This function may be called from the monitor callback, even for a monitor that is being disconnected.
This function may be called from any thread. Access is not synchronized.
monitor - the monitor whose pointer to setpointer - the new valuepublic static long glfwGetMonitorUserPointer(long monitor)
This function returns the current value of the user-defined pointer of the specified monitor. The initial value is NULL.
This function may be called from the monitor callback, even for a monitor that is being disconnected.
This function may be called from any thread. Access is not synchronized.
monitor - the monitor whose pointer to returnpublic static long nglfwSetMonitorCallback(long cbfun)
SetMonitorCallback@Nullable public static GLFWMonitorCallback glfwSetMonitorCallback(@Nullable GLFWMonitorCallbackI cbfun)
This function must only be called from the main thread.
cbfun - the new callback, or NULL to remove the currently set callbackNULL if no callback was set or the library had not been initializedpublic static long nglfwGetVideoModes(long monitor,
long count)
GetVideoModescount - where to store the number of video modes in the returned array. This is set to zero if an error occurred.@Nullable public static GLFWVidMode.Buffer glfwGetVideoModes(long monitor)
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.
This function must only be called from the main thread.
monitor - the monitor to queryNULL if an error occurredpublic static long nglfwGetVideoMode(long monitor)
GetVideoMode@Nullable public static GLFWVidMode glfwGetVideoMode(long monitor)
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.
This function must only be called from the main thread.
monitor - the monitor to queryNULL if an error occurredpublic static void glfwSetGamma(long monitor,
float gamma)
This function generates an appropriately sized gamma ramp from the specified exponent and then calls SetGammaRamp with it. The value must be a
finite number greater than zero.
The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.
For gamma correct rendering with OpenGL or OpenGL ES, see the SRGB_CAPABLE hint.
Notes:
PLATFORM_ERROR.monitor - the monitor whose gamma ramp to setgamma - the desired exponentpublic static long nglfwGetGammaRamp(long monitor)
GetGammaRamp@Nullable public static GLFWGammaRamp glfwGetGammaRamp(long monitor)
The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.
Notes:
PLATFORM_ERROR while returning
NULL.monitor - the monitor to queryNULL if an error occurredpublic static void nglfwSetGammaRamp(long monitor,
long ramp)
SetGammaRamppublic static void glfwSetGammaRamp(long monitor,
GLFWGammaRamp ramp)
This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this
function is called and is restored by Terminate.
The software controlled gamma ramp is applied in addition to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.
For gamma correct rendering with OpenGL or OpenGL ES, see the SRGB_CAPABLE hint.
PLATFORM_ERROR.monitor - the monitor whose gamma ramp to setramp - the gamma ramp to usepublic static void glfwDefaultWindowHints()
WindowHint for details.
This function must only be called from the main thread.
public static void glfwWindowHint(int hint,
int value)
CreateWindow. The hints, once set, retain their values until changed by a call to this function or
DefaultWindowHints, or until the library is terminated.
Only integer value hints can be set with this function. String value hints are set with WindowHintString.
This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next
call to CreateWindow.
Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.
This function must only be called from the main thread.
hint - the window hint to set. One of:value - the new value of the window hintpublic static void nglfwWindowHintString(int hint,
long value)
WindowHintStringpublic static void glfwWindowHintString(int hint,
java.nio.ByteBuffer value)
This function sets hints for the next call to CreateWindow. The hints, once set, retain their values until changed by a call to this function or
DefaultWindowHints, or until the library is terminated.
Only string type hints can be set with this function. Integer value hints are set with WindowHint.
This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next
call to CreateWindow.
Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.
| Name | Default value | Supported values |
|---|---|---|
COCOA_FRAME_NAME | "" | A UTF-8 encoded frame autosave name |
X11_CLASS_NAME | "" | An ASCII encoded WM_CLASS class name |
X11_INSTANCE_NAME | "" | An ASCII encoded WM_CLASS instance name |
This function must only be called from the main thread.
hint - the window hint to set. One of:COCOA_FRAME_NAME | X11_CLASS_NAME | X11_INSTANCE_NAME |
value - the new value of the window hint. The specified string is copied before this function returns.public static void glfwWindowHintString(int hint,
java.lang.CharSequence value)
This function sets hints for the next call to CreateWindow. The hints, once set, retain their values until changed by a call to this function or
DefaultWindowHints, or until the library is terminated.
Only string type hints can be set with this function. Integer value hints are set with WindowHint.
This function does not check whether the specified hint values are valid. If you set hints to invalid values this will instead be reported by the next
call to CreateWindow.
Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.
| Name | Default value | Supported values |
|---|---|---|
COCOA_FRAME_NAME | "" | A UTF-8 encoded frame autosave name |
X11_CLASS_NAME | "" | An ASCII encoded WM_CLASS class name |
X11_INSTANCE_NAME | "" | An ASCII encoded WM_CLASS instance name |
This function must only be called from the main thread.
hint - the window hint to set. One of:COCOA_FRAME_NAME | X11_CLASS_NAME | X11_INSTANCE_NAME |
value - the new value of the window hint. The specified string is copied before this function returns.public static long nglfwCreateWindow(int width,
int height,
long title,
long monitor,
long share)
CreateWindowpublic static long glfwCreateWindow(int width,
int height,
java.nio.ByteBuffer title,
long monitor,
long share)
Successful creation does not change which context is current. Before you can use the newly created context, you need to make it current. For information
about the share parameter, see context sharing.
The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are hard constraints. This includes the
size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, use queries like
GetWindowAttrib and GetWindowSize and GetFramebufferSize.
To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to query connected monitors, see monitors.
For full screen windows, the specified size becomes the resolution of the window's desired video mode. As long as a full screen window is not iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full screen windows, including the creation of so called windowed full screen or borderless full screen windows, see full screen.
Once you have created the window, you can switch it between windowed and full screen mode with SetWindowMonitor. If the window has an OpenGL or
OpenGL ES context, it will be unaffected.
By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, make it initially
invisible using the VISIBLE window hint, set its position and then
show it.
As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.
Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the actual size after creation.
The swap interval is not set during window creation and the initial value may vary depending on driver settings and defaults.
GLFW_ICON, it will be set as the initial icon for the window. If no such icon
is present, the IDI_APPLICATION icon will be used instead. To set a different icon, see SetWindowIcon.OPENGL_PROFILE hint accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.`MainMenu.nib` it is loaded and assumed to
contain a menu bar. Otherwise a minimal menu bar is created manually with common commands like Hide, Quit and About. The About entry opens a
minimal about dialog with information from the application's bundle. Menu bar creation can be disabled entirely with the COCOA_MENUBAR init hint.COCOA_RETINA_FRAMEBUFFER hint is TRUE and the NSHighResolutionCapable key is enabled in the application bundle's Info.plist. For
more information, see High Resolution Guidelines for macOS in the Mac Developer Library.COCOA_FRAME_NAME, the specified window size and position may be overridden by previously saved
values.WM_CLASS window property will by default be set to the window title passed to this function. The instance
part will use the contents of the RESOURCE_NAME environment variable, if present and not empty, or fall back to the window title. Set the
X11_CLASS_NAME and X11_INSTANCE_NAME window hints to override this.wp_viewporter
protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols
is supported, the window won't be decorated.width - the desired width, in screen coordinates, of the windowheight - the desired height, in screen coordinates, of the windowtitle - initial, UTF-8 encoded window titlemonitor - the monitor to use for fullscreen mode, or NULL for windowed modeshare - the window whose context to share resources with, or NULL to not share resourcesNULL if an error occurredpublic static long glfwCreateWindow(int width,
int height,
java.lang.CharSequence title,
long monitor,
long share)
Successful creation does not change which context is current. Before you can use the newly created context, you need to make it current. For information
about the share parameter, see context sharing.
The created window, framebuffer and context may differ from what you requested, as not all parameters and hints are hard constraints. This includes the
size of the window, especially for full screen windows. To query the actual attributes of the created window, framebuffer and context, use queries like
GetWindowAttrib and GetWindowSize and GetFramebufferSize.
To create a full screen window, you need to specify the monitor the window will cover. If no monitor is specified, the window will be windowed mode. Unless you have a way for the user to choose a specific monitor, it is recommended that you pick the primary monitor. For more information on how to query connected monitors, see monitors.
For full screen windows, the specified size becomes the resolution of the window's desired video mode. As long as a full screen window is not iconified, the supported video mode most closely matching the desired video mode is set for the specified monitor. For more information about full screen windows, including the creation of so called windowed full screen or borderless full screen windows, see full screen.
Once you have created the window, you can switch it between windowed and full screen mode with SetWindowMonitor. If the window has an OpenGL or
OpenGL ES context, it will be unaffected.
By default, newly created windows use the placement recommended by the window system. To create the window at a specific position, make it initially
invisible using the VISIBLE window hint, set its position and then
show it.
As long as at least one full screen window is not iconified, the screensaver is prohibited from starting.
Window systems put limits on window sizes. Very large or very small window dimensions may be overridden by the window system on creation. Check the actual size after creation.
The swap interval is not set during window creation and the initial value may vary depending on driver settings and defaults.
GLFW_ICON, it will be set as the initial icon for the window. If no such icon
is present, the IDI_APPLICATION icon will be used instead. To set a different icon, see SetWindowIcon.OPENGL_PROFILE hint accordingly. OpenGL 3.0 and 3.1 contexts are not supported at all on macOS.`MainMenu.nib` it is loaded and assumed to
contain a menu bar. Otherwise a minimal menu bar is created manually with common commands like Hide, Quit and About. The About entry opens a
minimal about dialog with information from the application's bundle. Menu bar creation can be disabled entirely with the COCOA_MENUBAR init hint.COCOA_RETINA_FRAMEBUFFER hint is TRUE and the NSHighResolutionCapable key is enabled in the application bundle's Info.plist. For
more information, see High Resolution Guidelines for macOS in the Mac Developer Library.COCOA_FRAME_NAME, the specified window size and position may be overridden by previously saved
values.WM_CLASS window property will by default be set to the window title passed to this function. The instance
part will use the contents of the RESOURCE_NAME environment variable, if present and not empty, or fall back to the window title. Set the
X11_CLASS_NAME and X11_INSTANCE_NAME window hints to override this.wp_viewporter
protocol. A compositor can still emit close, maximize or fullscreen events, using for instance a keybind mechanism. If neither of these protocols
is supported, the window won't be decorated.width - the desired width, in screen coordinates, of the windowheight - the desired height, in screen coordinates, of the windowtitle - initial, UTF-8 encoded window titlemonitor - the monitor to use for fullscreen mode, or NULL for windowed modeshare - the window whose context to share resources with, or NULL to not share resourcesNULL if an error occurredpublic static void glfwDestroyWindow(long window)
If the context of the specified window is current on the main thread, it is detached before being destroyed.
window - the window to destroypublic static boolean glfwWindowShouldClose(long window)
This function may be called from any thread.
window - the window to querypublic static void glfwSetWindowShouldClose(long window,
boolean value)
This function may be called from any thread. Access is not synchronized.
window - the window whose flag to changevalue - the new valuepublic static void nglfwSetWindowTitle(long window,
long title)
SetWindowTitlepublic static void glfwSetWindowTitle(long window,
java.nio.ByteBuffer title)
This function must only be called from the main thread.
macOS: The window title will not be updated until the next time you process events.
window - the window whose title to changetitle - the UTF-8 encoded window titlepublic static void glfwSetWindowTitle(long window,
java.lang.CharSequence title)
This function must only be called from the main thread.
macOS: The window title will not be updated until the next time you process events.
window - the window whose title to changetitle - the UTF-8 encoded window titlepublic static void nglfwSetWindowIcon(long window,
int count,
long images)
SetWindowIconcount - the number of images in the specified array, or zero to revert to the default window iconpublic static void glfwSetWindowIcon(long window,
@Nullable
GLFWImage.Buffer images)
This function sets the icon of the specified window. If passed an array of candidate images, those of or closest to the sizes desired by the system are selected. If no images are specified, the window reverts to its default icon.
The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.
The desired image sizes varies depending on platform and system settings. The selected images will be rescaled as needed. Good sizes include 16x16, 32x32 and 48x48.
Notes:
PLATFORM_ERROR.window - the window whose icon to setimages - the images to create the icon from. This is ignored if count is zero.public static void nglfwGetWindowPos(long window,
long xpos,
long ypos)
GetWindowPospublic static void glfwGetWindowPos(long window,
@Nullable
java.nio.IntBuffer xpos,
@Nullable
java.nio.IntBuffer ypos)
Any or all of the position arguments may be NULL. If an error occurs, all non-NULL position arguments will be set to zero.
Notes:
PLATFORM_ERROR.window - the window to queryxpos - where to store the x-coordinate of the upper-left corner of the content area, or NULLypos - where to store the y-coordinate of the upper-left corner of the content area, or NULLpublic static void glfwSetWindowPos(long window,
int xpos,
int ypos)
Do not use this function to move an already visible window unless you have very good reasons for doing so, as it will confuse and annoy the user.
The window manager may put limits on what positions are allowed. GLFW cannot and should not override these limits.
Notes:
PLATFORM_ERROR.window - the window to queryxpos - the x-coordinate of the upper-left corner of the content areaypos - the y-coordinate of the upper-left corner of the content areapublic static void nglfwGetWindowSize(long window,
long width,
long height)
GetWindowSizepublic static void glfwGetWindowSize(long window,
@Nullable
java.nio.IntBuffer width,
@Nullable
java.nio.IntBuffer height)
GetFramebufferSize.
Any or all of the size arguments may be NULL. If an error occurs, all non-NULL size arguments will be set to zero.
This function must only be called from the main thread.
window - the window whose size to retrievewidth - where to store the width, in screen coordinates, of the content area, or NULLheight - where to store the height, in screen coordinates, of the content area, or NULLpublic static void glfwSetWindowSizeLimits(long window,
int minwidth,
int minheight,
int maxwidth,
int maxheight)
The size limits are applied immediately to a windowed mode window and may cause it to be resized.
The maximum dimensions must be greater than or equal to the minimum dimensions and all must be greater than or equal to zero.
Notes:
window - the window to set limits forminwidth - the minimum width, in screen coordinates, of the content area, or DONT_CAREminheight - the minimum height, in screen coordinates, of the content area, or DONT_CAREmaxwidth - the maximum width, in screen coordinates, of the content area, or DONT_CAREmaxheight - the maximum height, in screen coordinates, of the content area, or DONT_CAREpublic static void glfwSetWindowAspectRatio(long window,
int numer,
int denom)
The aspect ratio is specified as a numerator and a denominator and both values must be greater than zero. For example, the common 16:9 aspect ratio is specified as 16 and 9, respectively.
If the numerator and denominator is set to DONT_CARE then the aspect ratio limit is disabled.
The aspect ratio is applied immediately to a windowed mode window and may cause it to be resized.
Notes:
public static void glfwSetWindowSize(long window,
int width,
int height)
For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.
If you wish to update the refresh rate of the desired video mode in addition to its resolution, see SetWindowMonitor.
The window manager may put limits on what sizes are allowed. GLFW cannot and should not override these limits.
Notes:
window - the window to resizewidth - the desired width, in screen coordinates, of the window content areaheight - the desired height, in screen coordinates, of the window content areapublic static void nglfwGetFramebufferSize(long window,
long width,
long height)
GetFramebufferSizepublic static void glfwGetFramebufferSize(long window,
@Nullable
java.nio.IntBuffer width,
@Nullable
java.nio.IntBuffer height)
GetWindowSize.
Any or all of the size arguments may be NULL. If an error occurs, all non-NULL size arguments will be set to zero.
This function must only be called from the main thread.
window - the window whose framebuffer to querywidth - where to store the width, in pixels, of the framebuffer, or NULLheight - where to store the height, in pixels, of the framebuffer, or NULLpublic static void nglfwGetWindowFrameSize(long window,
long left,
long top,
long right,
long bottom)
GetWindowFrameSizepublic static void glfwGetWindowFrameSize(long window,
@Nullable
java.nio.IntBuffer left,
@Nullable
java.nio.IntBuffer top,
@Nullable
java.nio.IntBuffer right,
@Nullable
java.nio.IntBuffer bottom)
Because this function retrieves the size of each window frame edge and not the offset along a particular coordinate axis, the retrieved values will always be zero or positive.
Any or all of the size arguments may be NULL. If an error occurs, all non-NULL size arguments will be set to zero.
This function must only be called from the main thread.
window - the window whose frame size to queryleft - where to store the size, in screen coordinates, of the left edge of the window frame, or NULLtop - where to store the size, in screen coordinates, of the top edge of the window frame, or NULLright - where to store the size, in screen coordinates, of the right edge of the window frame, or NULLbottom - where to store the size, in screen coordinates, of the bottom edge of the window frame, or NULLpublic static void nglfwGetWindowContentScale(long window,
long xscale,
long yscale)
GetWindowContentScalepublic static void glfwGetWindowContentScale(long window,
@Nullable
java.nio.FloatBuffer xscale,
@Nullable
java.nio.FloatBuffer yscale)
This function retrieves the content scale for the specified window. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.
On systems where each monitor can have its own content scale, the window content scale will depend on which monitor the system considers the window to be on.
window - the window to queryxscale - where to store the x-axis content scale, or NULLyscale - where to store the y-axis content scale, or NULLpublic static float glfwGetWindowOpacity(long window)
This function returns the opacity of the window, including any decorations.
The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque. If the system does not support whole window transparency, this function always returns one.
The initial opacity value for newly created windows is one.
This function must only be called from the main thread.
window - the window to querypublic static void glfwSetWindowOpacity(long window,
float opacity)
This function sets the opacity of the window, including any decorations.
The opacity (or alpha) value is a positive finite number between zero and one, where zero is fully transparent and one is fully opaque.
The initial opacity value for newly created windows is one.
A window created with framebuffer transparency may not use whole window transparency. The results of doing this are undefined.
This function must only be called from the main thread.
window - the window to set the opacity foropacity - the desired opacity of the specified windowpublic static void glfwIconifyWindow(long window)
If the specified window is a full screen window, the original monitor resolution is restored until the window is restored.
Notes:
RestoreWindow won’t be able to restore it. This is a design decision of the xdg-shell.window - the window to iconifypublic static void glfwRestoreWindow(long window)
If the specified window is a full screen window, the resolution chosen for the window is restored on the selected monitor.
This function must only be called from the main thread.
window - the window to restorepublic static void glfwMaximizeWindow(long window)
If the specified window is a full screen window, this function does nothing.
This function may only be called from the main thread.
window - the window to maximizepublic static void glfwShowWindow(long window)
By default, windowed mode windows are focused when shown. Set the FOCUS_ON_SHOW window hint to change this behavior for all newly created windows, or
change the behavior for an existing window with SetWindowAttrib.
This function must only be called from the main thread.
window - the window to make visiblepublic static void glfwHideWindow(long window)
This function must only be called from the main thread.
window - the window to hidepublic static void glfwFocusWindow(long window)
By default, both windowed and full screen mode windows are focused when initially created. Set the FOCUSED hint to disable this behavior.
Also by default, windowed mode windows are focused when shown with ShowWindow. Set the FOCUS_ON_SHOW window hint to disable this behavior.
Do not use this function to steal focus from other applications unless you are certain that is what the user wants. Focus stealing can be extremely disruptive.
For a less disruptive way of getting the user's attention, see RequestWindowAttention.
Notes:
PLATFORM_ERROR.window - the window to give input focuspublic static void glfwRequestWindowAttention(long window)
This function requests user attention to the specified window. On platforms where this is not supported, attention is requested to the application as a whole.
Once the user has given attention, usually by focusing the window or application, the system will end the request automatically.
window - the window to request attention topublic static long glfwGetWindowMonitor(long window)
This function must only be called from the main thread.
window - the window to queryNULL if the window is in windowed mode or an error occurredpublic static void glfwSetWindowMonitor(long window,
long monitor,
int xpos,
int ypos,
int width,
int height,
int refreshRate)
This function sets the monitor that the window uses for full screen mode or, if the monitor is NULL, makes it windowed mode.
When setting a monitor, this function updates the width, height and refresh rate of the desired video mode and switches to the video mode closest to it. The window position is ignored when setting a monitor.
When the monitor is NULL, the position, width and height are used to place the window content area. The refresh rate is ignored when no monitor is
specified.
If you only wish to update the resolution of a full screen window or the size of a windowed mode window, see SetWindowSize.
When a window transitions from full screen to windowed mode, this function restores any previous window settings such as whether it is decorated, floating, resizable, has size or aspect ratio limits, etc.
Notes:
window - the window whose monitor, size or video mode to setmonitor - the desired monitor, or NULL to set windowed modexpos - the desired x-coordinate of the upper-left corner of the content areaypos - the desired y-coordinate of the upper-left corner of the content areawidth - the desired with, in screen coordinates, of the content area or video modeheight - the desired height, in screen coordinates, of the content area or video moderefreshRate - the desired refresh rate, in Hz, of the video mode, or DONT_CAREpublic static int glfwGetWindowAttrib(long window,
int attrib)
This function must only be called from the main thread.
Framebuffer related hints are not window attributes.
Zero is a valid value for many window and context related attributes so you cannot use a return value of zero as an indication of errors. However, this function should not fail as long as it is passed valid arguments and the library has been initialized.
window - the window to queryattrib - the window attribute whose value to return. One of:public static void glfwSetWindowAttrib(long window,
int attrib,
int value)
This function must only be called from the main thread.
window - the window to set the attribute forattrib - the attribute to set.
Some of these attributes are ignored for full screen windows. The new value will take effect if the window is later made windowed.
Some of these attributes are ignored for windowed mode windows. The new value will take effect if the window is later made full screen.
Calling GetWindowAttrib will always return the latest value, even if that value is ignored by the current mode of the window. One of:
DECORATED | RESIZABLE | FLOATING | AUTO_ICONIFY | FOCUS_ON_SHOW |
value - the value to setpublic static void glfwSetWindowUserPointer(long window,
long pointer)
NULL.
This function may be called from any thread. Access is not synchronized.
window - the window whose pointer to setpointer - the new valuepublic static long glfwGetWindowUserPointer(long window)
NULL.
This function may be called from any thread. Access is not synchronized.
window - the window whose pointer to returnpublic static long nglfwSetWindowPosCallback(long window,
long cbfun)
SetWindowPosCallback@Nullable public static GLFWWindowPosCallback glfwSetWindowPosCallback(long window, @Nullable GLFWWindowPosCallbackI cbfun)
Notes:
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowSizeCallback(long window,
long cbfun)
SetWindowSizeCallback@Nullable public static GLFWWindowSizeCallback glfwSetWindowSizeCallback(long window, @Nullable GLFWWindowSizeCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowCloseCallback(long window,
long cbfun)
SetWindowCloseCallback@Nullable public static GLFWWindowCloseCallback glfwSetWindowCloseCallback(long window, @Nullable GLFWWindowCloseCallbackI cbfun)
The close flag is set before this callback is called, but you can modify it at any time with SetWindowShouldClose.
The close callback is not triggered by DestroyWindow.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowRefreshCallback(long window,
long cbfun)
SetWindowRefreshCallback@Nullable public static GLFWWindowRefreshCallback glfwSetWindowRefreshCallback(long window, @Nullable GLFWWindowRefreshCallbackI cbfun)
On compositing window systems such as Aero, Compiz or Aqua, where the window contents are saved off-screen, this callback may be called only very infrequently or never at all.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowFocusCallback(long window,
long cbfun)
SetWindowFocusCallback@Nullable public static GLFWWindowFocusCallback glfwSetWindowFocusCallback(long window, @Nullable GLFWWindowFocusCallbackI cbfun)
After the focus callback is called for a window that lost input focus, synthetic key and mouse button release events will be generated for all such
that had been pressed. For more information, see SetKeyCallback and SetMouseButtonCallback.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowIconifyCallback(long window,
long cbfun)
SetWindowIconifyCallback@Nullable public static GLFWWindowIconifyCallback glfwSetWindowIconifyCallback(long window, @Nullable GLFWWindowIconifyCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowMaximizeCallback(long window,
long cbfun)
SetWindowMaximizeCallback@Nullable public static GLFWWindowMaximizeCallback glfwSetWindowMaximizeCallback(long window, @Nullable GLFWWindowMaximizeCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetFramebufferSizeCallback(long window,
long cbfun)
SetFramebufferSizeCallback@Nullable public static GLFWFramebufferSizeCallback glfwSetFramebufferSizeCallback(long window, @Nullable GLFWFramebufferSizeCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static long nglfwSetWindowContentScaleCallback(long window,
long cbfun)
SetWindowContentScaleCallback@Nullable public static GLFWWindowContentScaleCallback glfwSetWindowContentScaleCallback(long window, @Nullable GLFWWindowContentScaleCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was set or the library had not been
initializedpublic static void glfwPollEvents()
This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called.
On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.
On some platforms, certain events are sent directly to the application without going through the event queue, causing callbacks to be called outside of a call to one of the event processing functions.
Event processing is not required for joystick input to work.
public static void glfwWaitEvents()
This function puts the calling thread to sleep until at least one event is available in the event queue. Once one or more events are available, it
behaves exactly like PollEvents, i.e. the events in the queue are processed and the function then returns immediately. Processing events will cause
the window and input callbacks associated with those events to be called.
Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.
On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.
On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.
Event processing is not required for joystick input to work.
public static void glfwWaitEventsTimeout(double timeout)
This function puts the calling thread to sleep until at least one event is available in the event queue, or until the specified timeout is reached. If
one or more events are available, it behaves exactly like PollEvents, i.e. the events in the queue are processed and the function then returns
immediately. Processing events will cause the window and input callbacks associated with those events to be called.
The timeout value must be a positive finite number.
Since not all events are associated with callbacks, this function may return without a callback having been called even if you are monitoring all callbacks.
On some platforms, a window move, resize or menu operation will cause event processing to block. This is due to how event processing is designed on those platforms. You can use the window refresh callback to redraw the contents of your window when necessary during such operations.
On some platforms, certain callbacks may be called outside of a call to one of the event processing functions.
Event processing is not required for joystick input to work.
timeout - the maximum amount of time, in seconds, to waitpublic static void glfwPostEmptyEvent()
WaitEvents or WaitEventsTimeout to return.
This function may be called from any thread.
public static int glfwGetInputMode(long window,
int mode)
This function must only be called from the main thread.
window - the window to querymode - the input mode whose value to return. One of:CURSOR | STICKY_KEYS | STICKY_MOUSE_BUTTONS | LOCK_KEY_MODS | RAW_MOUSE_MOTION |
public static void glfwSetInputMode(long window,
int mode,
int value)
If mode is CURSOR, the value must be one of the following cursor modes:
CURSOR_NORMAL makes the cursor visible and behaving normally.CURSOR_HIDDEN makes the cursor invisible when it is over the content area of the window but does not restrict the cursor from leaving.CURSOR_DISABLED hides and grabs the cursor, providing virtual and unlimited cursor movement. This is useful for implementing for example 3D camera
controls.If the mode is STICKY_KEYS, the value must be either TRUE to enable sticky keys, or FALSE to disable it. If sticky keys are enabled, a key
press will ensure that GetKey returns PRESS the next time it is called even if the key had been released before the call. This is useful when you
are only interested in whether keys have been pressed but not when or in which order.
If the mode is STICKY_MOUSE_BUTTONS, the value must be either TRUE to enable sticky mouse buttons, or FALSE to disable it. If sticky mouse
buttons are enabled, a mouse button press will ensure that GetMouseButton returns PRESS the next time it is called even if the mouse button had
been released before the call. This is useful when you are only interested in whether mouse buttons have been pressed but not when or in which order.
If the mode is LOCK_KEY_MODS, the value must be either TRUE to enable lock key modifier bits, or FALSE to disable them. If enabled,
callbacks that receive modifier bits will also have the MOD_CAPS_LOCK bit set when the event was generated with Caps Lock on, and the MOD_NUM_LOCK
bit when Num Lock was on.
If the mode is RAW_MOUSE_MOTION, the value must be either TRUE to enable raw (unscaled and unaccelerated) mouse motion when the cursor is disabled,
or FALSE to disable it. If raw motion is not supported, attempting to set this will emit PLATFORM_ERROR. Call RawMouseMotionSupported to check for
support.
This function must only be called from the main thread.
window - the window whose input mode to setmode - the input mode to set. One of:CURSOR | STICKY_KEYS | STICKY_MOUSE_BUTTONS |
value - the new value of the specified input modepublic static boolean glfwRawMouseMotionSupported()
This function returns whether raw mouse motion is supported on the current system. This status does not change after GLFW has been initialized so you
only need to check this once. If you attempt to enable raw motion on a system that does not support it, PLATFORM_ERROR will be emitted.
Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse motion is only provided when the cursor is disabled.
This function must only be called from the main thread.
public static long nglfwGetKeyName(int key,
int scancode)
GetKeyName@Nullable
public static java.lang.String glfwGetKeyName(int key,
int scancode)
This function returns the name of the specified printable key, encoded as UTF-8. This is typically the character that key would produce without any modifier keys, intended for displaying key bindings to the user. For dead keys, it is typically the diacritic it would add to a character.
Do not use this function for text input. You will break text input for many languages even if it happens to work for yours.
If the key is KEY_UNKNOWN, the scancode is used to identify the key, otherwise the scancode is ignored. If you specify a non-printable key, or
KEY_UNKNOWN and a scancode that maps to a non-printable key, this function returns NULL but does not emit an error.
This behavior allows you to always pass in the arguments in the key callback without modification.
The printable keys are:
KEY_APOSTROPHEKEY_COMMAKEY_MINUSKEY_PERIODKEY_SLASHKEY_SEMICOLONKEY_EQUALKEY_LEFT_BRACKETKEY_RIGHT_BRACKETKEY_BACKSLASHKEY_WORLD_1KEY_WORLD_2KEY_0 to KEY_9KEY_A to KEY_ZKEY_KP_0 to KEY_KP_9KEY_KP_DECIMALKEY_KP_DIVIDEKEY_KP_MULTIPLYKEY_KP_SUBTRACTKEY_KP_ADDKEY_KP_EQUALNames for printable keys depend on keyboard layout, while names for non-printable keys are the same across layouts but depend on the application language and should be localized along with other user interface text.
The contents of the returned string may change when a keyboard layout change event is received.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the library is terminated.
This function must only be called from the main thread.
key - the key to query, or KEY_UNKNOWNscancode - the scancode of the key to queryNULLpublic static int glfwGetKeyScancode(int key)
This function returns the platform dependent scancode of the specified key. This is intended for platform specific default keybindings.
If the key is KEY_UNKNOWN or does not exist on the keyboard this method will return -1.
This function may be called from any thread.
key - the key to query, or KEY_UNKNOWN-1 if an errror occurredpublic static int glfwGetKey(long window,
int key)
PRESS or RELEASE. The higher-level action
REPEAT is only reported to the key callback.
If the STICKY_KEYS input mode is enabled, this function returns PRESS the first time you call it for a key that was pressed, even if that
key has already been released.
The key functions deal with physical keys, with key tokens named after their use on the standard US keyboard layout. If you want to input text, use the Unicode character callback instead.
The modifier key bit masks are not key tokens and cannot be used with this function.
Do not use this function to implement text input.
KEY_UNKNOWN is not a valid key for this function.public static int glfwGetMouseButton(long window,
int button)
PRESS or RELEASE. The
higher-level action REPEAT is only reported to the mouse button callback.
If the STICKY_MOUSE_BUTTONS input mode is enabled, this function returns PRESS the first time you call it for a mouse button that was pressed, even
if that mouse button has already been released.
This function must only be called from the main thread.
public static void nglfwGetCursorPos(long window,
long xpos,
long ypos)
GetCursorPospublic static void glfwGetCursorPos(long window,
@Nullable
java.nio.DoubleBuffer xpos,
@Nullable
java.nio.DoubleBuffer ypos)
If the cursor is disabled (with CURSOR_DISABLED) then the cursor position is unbounded and limited only by the minimum and maximum values of a
double.
The coordinates can be converted to their integer equivalents with the Math.floor(double) function. Casting directly to an integer type works for positive
coordinates, but fails for negative ones.
Any or all of the position arguments may be NULL. If an error occurs, all non-NULL position arguments will be set to zero.
This function must only be called from the main thread.
window - the desired windowxpos - where to store the cursor x-coordinate, relative to the left edge of the content area, or NULLypos - where to store the cursor y-coordinate, relative to the to top edge of the content area, or NULL.public static void glfwSetCursorPos(long window,
double xpos,
double ypos)
Do not use this function to implement things like camera controls. GLFW already provides the CURSOR_DISABLED cursor mode that hides the cursor,
transparently re-centers it and provides unconstrained cursor motion. See SetInputMode for more information.
If the cursor mode is CURSOR_DISABLED then the cursor position is unconstrained and limited only by the minimum and maximum values of double.
Notes:
CURSOR_DISABLED, otherwise it will do nothing.window - the desired windowxpos - the desired x-coordinate, relative to the left edge of the content areaypos - the desired y-coordinate, relative to the top edge of the content areapublic static long nglfwCreateCursor(long image,
int xhot,
int yhot)
CreateCursorpublic static long glfwCreateCursor(GLFWImage image, int xhot, int yhot)
SetCursor. The cursor can be destroyed with DestroyCursor. Any remaining
cursors are destroyed by Terminate.
The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.
The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.
image - the desired cursor imagexhot - the desired x-coordinate, in pixels, of the cursor hotspotyhot - the desired y-coordinate, in pixels, of the cursor hotspotNULL if an error occurredpublic static long glfwCreateStandardCursor(int shape)
SetCursor.
The images for these cursors come from the system cursor theme and their exact appearance will vary between platforms.
Most of these shapes are guaranteed to exist on every supported platform but a few may not be present. See the table below for details.
| Cursor shape | Windows | macOS | X11 | Wayland |
|---|---|---|---|---|
ARROW_CURSOR | Yes | Yes | Yes | Yes |
IBEAM_CURSOR | Yes | Yes | Yes | Yes |
CROSSHAIR_CURSOR | Yes | Yes | Yes | Yes |
POINTING_HAND_CURSOR | Yes | Yes | Yes | Yes |
RESIZE_EW_CURSOR | Yes | Yes | Yes | Yes |
RESIZE_NS_CURSOR | Yes | Yes | Yes | Yes |
RESIZE_NWSE_CURSOR | Yes | Yes1 | Maybe2 | Maybe2 |
RESIZE_NESW_CURSOR | Yes | Yes1 | Maybe2 | Maybe2 |
RESIZE_ALL_CURSOR | Yes | Yes | Yes | Yes |
NOT_ALLOWED_CURSOR | Yes | Yes | Maybe2 | Maybe2 |
If the requested shape is not available, this function emits a CURSOR_UNAVAILABLE error and returns NULL.
This function must only be called from the main thread.
shape - one of the standard shapes. One of:ARROW_CURSOR | IBEAM_CURSOR | CROSSHAIR_CURSOR | POINTING_HAND_CURSOR | RESIZE_EW_CURSOR |
RESIZE_NS_CURSOR | RESIZE_NWSE_CURSOR | RESIZE_NESW_CURSOR | RESIZE_ALL_CURSOR | NOT_ALLOWED_CURSOR |
NULL if an error occurred. Possible errors include NOT_INITIALIZED, INVALID_ENUM, CURSOR_UNAVAILABLE and
PLATFORM_ERROR.public static void glfwDestroyCursor(long cursor)
CreateCursor. Any remaining cursors will be destroyed by Terminate.
cursor - the cursor object to destroypublic static void glfwSetCursor(long window,
long cursor)
CURSOR_NORMAL.
On some platforms, the set cursor may not be visible unless the window also has input focus.
This function must only be called from the main thread.
window - the window to set the system cursor forcursor - the cursor to set, or NULL to switch back to the default arrow cursorpublic static long nglfwSetKeyCallback(long window,
long cbfun)
SetKeyCallback@Nullable public static GLFWKeyCallback glfwSetKeyCallback(long window, @Nullable GLFWKeyCallbackI cbfun)
The key functions deal with physical keys, with layout independent key tokens named after their values in the standard US keyboard layout. If you want
to input text, use SetCharCallback instead.
When a window loses input focus, it will generate synthetic key release events for all pressed keys. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the window focus callback has been called.
The scancode of a key is specific to that platform or sometimes even to that machine. Scancodes are intended to allow users to bind keys that don't have
a GLFW key token. Such keys have key set to KEY_UNKNOWN, their state is not saved and so it cannot be queried with GetKey.
Sometimes GLFW needs to generate synthetic key events, in which case the scancode may be zero.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetCharCallback(long window,
long cbfun)
SetCharCallback@Nullable public static GLFWCharCallback glfwSetCharCallback(long window, @Nullable GLFWCharCallbackI cbfun)
The character callback is intended for Unicode text input. As it deals with characters, it is keyboard layout dependent, whereas SetKeyCallback is
not. Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key
was pressed or released, see the key callback instead.
The character callback behaves as system text input normally does and will not be called if modifier keys are held down that would prevent normal text input on that platform, for example a Super (Command) key on macOS or Alt key on Windows.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetCharModsCallback(long window,
long cbfun)
SetCharModsCallback@Nullable public static GLFWCharModsCallback glfwSetCharModsCallback(long window, @Nullable GLFWCharModsCallbackI cbfun)
The character with modifiers callback is intended for implementing custom Unicode character input. For regular Unicode text input, see
SetCharCallback. Like the character callback, the character with modifiers callback deals with characters and is keyboard layout dependent.
Characters do not map 1:1 to physical keys, as a key may produce zero, one or more characters. If you want to know whether a specific physical key was
pressed or released, see SetKeyCallback instead.
This function must only be called from the main thread.
Deprecated: scheduled for removal in version 4.0.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetMouseButtonCallback(long window,
long cbfun)
SetMouseButtonCallback@Nullable public static GLFWMouseButtonCallback glfwSetMouseButtonCallback(long window, @Nullable GLFWMouseButtonCallbackI cbfun)
When a window loses input focus, it will generate synthetic mouse button release events for all pressed mouse buttons. You can tell these events from user-generated events by the fact that the synthetic ones are generated after the focus loss event has been processed, i.e. after the window focus callback has been called.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetCursorPosCallback(long window,
long cbfun)
SetCursorPosCallback@Nullable public static GLFWCursorPosCallback glfwSetCursorPosCallback(long window, @Nullable GLFWCursorPosCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetCursorEnterCallback(long window,
long cbfun)
SetCursorEnterCallback@Nullable public static GLFWCursorEnterCallback glfwSetCursorEnterCallback(long window, @Nullable GLFWCursorEnterCallbackI cbfun)
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetScrollCallback(long window,
long cbfun)
SetScrollCallback@Nullable public static GLFWScrollCallback glfwSetScrollCallback(long window, @Nullable GLFWScrollCallbackI cbfun)
The scroll callback receives all scrolling input, like that from a mouse wheel or a touchpad scrolling area.
This function must only be called from the main thread.
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static long nglfwSetDropCallback(long window,
long cbfun)
SetDropCallback@Nullable public static GLFWDropCallback glfwSetDropCallback(long window, @Nullable GLFWDropCallbackI cbfun)
Because the path array and its strings may have been generated specifically for that event, they are not guaranteed to be valid after the callback has returned. If you wish to use them after the callback returns, you need to make a deep copy.
Notes:
window - the window whose callback to setcbfun - the new callback or NULL to remove the currently set callbackNULL if no callback was setpublic static boolean glfwJoystickPresent(int jid)
This function must only be called from the main thread.
public static long nglfwGetJoystickAxes(int jid,
long count)
GetJoystickAxescount - where to store the number of axis values in the returned array. This is set to zero if the joystick is not present or an error occurred.@Nullable public static java.nio.FloatBuffer glfwGetJoystickAxes(int jid)
If the specified joystick is not present this function will return NULL but will not generate an error. This can be used instead of first calling
JoystickPresent.
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.
This function must only be called from the main thread.
jid - the joystick to queryNULL if the joystick is not presentpublic static long nglfwGetJoystickButtons(int jid,
long count)
GetJoystickButtonscount - where to store the number of button states in the returned array. This is set to zero if the joystick is not present or an error occurred.@Nullable public static java.nio.ByteBuffer glfwGetJoystickButtons(int jid)
PRESS or RELEASE.
For backward compatibility with earlier versions that did not have GetJoystickHats, the button array also includes all hats, each represented as four
buttons. The hats are in the same order as returned by GetJoystickHats and are in the order up, right, down and left. To disable these extra
buttons, set the JOYSTICK_HAT_BUTTONS init hint before initialization.
If the specified joystick is not present this function will return NULL but will not generate an error. This can be used instead of first calling
JoystickPresent.
The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.
This function must only be called from the main thread.
jid - the joystick to queryNULL if the joystick is not presentpublic static long nglfwGetJoystickHats(int jid,
long count)
GetJoystickHatscount - where to store the number of hat states in the returned array. This is set to zero if the joystick is not present or an error occurred.@Nullable public static java.nio.ByteBuffer glfwGetJoystickHats(int jid)
This function returns the state of all hats of the specified joystick. Each element in the array is one of the following values:
Name | Value
------------------- | ------------------------------
GLFW_HAT_CENTERED | 0
GLFW_HAT_UP | 1
GLFW_HAT_RIGHT | 2
GLFW_HAT_DOWN | 4
GLFW_HAT_LEFT | 8
GLFW_HAT_RIGHT_UP | GLFW_HAT_RIGHT | GLFW_HAT_UP
GLFW_HAT_RIGHT_DOWN | GLFW_HAT_RIGHT | GLFW_HAT_DOWN
GLFW_HAT_LEFT_UP | GLFW_HAT_LEFT | GLFW_HAT_UP
GLFW_HAT_LEFT_DOWN | GLFW_HAT_LEFT | GLFW_HAT_DOWN
The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.
if (hats[2] & GLFW_HAT_RIGHT)
{
// State of hat 2 could be right-up, right or right-down
}
If the specified joystick is not present this function will return NULL but will not generate an error. This can be used instead of first calling
JoystickPresent.
jid - the joystick to queryNULL if the joystick is not present or an error occurredpublic static long nglfwGetJoystickName(int jid)
GetJoystickName@Nullable public static java.lang.String glfwGetJoystickName(int jid)
If the specified joystick is not present this function will return NULL but will not generate an error. This can be used instead of first calling
JoystickPresent.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, this function is called again for that joystick or the library is terminated.
This function must only be called from the main thread.
jid - the joystick to queryNULL if the joystick is not presentpublic static long nglfwGetJoystickGUID(int jid)
GetJoystickGUID@Nullable public static java.lang.String glfwGetJoystickGUID(int jid)
The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID even if there is no gamepad mapping assigned to it.
The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have the same GUID on that platform. The GUID for a unit may vary between platforms depending on what hardware information the platform specific APIs provide.
If the specified joystick is not present this function will return NULL but will not generate an error. This can be used instead of first calling
JoystickPresent.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.
This function must only be called from the main thread.
jid - the joystick to queryNULL if the joystick is not present or an error occurredpublic static void glfwSetJoystickUserPointer(int jid,
long pointer)
This function sets the user-defined pointer of the specified joystick. The current value is retained until the joystick is disconnected. The initial
value is NULL.
This function may be called from the joystick callback, even for a joystick that is being disconnected.
This function may be called from any thread. Access is not synchronized.
jid - the joystick whose pointer to setpointer - the new valuepublic static long glfwGetJoystickUserPointer(int jid)
This function returns the current value of the user-defined pointer of the specified joystick. The initial value is NULL.
This function may be called from the joystick callback, even for a joystick that is being disconnected.
This function may be called from any thread. Access is not synchronized.
jid - the joystick whose pointer to setpublic static boolean glfwJoystickIsGamepad(int jid)
If the specified joystick is present but does not have a gamepad mapping this function will return false but will not generate an error. Call
JoystickPresent to check if a joystick is present regardless of whether it has a mapping.
This function must only be called from the main thread.
jid - the joystick id to querytrue if a joystick is both present and has a gamepad mapping or false otherwisepublic static long nglfwSetJoystickCallback(long cbfun)
SetJoystickCallback@Nullable public static GLFWJoystickCallback glfwSetJoystickCallback(@Nullable GLFWJoystickCallbackI cbfun)
For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the event processing functions. Joystick disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns if the joystick is not present.
This function must only be called from the main thread.
cbfun - the new callback, or NULL to remove the currently set callbackNULL if no callback was set or the library had not been initializedpublic static int nglfwUpdateGamepadMappings(long string)
UpdateGamepadMappingspublic static boolean glfwUpdateGamepadMappings(java.nio.ByteBuffer string)
This function parses the specified ASCII encoded string and updates the internal list with any gamepad mappings it finds. This string may contain either
a single gamepad mapping or many mappings separated by newlines. The parser supports the full format of the gamecontrollerdb.txt source file
including empty lines and comments.
See gamepad_mapping for a description of the format.
If there is already a gamepad mapping for a given GUID in the internal list, it will be replaced by the one passed to this function. If the library is terminated and re-initialized the internal list will revert to the built-in default.
This function must only be called from the main thread.
string - the string containing the gamepad mappingstrue, or false if an error occurredpublic static long nglfwGetGamepadName(int jid)
GetGamepadName@Nullable public static java.lang.String glfwGetGamepadName(int jid)
If the specified joystick is not present or does not have a gamepad mapping this function will return NULL but will not generate an error. Call
JoystickIsGamepad to check if a joystick is present regardless of whether it has a mapping.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected, the gamepad mappings are updated or the library is terminated.
This function must only be called from the main thread.
jid - the joystick to queryNULL if the joystick is not present, does not have a mapping or an error occurredpublic static int nglfwGetGamepadState(int jid,
long state)
GetGamepadStatepublic static boolean glfwGetGamepadState(int jid,
GLFWGamepadState state)
If the specified joystick is not present or does not have a gamepad mapping this function will return FALSE but will not generate an error. Call
JoystickPresent to check whether it is present regardless of whether it has a mapping.
The Guide button may not be available for input as it is often hooked by the system or the Steam client.
Not all devices have all the buttons or axes provided by GLFWGamepadState. Unavailable buttons and axes will always report RELEASE and 0.0
respectively.
This function must only be called from the main thread.
jid - the joystick to querystate - the gamepad input state of the joysticktrue if successful, or false if no joystick is connected, it has no gamepad mapping or an error occurredpublic static void nglfwSetClipboardString(long window,
long string)
SetClipboardStringpublic static void glfwSetClipboardString(long window,
java.nio.ByteBuffer string)
The specified string is copied before this function returns.
Notes:
window - deprecated, any valid window or NULL.string - a UTF-8 encoded stringpublic static void glfwSetClipboardString(long window,
java.lang.CharSequence string)
The specified string is copied before this function returns.
Notes:
window - deprecated, any valid window or NULL.string - a UTF-8 encoded stringpublic static long nglfwGetClipboardString(long window)
GetClipboardString@Nullable public static java.lang.String glfwGetClipboardString(long window)
NULL is returned and a FORMAT_UNAVAILABLE error is generated.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to GetClipboardString or
SetClipboardString, or until the library is terminated.
GetClipboardString or SetClipboardString.window - deprecated, any valid window or NULL.NULL if an error occurredpublic static double glfwGetTime()
SetTime, the timer measures time elapsed since GLFW was initialized.
The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It uses the highest-resolution monotonic time source on each supported platform.
This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized
with calls to SetTime.
public static void glfwSetTime(double time)
The upper limit of the timer is calculated as floor((264 - 1) / 109) and is due to implementations storing nanoseconds
in 64 bits. The limit may be increased in the future.
This function may be called from any thread. Reading and writing of the internal timer offset is not atomic, so it needs to be externally synchronized
with calls to GetTime.
time - the new value, in secondspublic static long glfwGetTimerValue()
This function returns the current value of the raw timer, measured in 1 / frequency seconds. To get the frequency, call GetTimerFrequency.
This function may be called from any thread.
public static long glfwGetTimerFrequency()
This function may be called from any thread.
public static void glfwMakeContextCurrent(long window)
When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.
By default, making a context non-current implicitly forces a pipeline flush. On machines that support
GL_KHR_context_flush_control, you can control whether
a context performs this flush by setting the CONTEXT_RELEASE_BEHAVIOR
window hint.
The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a NO_WINDOW_CONTEXT error.
This function may be called from any thread.
window - the window whose context to make current, or NULL to detach the current contextpublic static long glfwGetCurrentContext()
This function may be called from any thread.
NULL if no window's context is currentpublic static void glfwSwapBuffers(long window)
The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a NO_WINDOW_CONTEXT error.
This function does not apply to Vulkan. If you are rendering with Vulkan, vkQueuePresentKHR instead.
EGL: The context of the specified window must be current on the calling thread.
This function may be called from any thread.
window - the window whose buffers to swappublic static void glfwSwapInterval(int interval)
SwapBuffers was called
before swapping the buffers and returning. This is sometimes called vertical synchronization, vertical retrace synchronization or just
vsync.
A context that supports either of the
WGL_EXT_swap_control_tear and
GLX_EXT_swap_control_tear extensions also accepts
negative swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these
extensions with ExtensionSupported. For more information about swap tearing, see the extension specifications.
A context must be current on the calling thread. Calling this function without a current context will cause a NO_CURRENT_CONTEXT error.
This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.
interval - the minimum number of screen updates to wait for until the buffers are swapped by SwapBufferspublic static int nglfwExtensionSupported(long extension)
ExtensionSupportedpublic static boolean glfwExtensionSupported(java.nio.ByteBuffer extension)
A context must be current on the calling thread. Calling this function without a current context will cause a NO_CURRENT_CONTEXT error.
As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.
This function does not apply to Vulkan. If you are using Vulkan, see glfwGetRequiredInstanceExtensions,
vkEnumerateInstanceExtensionProperties and vkEnumerateDeviceExtensionProperties instead.
This function may be called from any thread.
public static boolean glfwExtensionSupported(java.lang.CharSequence extension)
A context must be current on the calling thread. Calling this function without a current context will cause a NO_CURRENT_CONTEXT error.
As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.
This function does not apply to Vulkan. If you are using Vulkan, see glfwGetRequiredInstanceExtensions,
vkEnumerateInstanceExtensionProperties and vkEnumerateDeviceExtensionProperties instead.
This function may be called from any thread.
public static long nglfwGetProcAddress(long procname)
GetProcAddresspublic static long glfwGetProcAddress(java.nio.ByteBuffer procname)
A context must be current on the calling thread. Calling this function without a current context will cause a NO_CURRENT_CONTEXT error.
This function does not apply to Vulkan. If you are rendering with Vulkan, glfwGetInstanceProcAddress, vkGetInstanceProcAddr and
vkGetDeviceProcAddr instead.
NULL address despite the associated version or extension not being available. Always check the context version or
extension string first.procname - the ASCII encoded name of the functionNULL if an error occurredpublic static long glfwGetProcAddress(java.lang.CharSequence procname)
A context must be current on the calling thread. Calling this function without a current context will cause a NO_CURRENT_CONTEXT error.
This function does not apply to Vulkan. If you are rendering with Vulkan, glfwGetInstanceProcAddress, vkGetInstanceProcAddr and
vkGetDeviceProcAddr instead.
NULL address despite the associated version or extension not being available. Always check the context version or
extension string first.procname - the ASCII encoded name of the functionNULL if an error occurredpublic static void glfwGetVersion(@Nullable
int[] major,
@Nullable
int[] minor,
@Nullable
int[] rev)
GetVersionpublic static void glfwGetMonitorPos(long monitor,
@Nullable
int[] xpos,
@Nullable
int[] ypos)
GetMonitorPospublic static void glfwGetMonitorWorkarea(long monitor,
@Nullable
int[] xpos,
@Nullable
int[] ypos,
@Nullable
int[] width,
@Nullable
int[] height)
GetMonitorWorkareapublic static void glfwGetMonitorPhysicalSize(long monitor,
@Nullable
int[] widthMM,
@Nullable
int[] heightMM)
GetMonitorPhysicalSizepublic static void glfwGetMonitorContentScale(long monitor,
@Nullable
float[] xscale,
@Nullable
float[] yscale)
GetMonitorContentScalepublic static void glfwGetWindowPos(long window,
@Nullable
int[] xpos,
@Nullable
int[] ypos)
GetWindowPospublic static void glfwGetWindowSize(long window,
@Nullable
int[] width,
@Nullable
int[] height)
GetWindowSizepublic static void glfwGetFramebufferSize(long window,
@Nullable
int[] width,
@Nullable
int[] height)
GetFramebufferSizepublic static void glfwGetWindowFrameSize(long window,
@Nullable
int[] left,
@Nullable
int[] top,
@Nullable
int[] right,
@Nullable
int[] bottom)
GetWindowFrameSizepublic static void glfwGetWindowContentScale(long window,
@Nullable
float[] xscale,
@Nullable
float[] yscale)
GetWindowContentScalepublic static void glfwGetCursorPos(long window,
@Nullable
double[] xpos,
@Nullable
double[] ypos)
GetCursorPosCopyright LWJGL. All Rights Reserved. License terms.