imgui_impl_glfw.cpp
Go to the documentation of this file.
1 // dear imgui: Platform Binding for GLFW
2 // This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
3 // (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
4 // (Requires: GLFW 3.1+)
5 
6 // Implemented features:
7 // [X] Platform: Clipboard support.
8 // [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
9 // [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW.
10 // [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE).
11 
12 // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
13 // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
14 // https://github.com/ocornut/imgui
15 
16 // CHANGELOG
17 // (minor and older changes stripped away, please see git history for details)
18 // 2018-11-30: Misc: Setting up io.BackendPlatformName so it can be displayed in the About Window.
19 // 2018-11-07: Inputs: When installing our GLFW callbacks, we save user's previously installed ones - if any - and chain call them.
20 // 2018-08-01: Inputs: Workaround for Emscripten which doesn't seem to handle focus related calls.
21 // 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
22 // 2018-06-08: Misc: Extracted imgui_impl_glfw.cpp/.h away from the old combined GLFW+OpenGL/Vulkan examples.
23 // 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
24 // 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value, passed to glfwSetCursor()).
25 // 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
26 // 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
27 // 2018-01-25: Inputs: Added gamepad support if ImGuiConfigFlags_NavEnableGamepad is set.
28 // 2018-01-25: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set).
29 // 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
30 // 2018-01-18: Inputs: Added mapping for ImGuiKey_Insert.
31 // 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1).
32 // 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
33 
34 #include "imgui/imgui.h"
35 #include "imgui_impl_glfw.h"
36 
37 // GLFW
38 #define GLFW_INCLUDE_NONE
39 #include "glad/gl.h"
40 #include "GLFW/glfw3.h"
41 #ifdef _WIN32
42 #undef APIENTRY
43 #define GLFW_EXPOSE_NATIVE_WIN32
44 #include "GLFW/glfw3native.h" // for glfwGetWin32Window
45 #endif
46 #define GLFW_HAS_WINDOW_TOPMOST (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ GLFW_FLOATING
47 #define GLFW_HAS_WINDOW_HOVERED (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ GLFW_HOVERED
48 #define GLFW_HAS_WINDOW_ALPHA (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwSetWindowOpacity
49 #define GLFW_HAS_PER_MONITOR_DPI (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwGetMonitorContentScale
50 #define GLFW_HAS_VULKAN (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ glfwCreateWindowSurface
51 
52 // Data
54 {
58 };
59 static GLFWwindow* g_Window = NULL;
61 static double g_Time = 0.0;
62 static bool g_MouseJustPressed[5] = { false, false, false, false, false };
64 
65 // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any.
70 
71 static const char* ImGui_ImplGlfw_GetClipboardText(void* user_data)
72 {
73  return glfwGetClipboardString((GLFWwindow*)user_data);
74 }
75 
76 static void ImGui_ImplGlfw_SetClipboardText(void* user_data, const char* text)
77 {
78  glfwSetClipboardString((GLFWwindow*)user_data, text);
79 }
80 
81 void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods)
82 {
84  g_PrevUserCallbackMousebutton(window, button, action, mods);
85 
86  if (action == GLFW_PRESS && button >= 0 && button < IM_ARRAYSIZE(g_MouseJustPressed))
87  g_MouseJustPressed[button] = true;
88 }
89 
90 void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset)
91 {
92  if (g_PrevUserCallbackScroll != NULL)
93  g_PrevUserCallbackScroll(window, xoffset, yoffset);
94 
95  ImGuiIO& io = ImGui::GetIO();
96  io.MouseWheelH += (float)xoffset;
97  io.MouseWheel += (float)yoffset;
98 }
99 
100 void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods)
101 {
102  if (g_PrevUserCallbackKey != NULL)
103  g_PrevUserCallbackKey(window, key, scancode, action, mods);
104 
105  ImGuiIO& io = ImGui::GetIO();
106  if (action == GLFW_PRESS)
107  io.KeysDown[key] = true;
108  if (action == GLFW_RELEASE)
109  io.KeysDown[key] = false;
110 
111  // Modifiers are not reliable across systems
116 }
117 
118 void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c)
119 {
120  if (g_PrevUserCallbackChar != NULL)
121  g_PrevUserCallbackChar(window, c);
122 
123  ImGuiIO& io = ImGui::GetIO();
124  if (c > 0 && c < 0x10000)
125  io.AddInputCharacter((unsigned short)c);
126 }
127 
128 static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, GlfwClientApi client_api)
129 {
130  g_Window = window;
131  g_Time = 0.0;
132 
133  // Setup back-end capabilities flags
134  ImGuiIO& io = ImGui::GetIO();
135  io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
136  io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
137  io.BackendPlatformName = "imgui_impl_glfw";
138 
139  // Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array.
161 
165 #if defined(_WIN32)
167 #endif
168 
177 
178  // Chain GLFW callbacks: our callbacks will call the user's previously installed callbacks, if any.
181  g_PrevUserCallbackKey = NULL;
182  g_PrevUserCallbackChar = NULL;
183  if (install_callbacks)
184  {
189  }
190 
191  g_ClientApi = client_api;
192  return true;
193 }
194 
195 bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks)
196 {
197  return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_OpenGL);
198 }
199 
200 bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks)
201 {
202  return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_Vulkan);
203 }
204 
206 {
207  for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
208  {
210  g_MouseCursors[cursor_n] = NULL;
211  }
213 }
214 
216 {
217  // Update buttons
218  ImGuiIO& io = ImGui::GetIO();
219  for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++)
220  {
221  // If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
223  g_MouseJustPressed[i] = false;
224  }
225 
226  // Update mouse position
227  const ImVec2 mouse_pos_backup = io.MousePos;
228  io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
229 #ifdef __EMSCRIPTEN__
230  const bool focused = true; // Emscripten
231 #else
232  const bool focused = glfwGetWindowAttrib(g_Window, GLFW_FOCUSED) != 0;
233 #endif
234  if (focused)
235  {
236  if (io.WantSetMousePos)
237  {
238  glfwSetCursorPos(g_Window, (double)mouse_pos_backup.x, (double)mouse_pos_backup.y);
239  }
240  else
241  {
242  double mouse_x, mouse_y;
243  glfwGetCursorPos(g_Window, &mouse_x, &mouse_y);
244  io.MousePos = ImVec2((float)mouse_x, (float)mouse_y);
245  }
246  }
247 }
248 
250 {
251  ImGuiIO& io = ImGui::GetIO();
253  return;
254 
255  ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
256  if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
257  {
258  // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
260  }
261  else
262  {
263  // Show OS mouse cursor
264  // FIXME-PLATFORM: Unfocused windows seems to fail changing the mouse cursor with GLFW 3.2, but 3.3 works here.
267  }
268 }
269 
271 {
272  ImGuiIO& io = ImGui::GetIO();
273  IM_ASSERT(io.Fonts->IsBuilt() && "Font atlas not built! It is generally built by the renderer back-end. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame().");
274 
275  // Setup display size (every frame to accommodate for window resizing)
276  int w, h;
277  int display_w, display_h;
278  glfwGetWindowSize(g_Window, &w, &h);
279  glfwGetFramebufferSize(g_Window, &display_w, &display_h);
280  io.DisplaySize = ImVec2((float)w, (float)h);
281  io.DisplayFramebufferScale = ImVec2(w > 0 ? ((float)display_w / w) : 0, h > 0 ? ((float)display_h / h) : 0);
282 
283  // Setup time step
284  double current_time = glfwGetTime();
285  io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f/60.0f);
286  g_Time = current_time;
287 
290 
291  // Gamepad navigation mapping [BETA]
292  memset(io.NavInputs, 0, sizeof(io.NavInputs));
294  {
295  // Update gamepad inputs
296  #define MAP_BUTTON(NAV_NO, BUTTON_NO) { if (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS) io.NavInputs[NAV_NO] = 1.0f; }
297  #define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1) { float v = (axes_count > AXIS_NO) ? axes[AXIS_NO] : V0; v = (v - V0) / (V1 - V0); if (v > 1.0f) v = 1.0f; if (io.NavInputs[NAV_NO] < v) io.NavInputs[NAV_NO] = v; }
298  int axes_count = 0, buttons_count = 0;
299  const float* axes = glfwGetJoystickAxes(GLFW_JOYSTICK_1, &axes_count);
300  const unsigned char* buttons = glfwGetJoystickButtons(GLFW_JOYSTICK_1, &buttons_count);
301  MAP_BUTTON(ImGuiNavInput_Activate, 0); // Cross / A
302  MAP_BUTTON(ImGuiNavInput_Cancel, 1); // Circle / B
303  MAP_BUTTON(ImGuiNavInput_Menu, 2); // Square / X
304  MAP_BUTTON(ImGuiNavInput_Input, 3); // Triangle / Y
305  MAP_BUTTON(ImGuiNavInput_DpadLeft, 13); // D-Pad Left
306  MAP_BUTTON(ImGuiNavInput_DpadRight, 11); // D-Pad Right
307  MAP_BUTTON(ImGuiNavInput_DpadUp, 10); // D-Pad Up
308  MAP_BUTTON(ImGuiNavInput_DpadDown, 12); // D-Pad Down
309  MAP_BUTTON(ImGuiNavInput_FocusPrev, 4); // L1 / LB
310  MAP_BUTTON(ImGuiNavInput_FocusNext, 5); // R1 / RB
311  MAP_BUTTON(ImGuiNavInput_TweakSlow, 4); // L1 / LB
312  MAP_BUTTON(ImGuiNavInput_TweakFast, 5); // R1 / RB
313  MAP_ANALOG(ImGuiNavInput_LStickLeft, 0, -0.3f, -0.9f);
315  MAP_ANALOG(ImGuiNavInput_LStickUp, 1, +0.3f, +0.9f);
316  MAP_ANALOG(ImGuiNavInput_LStickDown, 1, -0.3f, -0.9f);
317  #undef MAP_BUTTON
318  #undef MAP_ANALOG
319  if (axes_count > 0 && buttons_count > 0)
321  else
323  }
324 }
float NavInputs[ImGuiNavInput_COUNT]
Definition: imgui.h:1350
GLFWAPI void glfwSetInputMode(GLFWwindow *window, int mode, int value)
Sets an input option for the specified window.
Definition: input.c:484
bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool install_callbacks)
const char *(* GetClipboardTextFn)(void *user_data)
Definition: imgui.h:1319
#define GLFW_KEY_RIGHT_CONTROL
Definition: glfw3.h:478
bool MouseDrawCursor
Definition: imgui.h:1299
#define GLFW_KEY_INSERT
Definition: glfw3.h:416
GLFWAPI void glfwGetWindowSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the client area of the specified window.
Definition: window.c:544
#define GLFW_KEY_LEFT
Definition: glfw3.h:419
GLFWAPI void glfwSetCursorPos(GLFWwindow *window, double xpos, double ypos)
Sets the position of the cursor, relative to the client area of the window.
Definition: input.c:660
GLFWAPI int glfwGetInputMode(GLFWwindow *window, int mode)
Returns the value of an input option for the specified window.
Definition: input.c:461
bool WantSetMousePos
Definition: imgui.h:1364
GLFWAPI int glfwGetWindowAttrib(GLFWwindow *window, int attrib)
Returns an attribute of the specified window.
Definition: window.c:804
static const char * ImGui_ImplGlfw_GetClipboardText(void *user_data)
The header of the GLFW 3 API.
ImVec2 MousePos
Definition: imgui.h:1341
IMGUI_API void AddInputCharacter(ImWchar c)
Definition: imgui.cpp:1191
void(* SetClipboardTextFn)(void *user_data, const char *text)
Definition: imgui.h:1320
static GLFWcursor * g_MouseCursors[ImGuiMouseCursor_COUNT]
static bool ImGui_ImplGlfw_Init(GLFWwindow *window, bool install_callbacks, GlfwClientApi client_api)
f
Definition: imgui.h:164
#define GLFW_KEY_UP
Definition: glfw3.h:421
float MouseWheelH
Definition: imgui.h:1344
bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow *window, bool install_callbacks)
ImVec2 DisplaySize
Definition: imgui.h:1277
GLFWAPI const unsigned char * glfwGetJoystickButtons(int jid, int *count)
Returns the state of all buttons of the specified joystick.
Definition: input.c:926
#define GLFW_KEY_X
Definition: glfw3.h:401
#define GLFW_CURSOR
Definition: glfw3.h:1001
#define GLFW_KEY_SPACE
Definition: glfw3.h:360
bool IsBuilt()
Definition: imgui.h:1997
void ImGui_ImplGlfw_Shutdown()
GLFWAPI GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow *window, GLFWmousebuttonfun cbfun)
Sets the mouse button callback.
Definition: input.c:821
static GLFWkeyfun g_PrevUserCallbackKey
#define GLFW_KEY_LEFT_SHIFT
Definition: glfw3.h:473
const char * BackendPlatformName
Definition: imgui.h:1311
void(* GLFWkeyfun)(GLFWwindow *, int, int, int, int)
The function signature for keyboard key callbacks.
Definition: glfw3.h:1418
void(* GLFWmousebuttonfun)(GLFWwindow *, int, int, int)
The function signature for mouse button callbacks.
Definition: glfw3.h:1344
#define GLFW_KEY_PAGE_DOWN
Definition: glfw3.h:423
void(* GLFWcharfun)(GLFWwindow *, unsigned int)
The function signature for Unicode character callbacks.
Definition: glfw3.h:1435
#define GLFW_KEY_HOME
Definition: glfw3.h:424
#define IM_ARRAYSIZE(_ARR)
Definition: imgui.h:73
#define GLFW_KEY_PAGE_UP
Definition: glfw3.h:422
IMGUI_API ImGuiMouseCursor GetMouseCursor()
Definition: imgui.cpp:4115
#define GLFW_ARROW_CURSOR
The regular arrow cursor shape.
Definition: glfw3.h:1030
GLFWAPI int glfwGetMouseButton(GLFWwindow *window, int button)
Returns the last reported state of a mouse button for the specified window.
Definition: input.c:614
#define GLFW_KEY_Z
Definition: glfw3.h:403
static void ImGui_ImplGlfw_UpdateMousePosAndButtons()
#define GLFW_KEY_BACKSPACE
Definition: glfw3.h:415
struct GLFWwindow GLFWwindow
Opaque window object.
Definition: glfw3.h:1137
int KeyMap[ImGuiKey_COUNT]
Definition: imgui.h:1285
#define GLFW_KEY_A
Definition: glfw3.h:378
float DeltaTime
Definition: imgui.h:1278
#define GLFW_KEY_V
Definition: glfw3.h:399
#define GLFW_RELEASE
The key or mouse button was released.
Definition: glfw3.h:297
static GLFWmousebuttonfun g_PrevUserCallbackMousebutton
#define GLFW_CURSOR_DISABLED
Definition: glfw3.h:1008
GLFWAPI const char * glfwGetClipboardString(GLFWwindow *window)
Returns the contents of the clipboard as a string.
Definition: input.c:1269
void ImGui_ImplGlfw_KeyCallback(GLFWwindow *window, int key, int scancode, int action, int mods)
void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow *window, int button, int action, int mods)
#define GLFW_VRESIZE_CURSOR
The vertical resize arrow shape.
Definition: glfw3.h:1055
#define IM_ASSERT(_EXPR)
Definition: imgui.h:64
#define GLFW_KEY_RIGHT_SUPER
Definition: glfw3.h:480
static GLFWscrollfun g_PrevUserCallbackScroll
void ImGui_ImplGlfw_NewFrame()
#define GLFW_CURSOR_NORMAL
Definition: glfw3.h:1006
#define GLFW_KEY_END
Definition: glfw3.h:425
static void ImGui_ImplGlfw_SetClipboardText(void *user_data, const char *text)
#define GLFW_HAND_CURSOR
The hand shape.
Definition: glfw3.h:1045
#define GLFW_KEY_DELETE
Definition: glfw3.h:417
#define GLFW_KEY_ESCAPE
Definition: glfw3.h:412
void * ClipboardUserData
Definition: imgui.h:1321
#define GLFW_JOYSTICK_1
Definition: glfw3.h:558
IMGUI_API ImGuiIO & GetIO()
Definition: imgui.cpp:2975
static void ImGui_ImplGlfw_UpdateMouseCursor()
void ImGui_ImplGlfw_ScrollCallback(GLFWwindow *window, double xoffset, double yoffset)
#define GLFW_KEY_TAB
Definition: glfw3.h:414
static bool g_MouseJustPressed[5]
static GlfwClientApi g_ClientApi
static GLFWcharfun g_PrevUserCallbackChar
static GLFWwindow * g_Window
bool KeysDown[512]
Definition: imgui.h:1349
GLFWAPI GLFWcharfun glfwSetCharCallback(GLFWwindow *window, GLFWcharfun cbfun)
Sets the Unicode character callback.
Definition: input.c:801
void ImGui_ImplGlfw_CharCallback(GLFWwindow *window, unsigned int c)
bool KeyShift
Definition: imgui.h:1346
#define MAP_BUTTON(NAV_NO, BUTTON_NO)
#define GLFW_KEY_ENTER
Definition: glfw3.h:413
bool MouseDown[5]
Definition: imgui.h:1342
int ImGuiMouseCursor
Definition: imgui.h:126
bool KeyCtrl
Definition: imgui.h:1345
#define GLFW_FOCUSED
Input focus window hint and attribute.
Definition: glfw3.h:763
GLFWAPI void glfwSetClipboardString(GLFWwindow *window, const char *string)
Sets the clipboard to the specified string.
Definition: input.c:1261
float y
Definition: imgui.h:166
GLFWAPI void glfwSetCursor(GLFWwindow *window, GLFWcursor *cursor)
Sets the cursor for the window.
Definition: input.c:778
The header of the native access functions.
GLFWAPI void glfwGetCursorPos(GLFWwindow *window, double *xpos, double *ypos)
Retrieves the position of the cursor relative to the client area of the window.
Definition: input.c:637
#define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1)
ImGuiBackendFlags BackendFlags
Definition: imgui.h:1276
#define GLFW_KEY_DOWN
Definition: glfw3.h:420
bool KeySuper
Definition: imgui.h:1348
GLFWAPI double glfwGetTime(void)
Returns the value of the GLFW timer.
Definition: input.c:1275
#define GLFW_CURSOR_HIDDEN
Definition: glfw3.h:1007
GLFWAPI void glfwDestroyCursor(GLFWcursor *cursor)
Destroys a cursor.
Definition: input.c:743
#define GLFW_HRESIZE_CURSOR
The horizontal resize arrow shape.
Definition: glfw3.h:1050
#define GLFW_KEY_RIGHT_ALT
Definition: glfw3.h:479
GLFWAPI GLFWscrollfun glfwSetScrollCallback(GLFWwindow *window, GLFWscrollfun cbfun)
Sets the scroll callback.
Definition: input.c:854
#define GLFW_IBEAM_CURSOR
The text input I-beam cursor shape.
Definition: glfw3.h:1035
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
Definition: window.c:647
ImGuiConfigFlags ConfigFlags
Definition: imgui.h:1275
struct GLFWcursor GLFWcursor
Opaque cursor object.
Definition: glfw3.h:1149
#define GLFW_KEY_LEFT_CONTROL
Definition: glfw3.h:474
void * ImeWindowHandle
Definition: imgui.h:1326
GLFWAPI GLFWkeyfun glfwSetKeyCallback(GLFWwindow *window, GLFWkeyfun cbfun)
Sets the key callback.
Definition: input.c:791
ImVec2 DisplayFramebufferScale
Definition: imgui.h:1294
float MouseWheel
Definition: imgui.h:1343
bool KeyAlt
Definition: imgui.h:1347
#define GLFW_KEY_LEFT_ALT
Definition: glfw3.h:475
void(* GLFWscrollfun)(GLFWwindow *, double, double)
The function signature for scroll callbacks.
Definition: glfw3.h:1397
GLFWAPI GLFWcursor * glfwCreateStandardCursor(int shape)
Creates a cursor with a standard shape.
Definition: input.c:713
static double g_Time
GlfwClientApi
#define GLFW_KEY_RIGHT_SHIFT
Definition: glfw3.h:477
#define GLFW_KEY_RIGHT
Definition: glfw3.h:418
#define GLFW_KEY_Y
Definition: glfw3.h:402
#define GLFW_PRESS
The key or mouse button was pressed.
Definition: glfw3.h:304
GLFWAPI const float * glfwGetJoystickAxes(int jid, int *count)
Returns the values of all axes of the specified joystick.
Definition: input.c:897
ImFontAtlas * Fonts
Definition: imgui.h:1290
#define GLFW_KEY_LEFT_SUPER
Definition: glfw3.h:476
float x
Definition: imgui.h:166
#define GLFW_KEY_C
Definition: glfw3.h:380
GLFWAPI HWND glfwGetWin32Window(GLFWwindow *handle)


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:21