// Include OpenGL header (without an OpenGL loader) requires a bit of fiddling
#if defined(_WIN32) && !defined(APIENTRY)
#define APIENTRY __stdcall // It is customary to use APIENTRY for OpenGL function pointer declarations on all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
// 2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
// 2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
@ -108,17 +109,20 @@
#include<TargetConditionals.h>
#endif
// Clang warnings with -Weverything
// Clang/GCC warnings with -Weverything
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wold-style-cast" // warning: use of old-style cast
// This "glIsProgram()" check is required because if the program is "pending deletion" at the time of binding backup, it will have been deleted by now and will cause an OpenGL error. See #6220.
constboolstart_windowing_with_keyboard=allow_windowing&&!g.NavWindowingTarget&&(keyboard_next_window||keyboard_prev_window);// Note: enabled even without NavEnableKeyboard!
// Register ownership of our mods. Using ImGuiInputFlags_RouteGlobalHigh in the Shortcut() calls instead would probably be correct but may have more side-effects.
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
#define IMGUI_VERSION "1.89.5 WIP"
#define IMGUI_VERSION_NUM 18943
#define IMGUI_VERSION_NUM 18946
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
@ -261,8 +261,8 @@ struct ImVec2
floatx,y;
constexprImVec2():x(0.0f),y(0.0f){}
constexprImVec2(float_x,float_y):x(_x),y(_y){}
floatoperator[](size_tidx)const{IM_ASSERT(idx==0||idx==1);return(&x)[idx];}// We very rarely use this [] operator, the assert overhead is fine.
float&operator[](size_tidx){IM_ASSERT(idx==0||idx==1);return(&x)[idx];}// We very rarely use this [] operator, the assert overhead is fine.
float&operator[](size_tidx){IM_ASSERT(idx==0||idx==1);return((float*)(char*)this)[idx];}// We very rarely use this [] operator, so the assert overhead is fine.
IM_VEC2_CLASS_EXTRA// Define additional constructors and implicit cast operators in imconfig.h to convert back and forth between your math types and ImVec2.
#endif
@ -2143,6 +2143,7 @@ struct ImGuiIO
boolMouseReleased[5];// Mouse button went from Down to !Down
boolMouseDownOwned[5];// Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.
boolMouseDownOwnedUnlessPopupClose[5];// Track if button was clicked inside a dear imgui window.
boolMouseWheelRequestAxisSwap;// On a non-Mac system, holding SHIFT requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
floatMouseDownDuration[5];// Duration the mouse button has been down (0.0f == just clicked)
floatMouseDownDurationPrev[5];// Previous time the mouse button has been down
ImVec2MouseDragMaxDistanceAbs[5];// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
inlinevoidItemSize(constImRect&bb,floattext_baseline_y=-1.0f){ItemSize(bb.GetSize(),text_baseline_y);}// FIXME: This is a misleading API since we expect CursorPos to be bb.Min.
IMGUI_APIvoidSetItemKeyOwner(ImGuiKeykey,ImGuiInputFlagsflags=0);// Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() || IsItemActive()) { SetKeyOwner(key, GetItemID());'.
IMGUI_APIboolTestKeyOwner(ImGuiKeykey,ImGuiIDowner_id);// Test that key is either not owned, either owned by 'owner_id'