Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Introduction to GLFW
Introduction to GLFW
Official website: AME);

Rush back the addresses of GL/ES functions supported by the current context, including the core library and the extension library.

Callback function:

GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback);

Set the callback function of joystick configuration, or override the original callback function and call the callback function when the joystick is connected or disconnected. The format of the callback function is void function _ name (int jid, int event).

GLFWAPI GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback);

Set the destruction function of the monitor. If it has been set before, it will replace the previous value.

GLFWAPI GLFWwindowposfun glfwSetWindowPosCallback(GLFWwindow * window,GLFWwindowposfun callback);

Set the position callback of the window. This callback function will be called when the window moves. The returned position is the screen coordinates, and the upper left corner is the origin.

GLFWAPI GLFWwindowsizefun glfwSetWindowSizeCallback(GLFWwindow * window,GLFWwindowsizefun callback);

The callback function for setting the window size, which is called when the window is resized, is also the screen coordinate.

GLFWAPI GLFWwindowclosefun glfwSetWindowCloseCallback(GLFWwindow * window,GLFWwindowclosefun callback);

Sets the callback when the window closes, which is called when the window closes.

GLFWAPI GLFWwindowrefreshfun glfwSetWindowRefreshCallback(GLFWwindow * window,GLFWwindowrefreshfun callback);

Set the callback function for window refresh. If the window is covered by another window and then exposed, this function will be called when the window is refreshed.

Glfwwapi GLFWwindowfocusfun glfwsetwindowfocuscallback (glfwwindow * window, glfwwindowfocusfun callback);

Sets the focus callback function of the window, which is called when the window gains or loses the input focus.

Glfwwapi glfwwindowiconifiyfun glfwsetwindowiconifiycallback (glfwwindow * window, glfwwindowiconifiyfun callback);

Set the icon callback function, which is called when the window is icon or restored.

GLFWAPI GLFWwindowmaximizefun glfwSetWindowMaximizeCallback(GLFWwindow * window,GLFWwindowmaximizefun callback);

Sets the callback function for window maximization, which is called when the window is maximized or reset.

GLFWAPI GLFWframebuffersizefun glfwSetFramebufferSizeCallback(GLFWwindow * window,GLFWframebuffersizefun callback);

Set the callback function of framebuffer resize, which is called when framebuffer resize.

GLFWAPI GLFWwindowcontentscalefun glfwSetWindowContentScaleCallback(GLFWwindow * window,GLFWwindowcontentscalefun callback);

Set the content proportion callback function of the window, and call this function when the content proportion of the window changes.

GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwiunning a test,x 1 1 perf determine funt * window,GLFWkeyfun callback);

Set the callback function of the key, which is called when the key is pressed, repeated or released.

GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow * window,GLFWcharfun callback);

Sets the callback function of a character, which is called when the specified character encoding is entered.

Glfwapi GLFWcharmodsfun glfwsetcharmodscalback (glfwwindow * window, glfwcharmodsfun callback);

Set the callback function for string encoding modification.

GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow * window,GLFWmousebuttonfun callback);

Sets the callback function of the mouse button, which is triggered when the mouse is pressed or released. The format of the callback function is void function _ name (glfwwindow * window, int button, int action, int MODS).

Glfwwapi GLFWcursorposfun glfwsetcursorposcallback (glfwwindow * window, glfwcursorposfun callback);

Set the cursor position callback function, which is triggered when the cursor moves.

GLFWAPI GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow * window,GLFWcursorenterfun callback);

Set the callback function for the cursor to enter or leave, which is triggered when the cursor enters or leaves the designated area of the screen. The format of the callback function is void function _ name (glfwwindow * window, int entered).

GLFWAPI GLFWscrollfun glfwsetscrollcallcallback(GLFWwindow * window,GLFWscrollfun callback);

Set the wheel callback function

Callback function void function _ name (glfwwindow * window, int path _ count, constchar * paths [])

GLFWAPI GLFWdropfun glfwSetDropCallback(GLFWwindow * window,GLFWdropfun callback);

Sets the path discard callback function, which is triggered when the share of one or more dragged paths is discarded.

Vulkan function:

GLFWAPI int glfwVulkanSupported(void);

Inquire whether vulkan loader and any ICD with the lowest function are found.

GLFWAPI const char * * glfwGetRequiredInstanceExtensions(uint 32 _ t * count);

Returns an array of vulkan instance extensions required by GLFW, which contains the Vulkan instance extensions required by GLFW when creating Vulkan surfaces.

Glfwapi glfwvkproc glfwgetinstance address (vkinstance instance, constchar * procname);

Returns the address of the specified Vulkan instance function.

Glfwwapi int glfwgetphysicaldevice reservation support (vk instance, VkPhysicalDevice device, uint32 _ tqueuefamily);

Query whether the queue family of the specified physical device compiled by GLFW currently displays images.

Glf wapi vk result glfwcreatewindowsurface (vk instance, GLFWwindow* window, const vk allocation callbacks * allocator, vk surface khr * surface);

Create a surface.