Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add glfw wgpu desktop and multiviewport support #7132

Closed
wants to merge 100 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
6fda112
Create WGPU structure for multiviewports
Zelif Dec 12, 2023
e7b5f87
Adding Multiviewport to WGPU
Zelif Dec 12, 2023
e5cf10b
Update imgui_impl_wgpu.cpp
Zelif Dec 15, 2023
62cfa98
Update imgui_impl_wgpu.cpp
Zelif Dec 15, 2023
fff4391
Add Cmake files
Zelif Dec 15, 2023
ad666db
Update example_emscripten_wgpu demo
Zelif Dec 15, 2023
b271eff
Update CMakeLists.txt
Zelif Dec 15, 2023
82d92aa
Fix memory leak when rendering window
Zelif Dec 28, 2023
e92aa28
Fix memory leak in render function
Zelif Dec 28, 2023
c770f20
Merge branch 'docking' into Add-glfw-wgpu-example
Zelif Dec 28, 2023
3de52f8
Update index.html
Zelif Dec 28, 2023
44c7dfc
Menus, Popup: Amend c3f8f4d for static analyzer warning ("condition a…
ocornut Feb 27, 2024
0573513
Windows: Scrollbar visibility decision uses current size when both si…
ocornut Feb 28, 2024
c623669
Added link to crawlable wiki
ocornut Feb 28, 2024
04f4001
Docs: added a mini wiki index in main source files.
ocornut Feb 29, 2024
1ff90c5
ImDrawList: add PathFillConcave(), AddConcavePolyFilled() (#760)
thedmd Jan 3, 2024
fbf45ad
ImDrawList: add PathFillConcave(), AddConcavePolyFilled(): amends (#760)
ocornut Jan 9, 2024
6b7358e
InputText: adding clarifying note about ImGuiInputTextCallbackData::B…
ocornut Mar 4, 2024
65dc67f
Windows: Double-click to collapse may be disabled via key-ownership m…
ocornut Mar 5, 2024
fd75685
Merge branch 'master' into docking
ocornut Mar 5, 2024
fc570ac
Examples: WGPU: fixed initialization of WGPURenderPassColorAttachment…
kevle Mar 6, 2024
286cd5b
Internals, InputText: removed ImGuiInputSource_Clipboard. (#4005)
ocornut Mar 7, 2024
3c435c0
Inputs: (Breaking) More formally obsoleted GetKeyIndex() when IMGUI_D…
ocornut Mar 8, 2024
da29b77
Backends: SDL3: Fix leak of SDL_GetGamepads() return value (#7381)
edmonds Mar 11, 2024
9d9ca37
Docking: Fix C++26 zealous warnings (#7383, #7089)
ocornut Mar 11, 2024
adcc321
Revert "Docking: Fix C++26 zealous warnings (#7383, #7089)" + Disable…
ocornut Mar 11, 2024
40df3db
Tweaking terminology
ocornut Mar 17, 2024
0a1f5b9
Demo: Two minor fixes (unchecked BeginTooltip + incorrect height cons…
cfillion Mar 18, 2024
868facf
ImDrawList: (Breaking) merge float radius_x/radius_y parameters into …
cfillion Mar 18, 2024
085781f
Merge branch 'master' into docking
ocornut Mar 19, 2024
8be48a4
Backends: WebGPU: Avoid using -1u literal (#7436)
eliemichel Mar 25, 2024
38ddfb2
Tables: Angled headers: fixed border hit box extending beyond non-scr…
cfillion Mar 18, 2024
29ff159
Tables: Angled headers: fixed borders not moving back up after TableA…
cfillion Mar 18, 2024
f080228
Tables: Angled headers: fixed table contents overflowing when a list …
cfillion Mar 18, 2024
cf4c10b
Style: added ImGuiStyleVar_TabBorderSize, ImGuiStyleVar_TableAngledHe…
cfillion Mar 17, 2024
5c5ae80
Comments
ocornut Mar 26, 2024
37b37fc
DrawList: Allow AddText() to accept null ranges. (#3615, 7391)
ocornut Mar 27, 2024
976dc23
Windows: extend outer resize borders to the edges when there are no c…
cfillion Mar 25, 2024
515b437
Child windows: look at the parent window's flags to decide whether to…
cfillion Mar 25, 2024
742e534
Child Windows: adjust resizing limits to match window padding rather …
ocornut Mar 27, 2024
9638c28
Internals: adding ImGuiNavMoveFlags_NoClearActiveId even though there…
ocornut Mar 27, 2024
25a492f
ProgressBar: Fixed passing fraction==NaN from leading to a crash. (#7…
ocornut Mar 29, 2024
d3c3514
Tables: Fixed auto-width columns when using synced-instances of same …
ocornut Mar 29, 2024
9a2b598
ListBox: Fixed text-baseline offset when using SameLine()+Text() afte…
ocornut Apr 3, 2024
0bf134a
Refactor moving ID stack functions to their own section.
ocornut Apr 3, 2024
f959c41
Refactor moving ID stack functions to their own section (part 2)
ocornut Apr 3, 2024
e7712ff
Out of courtesy/consistency move all the DebugHookIdInfo compares int…
ocornut Apr 3, 2024
4f9ba19
Drags, Sliders, Inputs: Reactivated decimal point replacement for Sli…
GamingMinds-DanielC Mar 11, 2024
231cbee
Version 1.90.5
ocornut Apr 11, 2024
1db579d
Merge branch 'master' into docking
ocornut Apr 11, 2024
f790d51
Silent zealous/stupid warning introduced by Clang 16 (shipping with V…
ocornut Apr 12, 2024
76bc1b8
Extracted part of NewFrame() into SetupDrawListSharedData() for docum…
ocornut Apr 15, 2024
3caa79c
Version 1.90.6 WIP
ocornut Apr 15, 2024
c1743ee
Docking: when io.ConfigDockingWithShift is enabled, fixed help toolti…
ocornut Apr 15, 2024
dad1689
Examples: SDL3: amend for removal of SDL_RENDERER_ACCELERATED.
ocornut Apr 15, 2024
fab96a6
Backends: SDL3: Re-enable calling SDL_StartTextInput()/SDL_StopTextIn…
Green-Sky Mar 28, 2024
daecfff
Text, DrawList: Improved handling of long single-line wrapped text. (…
ocornut Apr 15, 2024
b475309
Fonts: Fixed font ascent and descent calculation when a font hits exa…
GamingMinds-DanielC Mar 14, 2024
f9df6bf
Examples: GLFW+WebGPU: added support for WebGPU-native/Dawn (#7435, #…
eliasdaler Mar 24, 2024
80a5fdb
Examples: GLFW+WebGPU: Fixed condition for when to recreate swapchain…
JulesFouchy Apr 5, 2024
648278c
Examples: GLFW+WebGPU: Amends. (#7435, #7132)
ocornut Apr 16, 2024
7b8107e
Examples: GLFW+WebGPU: Rename example_emscripten_wgpu/ to example_glf…
ocornut Apr 16, 2024
4cb0fe3
Merge branch 'master' into docking
ocornut Apr 16, 2024
9ec299e
Backends: OpenGL: Detect ES3 contexts on desktop based on version str…
ocornut Apr 16, 2024
eba46cb
Drag and Drop: assert when nesting BeginDragDropSource() and BeginDr…
ocornut Apr 17, 2024
361432a
TreeNode: fixed layout so that TreeNode("") or TreeNode("##HiddenLabe…
ocornut Apr 18, 2024
fa0120e
Windows: Fixed subsequent Begin() append calls from setting last item…
ocornut Apr 18, 2024
b555984
Merge branch 'master' into docking
ocornut Apr 18, 2024
07e8ff9
Backends: Win32: Fixed a warning + moved header cruft below Changelog.
ocornut Apr 18, 2024
b720c0f
Backends: Vulkan: Added convenience support for Volk via IMGUI_IMPL_V…
ocornut Apr 19, 2024
da18fcb
Internals: ensure ButtonBehavior() is called with non 0 id.
ocornut Apr 23, 2024
baaaaea
Demo: tweak TreeNode demo.
ocornut Apr 24, 2024
b8a44b1
TreeNode: added ImGuiTreeNodeFlags_SpanTextWidth. (#6937)
dimateos Oct 17, 2023
c895e98
ProgressBar: added indeterminate mode by passing an animated negative…
gan74 Apr 24, 2024
913151c
Demo: move progress bars to their own section.
ocornut Apr 24, 2024
a60387a
Backends: GLFW: Add define guards for glfw native defines. (#7536)
fknfilewalker Apr 29, 2024
6ef4f67
ImDrawList: moved cold fields lower in the structure so hot fields ar…
ocornut Apr 30, 2024
50b2ff0
ImGuiIO: moved IMGUI_DISABLE_OBSOLETE_KEYIO block lower in the struct…
ocornut Apr 30, 2024
5717f0a
Merge branch 'master' into docking
ocornut Apr 30, 2024
558c57a
Fixed static analyzer warning "Pointer to local array 'overlay_buf' i…
ocornut Apr 30, 2024
9d6818d
Docking: comments, clairfy why we store style override on dragged win…
ocornut Apr 30, 2024
49e70e6
Backends: Vulkan: Stripped misleading leftover of ImGui_ImplVulkanH_W…
ocornut Apr 30, 2024
ebb8d78
Backends: Vulkan: Create a custom pipeline for secondary viewports. (…
skaman Apr 12, 2023
b30df88
Table: Angled Headers: internal refactor to facilitate changing angle…
ocornut Apr 30, 2024
4bb7567
Tables: Angled headers: fixed multi-line label display when angle is …
ocornut May 2, 2024
fc4d818
Tables: Angled headers: added TableAngledHeadersTextAlign, ImGuiStyle…
thedmd Apr 30, 2024
6ebbecc
Realign assignments.
ocornut May 3, 2024
0c9c12c
InnerClipRect use ImFloor() matching docking branch (fix c41868531 fo…
ocornut May 3, 2024
0b30947
Windows: Changed default ClipRect to extend to windows' left and righ…
ocornut May 3, 2024
2f2d507
Merge branch 'master' into docking
ocornut May 3, 2024
f5d1852
Viewports: fixed outer-right edge of MenuBar clipping rectangle off b…
cfillion May 3, 2024
9a7f1b1
Added MultiViewport WebGPU
Zelif May 4, 2024
8d08e0b
Updated wgpu example for multiviewport
Zelif May 4, 2024
ecdae77
Add Cmake files
Zelif Dec 15, 2023
6cd66dd
Update example_emscripten_wgpu demo
Zelif Dec 15, 2023
ec89c07
Update CMakeLists.txt
Zelif Dec 15, 2023
a3abb1f
Fix memory leak in render function
Zelif Dec 28, 2023
80d21d0
Update index.html
Zelif Dec 28, 2023
69730ea
Removed old Files
Zelif May 4, 2024
8ff415b
Merge branch 'Add-glfw-wgpu-example' of https://github.com/Zelif/imgu…
Zelif May 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Windows: Changed default ClipRect to extend to windows' left and righ…
…t borders. (#3312, #7540, #3756, #6170, #6365)
  • Loading branch information
ocornut committed May 3, 2024
commit 0b309471f2ed0117bbffda43684f54404cf14ea2
6 changes: 6 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ Breaking changes:

Other changes:

- Windows: Changed default ClipRect to extend to windows' left and right borders,
instead of adding arbitrary WindowPadding.x * 0.5f space on left and right.
That ClipRect half-padding was arbitrary/confusing and inconsistent with Y axis.
It also made it harder to draw items covering whole window without pushing an
extended ClipRect. Some items near windows left and right edge that used to be clipped
may be partly more visible. (#3312, #7540, #3756, #6170, #6365)
- Windows: Fixed subsequent Begin() append calls from setting last item information
for title bar, making it impossible to use IsItemHovered() on a Begin()-to-append,
and causing issue bypassing hover detection on collapsed windows. (#7506, #823)
Expand Down
12 changes: 7 additions & 5 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6838,16 +6838,18 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
window->InnerRect.Max.y = window->Pos.y + window->Size.y - window->DecoOuterSizeY2;

// Inner clipping rectangle.
// Will extend a little bit outside the normal work region.
// This is to allow e.g. Selectable or CollapsingHeader or some separators to cover that space.
// Force round operator last to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result.
// - Extend a outside of normal work region up to borders.
// - This is to allow e.g. Selectable or CollapsingHeader or some separators to cover that space.
// - It also makes clipped items be more noticeable.
// - And is consistent on both axis (prior to 2024/05/03 ClipRect used WindowPadding.x * 0.5f on left and right edge), see #3312
// - Force round operator last to ensure that e.g. (int)(max.x-min.x) in user's render code produce correct result.
// Note that if our window is collapsed we will end up with an inverted (~null) clipping rectangle which is the correct behavior.
// Affected by window/frame border size. Used by:
// - Begin() initial clip rect
float top_border_size = (((flags & ImGuiWindowFlags_MenuBar) || !(flags & ImGuiWindowFlags_NoTitleBar)) ? style.FrameBorderSize : window->WindowBorderSize);
window->InnerClipRect.Min.x = ImFloor(0.5f + window->InnerRect.Min.x + ImMax(ImTrunc(window->WindowPadding.x * 0.5f), window->WindowBorderSize));
window->InnerClipRect.Min.x = ImFloor(0.5f + window->InnerRect.Min.x + window->WindowBorderSize);
window->InnerClipRect.Min.y = ImFloor(0.5f + window->InnerRect.Min.y + top_border_size);
window->InnerClipRect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - ImMax(ImTrunc(window->WindowPadding.x * 0.5f), window->WindowBorderSize));
window->InnerClipRect.Max.x = ImFloor(0.5f + window->InnerRect.Max.x - window->WindowBorderSize);
window->InnerClipRect.Max.y = ImFloor(0.5f + window->InnerRect.Max.y - window->WindowBorderSize);
window->InnerClipRect.ClipWithFull(host_rect);

Expand Down
2 changes: 1 addition & 1 deletion imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90.6 WIP"
#define IMGUI_VERSION_NUM 19053
#define IMGUI_VERSION_NUM 19054
#define IMGUI_HAS_TABLE

/*
Expand Down