mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-18 18:46:13 +01:00
Merge branch 'master' into docking
This commit is contained in:
commit
947aa9c972
@ -36,7 +36,7 @@ HOW TO UPDATE?
|
||||
- Please report any issue!
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.91.6 WIP (In Progress)
|
||||
VERSION 1.91.6 (Released 2024-12-11)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking changes:
|
||||
@ -48,11 +48,11 @@ Breaking changes:
|
||||
- We provide convenience legacy fields to pass a single descriptor,
|
||||
matching the old API, but upcoming features will want multiple.
|
||||
- Legacy ImGui_ImplDX12_Init() signature is still supported (will obsolete).
|
||||
- Misc: changed CRC32 table from CRC32-adler to CRC32c polynomial in order to
|
||||
- Misc: changed CRC32 table from CRC32-adler to CRC32c polynomial in order to
|
||||
be compatible with the result of SSE 4.2 instructions. (#8169, #4933) [@Teselka]
|
||||
- As a result, some .ini data may be partially lost when storing checksums
|
||||
(docking and tables information particularly).
|
||||
- Because some users have crafted and storing .ini data as a way to workaround
|
||||
(docking and tables information particularly).
|
||||
- Because some users have crafted and storing .ini data as a way to workaround
|
||||
limitations of the docking API, we are providing a '#define IMGUI_USE_LEGACY_CRC32_ADLER'
|
||||
compile-time option to keep using old CRC32 tables if you cannot afford invalidating
|
||||
old .ini data.
|
||||
@ -71,13 +71,13 @@ Other changes:
|
||||
- Misc: changed embedded ProggyClean encoding to save a bit of binary space (~12kb to 9.5kb).
|
||||
- Misc: added IMGUI_DISABLE_DEFAULT_FONT to strip embedded font from binary. (#8161)
|
||||
[@demonese]
|
||||
- Tools: binary_to_compressed_c: added -u8/-u32/-base85 export options.
|
||||
- Demo: example tree used by Property Editor & Selection demos properly freed
|
||||
on application closure. (#8158) [@Legulysse]
|
||||
- Fonts: fixed AddCustomRect() not being packed with TexGlyphPadding + not accounted
|
||||
for surface area used to determine best-guess texture size. (#8107) [@YarikTH, @ocornut]
|
||||
- Misc: use SSE 4.2 crc32 instructions when available. (#8169, #4933) [@Teselka]
|
||||
- Backends: DirectX12: Let user specifies the DepthStencilView format by setting
|
||||
- Tools: binary_to_compressed_c: added -u8/-u32/-base85 export options.
|
||||
- Backends: DirectX12: Let user specifies the DepthStencilView format by setting
|
||||
ImGui_ImplDX12_InitInfo::DSVFormat. (#8217) [@bmarques1995]
|
||||
- Backends: Vulkan: Make user-provided descriptor pool optional. As a convenience,
|
||||
when setting init_info->DescriptorPoolSize then the backend will create and manage
|
||||
|
@ -110,7 +110,7 @@ Reading the changelogs is a good way to keep up to date with the things Dear ImG
|
||||
Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing a variety of features and examples. The code is always available for reference in `imgui_demo.cpp`. [Here's how the demo looks](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v167/v167-misc.png).
|
||||
|
||||
You should be able to build the examples from sources. If you don't, let us know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
|
||||
- [imgui-demo-binaries-20240105.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20240105.zip) (Windows, 1.90.1 WIP, built 2024/01/05, master) or [older binaries](https://www.dearimgui.com/binaries).
|
||||
- [imgui-demo-binaries-20241211.zip](https://www.dearimgui.com/binaries/imgui-demo-binaries-20241211.zip) (Windows, 1.91.6, built 2024/11/11, master) or [older binaries](https://www.dearimgui.com/binaries).
|
||||
|
||||
The demo applications are not DPI aware so expect some blurriness on a 4K screen. For DPI awareness in your application, you can load/reload your font at a different scale and scale your style with `style.ScaleAllSizes()` (see [FAQ](https://www.dearimgui.com/faq)).
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
@ -4855,15 +4855,15 @@ void ImGui::DebugAllocHook(ImGuiDebugAllocInfo* info, int frame_count, void* ptr
|
||||
}
|
||||
if (size != (size_t)-1)
|
||||
{
|
||||
//printf("[%05d] MemAlloc(%d) -> 0x%p\n", frame_count, (int)size, ptr);
|
||||
entry->AllocCount++;
|
||||
info->TotalAllocCount++;
|
||||
//printf("[%05d] MemAlloc(%d) -> 0x%p\n", frame_count, size, ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
//printf("[%05d] MemFree(0x%p)\n", frame_count, ptr);
|
||||
entry->FreeCount++;
|
||||
info->TotalFreeCount++;
|
||||
//printf("[%05d] MemFree(0x%p)\n", frame_count, ptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
16
imgui.h
16
imgui.h
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@ -28,8 +28,8 @@
|
||||
|
||||
// Library Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
|
||||
#define IMGUI_VERSION "1.91.6 WIP"
|
||||
#define IMGUI_VERSION_NUM 19154
|
||||
#define IMGUI_VERSION "1.91.6"
|
||||
#define IMGUI_VERSION_NUM 19160
|
||||
#define IMGUI_HAS_TABLE
|
||||
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
|
||||
#define IMGUI_HAS_DOCK // Docking WIP branch
|
||||
@ -3544,24 +3544,24 @@ struct ImFontAtlas
|
||||
// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32().
|
||||
struct ImFont
|
||||
{
|
||||
// Members: Hot ~20/24 bytes (for CalcTextSize)
|
||||
// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
|
||||
ImVector<float> IndexAdvanceX; // 12-16 // out // // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize functions which only this info, and are often bottleneck in large UI).
|
||||
float FallbackAdvanceX; // 4 // out // = FallbackGlyph->AdvanceX
|
||||
float FontSize; // 4 // in // // Height of characters/line, set during loading (don't change after loading)
|
||||
|
||||
// Members: Hot ~28/40 bytes (for CalcTextSize + render loop)
|
||||
// [Internal] Members: Hot ~28/40 bytes (for RenderText loop)
|
||||
ImVector<ImWchar> IndexLookup; // 12-16 // out // // Sparse. Index glyphs by Unicode code-point.
|
||||
ImVector<ImFontGlyph> Glyphs; // 12-16 // out // // All glyphs.
|
||||
const ImFontGlyph* FallbackGlyph; // 4-8 // out // = FindGlyph(FontFallbackChar)
|
||||
|
||||
// Members: Cold ~32/40 bytes
|
||||
// [Internal] Members: Cold ~32/40 bytes
|
||||
// Conceptually ConfigData[] is the list of font sources merged to create this font.
|
||||
ImFontAtlas* ContainerAtlas; // 4-8 // out // // What we has been loaded into
|
||||
const ImFontConfig* ConfigData; // 4-8 // in // // Pointer within ContainerAtlas->ConfigData to ConfigDataCount instances
|
||||
short ConfigDataCount; // 2 // in // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
|
||||
ImWchar FallbackChar; // 2 // out // = FFFD/'?' // Character used if a glyph isn't found.
|
||||
ImWchar EllipsisChar; // 2 // out // = '...'/'.'// Character used for ellipsis rendering.
|
||||
short EllipsisCharCount; // 1 // out // 1 or 3
|
||||
ImWchar EllipsisChar; // 2-4 // out // = '...'/'.'// Character used for ellipsis rendering.
|
||||
ImWchar FallbackChar; // 2-4 // out // = FFFD/'?' // Character used if a glyph isn't found.
|
||||
float EllipsisWidth; // 4 // out // Width
|
||||
float EllipsisCharStep; // 4 // out // Step between characters when EllipsisCount > 0
|
||||
bool DirtyLookupTables; // 1 // out //
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
@ -10695,6 +10695,8 @@ void ImGui::ShowAboutWindow(bool*) {}
|
||||
void ImGui::ShowDemoWindow(bool*) {}
|
||||
void ImGui::ShowUserGuide() {}
|
||||
void ImGui::ShowStyleEditor(ImGuiStyle*) {}
|
||||
bool ImGui::ShowStyleSelector(const char* label) { return false; }
|
||||
void ImGui::ShowFontSelector(const char* label) {}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
@ -402,7 +402,7 @@ void ImDrawListSharedData::SetCircleTessellationMaxError(float max_error)
|
||||
|
||||
ImDrawList::ImDrawList(ImDrawListSharedData* shared_data)
|
||||
{
|
||||
memset(this, 0, sizeof(*this));
|
||||
memset(this, 0, sizeof(*this));
|
||||
_Data = shared_data;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
||||
@ -789,11 +789,9 @@ struct IMGUI_API ImDrawListSharedData
|
||||
float CircleSegmentMaxError; // Number of circle segments to use per pixel of radius for AddCircle() etc
|
||||
ImVec4 ClipRectFullscreen; // Value for PushClipRectFullscreen()
|
||||
ImDrawListFlags InitialFlags; // Initial flags at the beginning of the frame (it is possible to alter flags on a per-drawlist basis afterwards)
|
||||
ImVector<ImVec2> TempBuffer; // Temporary write buffer
|
||||
|
||||
// [Internal] Temp write buffer
|
||||
ImVector<ImVec2> TempBuffer;
|
||||
|
||||
// [Internal] Lookup tables
|
||||
// Lookup tables
|
||||
ImVec2 ArcFastVtx[IM_DRAWLIST_ARCFAST_TABLE_SIZE]; // Sample points on the quarter of the circle.
|
||||
float ArcFastRadiusCutoff; // Cutoff radius after which arc drawing will fallback to slower PathArcTo()
|
||||
ImU8 CircleSegmentCounts[64]; // Precomputed segment count for given radius before we calculate it dynamically (to avoid calculation overhead)
|
||||
@ -3694,7 +3692,7 @@ namespace ImGui
|
||||
IMGUI_API void TextEx(const char* text, const char* text_end = NULL, ImGuiTextFlags flags = 0);
|
||||
IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API bool ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size_arg, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API bool ImageButtonEx(ImGuiID id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags = 0);
|
||||
IMGUI_API void SeparatorEx(ImGuiSeparatorFlags flags, float thickness = 1.0f);
|
||||
IMGUI_API void SeparatorTextEx(ImGuiID id, const char* label, const char* label_end, float extra_width);
|
||||
IMGUI_API bool CheckboxFlags(const char* label, ImS64* flags, ImS64 flags_value);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.91.6 WIP
|
||||
// dear imgui, v1.91.6
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
@ -1079,7 +1079,7 @@ void ImGui::Image(ImTextureID user_texture_id, const ImVec2& image_size, const I
|
||||
window->DrawList->AddImage(user_texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col));
|
||||
}
|
||||
|
||||
bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags)
|
||||
bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col, ImGuiButtonFlags flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
@ -1101,7 +1101,7 @@ bool ImGui::ImageButtonEx(ImGuiID id, ImTextureID texture_id, const ImVec2& imag
|
||||
RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, g.Style.FrameRounding));
|
||||
if (bg_col.w > 0.0f)
|
||||
window->DrawList->AddRectFilled(bb.Min + padding, bb.Max - padding, GetColorU32(bg_col));
|
||||
window->DrawList->AddImage(texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col));
|
||||
window->DrawList->AddImage(user_texture_id, bb.Min + padding, bb.Max - padding, uv0, uv1, GetColorU32(tint_col));
|
||||
|
||||
return pressed;
|
||||
}
|
||||
@ -1120,7 +1120,7 @@ bool ImGui::ImageButton(const char* str_id, ImTextureID user_texture_id, const I
|
||||
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
// Legacy API obsoleted in 1.89. Two differences with new ImageButton()
|
||||
// - old ImageButton() used ImTextureId as item id (created issue with multiple buttons with same image, transient texture id values, opaque computation of ID)
|
||||
// - old ImageButton() used ImTextureID as item id (created issue with multiple buttons with same image, transient texture id values, opaque computation of ID)
|
||||
// - new ImageButton() requires an explicit 'const char* str_id'
|
||||
// - old ImageButton() had frame_padding' override argument.
|
||||
// - new ImageButton() always use style.FramePadding.
|
||||
|
Loading…
Reference in New Issue
Block a user