mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-23 10:19:46 +00:00
Version 1.81
This commit is contained in:
parent
647a308ad3
commit
4df57136e9
@ -32,7 +32,7 @@ HOW TO UPDATE?
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.81 WIP (In Progress)
|
||||
VERSION 1.81 (Released 2021-02-10)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking Changes:
|
||||
@ -90,15 +90,15 @@ Other Changes:
|
||||
Note that the rounding of either positions and widths are technically undesirable (e.g. #3437, #791) but
|
||||
variety of code is currently on it so we are first fixing current behavior before we'll eventually change it.
|
||||
- Log/Capture: Fix various new line/spacing issue when logging widgets. [@Xipiryon, @ocornut]
|
||||
- Log/Capture: Improved the ascii look of various widgets, making large dumps more easily human readable.
|
||||
- Log/Capture: Improved the ASCII look of various widgets, making large dumps more easily human readable.
|
||||
- ImDrawList: Fixed AddCircle()/AddCircleFilled() with (rad > 0.0f && rad < 1.0f && num_segments == 0). (#3738)
|
||||
Would lead to a buffer read overflow.
|
||||
- ImDrawList: Clarified PathArcTo() need for a_min <= a_max with an assert.
|
||||
- ImDrawList: Fixed PathArcToFast() handling of a_min > a_max.
|
||||
- Metrics: Backported "Viewports" debug visualizer from 'docking' branch.
|
||||
- Metrics: Back-ported "Viewports" debug visualizer from 'docking' branch.
|
||||
- Demo: Added 'Examples->Fullscreen Window' demo using GetMainViewport() values. (#3789)
|
||||
- Demo: 'Simple Overlay' demo now moves under main menu-bar (if any) using GetMainViewport()'s work area.
|
||||
- Backends: Win32: Dynamically loading XInput DLL instead of linking with it, facilite compiling with
|
||||
- Backends: Win32: Dynamically loading XInput DLL instead of linking with it, facilitate compiling with
|
||||
old WindowSDK versions or running on Windows 7. (#3646, #3645, #3248, #2716) [@Demonese]
|
||||
- Backends: Vulkan: Add support for custom Vulkan function loader and VK_NO_PROTOTYPES. (#3759, #3227) [@Hossein-Noroozpour]
|
||||
User needs to call ImGui_ImplVulkan_LoadFunctions() with their custom loader prior to other functions.
|
||||
@ -107,7 +107,7 @@ Other Changes:
|
||||
- Backends: WebGPU: Added enderer backend for WebGPU support (imgui_impl_wgpu.cpp) (#3632) [@bfierz]
|
||||
Please note that WebGPU is currently experimental, will not run on non-beta browsers, and may break.
|
||||
- Examples: WebGPU: Added Emscripten+WebGPU example. (#3632) [@bfierz]
|
||||
- Backends: GLFW: Added ImGui_ImplGlfw_InitForOther() init point to use with non OpenGL API. (#3632)
|
||||
- Backends: GLFW: Added ImGui_ImplGlfw_InitForOther() initialization call to use with non OpenGL API. (#3632)
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -70,11 +70,13 @@ If you get an assert stating "Could not load font file!", your font filename is
|
||||
|
||||
**Load multiple fonts:**
|
||||
```cpp
|
||||
// Init
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImFont* font1 = io.Fonts->AddFontFromFileTTF("font.ttf", size_pixels);
|
||||
ImFont* font2 = io.Fonts->AddFontFromFileTTF("anotherfont.otf", size_pixels);
|
||||
|
||||
// Select font at runtime
|
||||
```
|
||||
```cpp
|
||||
// In application loop: select font at runtime
|
||||
ImGui::Text("Hello"); // use the default font (which is the first loaded font)
|
||||
ImGui::PushFont(font2);
|
||||
ImGui::Text("Hello with another font");
|
||||
@ -145,20 +147,18 @@ ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
|
||||
**Font Atlas too large?**
|
||||
|
||||
- If you have very large number of glyphs or multiple fonts, the texture may become too big for your graphics API. The typical result of failing to upload a texture is if every glyphs appears as white rectangles.
|
||||
- In particular, using a large range such as `GetGlyphRangesChineseSimplifiedCommon()` is not recommended unless you set `OversampleH`/`OversampleV` to 1 and use a small font size.
|
||||
- Mind the fact that some graphics drivers have texture size limitation.
|
||||
- If you are building a PC application, mind the fact that your users may use hardware with lower limitations than yours.
|
||||
- Mind the fact that some graphics drivers have texture size limitation. If you are building a PC application, mind the fact that your users may use hardware with lower limitations than yours.
|
||||
|
||||
Some solutions:
|
||||
|
||||
1. Reduce glyphs ranges by calculating them from source localization data.
|
||||
You can use the `ImFontGlyphRangesBuilder` for this purpose, this will be the biggest win!
|
||||
You can use the `ImFontGlyphRangesBuilder` for this purpose and rebuilding your atlas between frames when new characters are needed. This will be the biggest win!
|
||||
2. You may reduce oversampling, e.g. `font_config.OversampleH = 2`, this will largely reduce your texture size.
|
||||
Note that while OversampleH = 2 looks visibly very close to 3 in most situations, with OversampleH = 1 the quality drop will be noticeable.
|
||||
3. Set `io.Fonts.TexDesiredWidth` to specify a texture width to minimize texture height (see comment in `ImFontAtlas::Build()` function).
|
||||
4. Set `io.Fonts.Flags |= ImFontAtlasFlags_NoPowerOfTwoHeight;` to disable rounding the texture height to the next power of two.
|
||||
5. Read about oversampling [here](https://github.com/nothings/stb/blob/master/tests/oversample).
|
||||
6. To support the extended range of unicode beyond 0xFFFF (e.g. emoticons, dingbats, symbols, shapes, ancient languages, etc...) add `#define IMGUI_USE_WCHAR32`in your `imconfig.h`
|
||||
6. To support the extended range of unicode beyond 0xFFFF (e.g. emoticons, dingbats, symbols, shapes, ancient languages, etc...) add `#define IMGUI_USE_WCHAR32`in your `imconfig.h`.
|
||||
|
||||
##### [Return to Index](#index)
|
||||
|
||||
|
@ -20,7 +20,7 @@ Dear ImGui is designed to **enable fast iterations** and to **empower programmer
|
||||
|
||||
Dear ImGui is particularly suited to integration in games engine (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on consoles platforms where operating system features are non-standard.
|
||||
|
||||
| [Usage](#usage) - [How it works](#how-it-works) - [Releases](#releases) - [Demo](#demo) - [Integration](#integration) |
|
||||
| [Usage](#usage) - [How it works](#how-it-works) - [Releases & Changelogs](#releases--changelogs) - [Demo](#demo) - [Integration](#integration) |
|
||||
:----------------------------------------------------------: |
|
||||
| [Upcoming changes](#upcoming-changes) - [Gallery](#gallery) - [Support, FAQ](#support-frequently-asked-questions-faq) - [How to help](#how-to-help) - [Sponsors](#sponsors) - [Credits](#credits) - [License](#license) |
|
||||
| [Wiki](https://github.com/ocornut/imgui/wiki) - [Languages & frameworks backends/bindings](https://github.com/ocornut/imgui/wiki/Bindings) - [Software using Dear ImGui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) - [User quotes](https://github.com/ocornut/imgui/wiki/Quotes) |
|
||||
@ -93,9 +93,10 @@ Dear ImGui outputs vertex buffers and command lists that you can easily render i
|
||||
|
||||
_A common misunderstanding is to mistake immediate mode gui for immediate mode rendering, which usually implies hammering your driver/GPU with a bunch of inefficient draw calls and state changes as the gui functions are called. This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a small list of draw calls batches. It never touches your GPU directly. The draw call batches are decently optimal and you can render them later, in your app or even remotely._
|
||||
|
||||
### Releases
|
||||
### Releases & Changelogs
|
||||
|
||||
See [Releases](https://github.com/ocornut/imgui/releases) page.
|
||||
Reading the changelogs is a good way to keep up to date with the things Dear ImGui has to offer, and maybe will give you ideas of some features that you've been ignoring until now!
|
||||
|
||||
### Demo
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (main code and documentation)
|
||||
|
||||
// Help:
|
||||
|
6
imgui.h
6
imgui.h
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (headers)
|
||||
|
||||
// Help:
|
||||
@ -59,8 +59,8 @@ Index of this file:
|
||||
|
||||
// Version
|
||||
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
|
||||
#define IMGUI_VERSION "1.81 WIP"
|
||||
#define IMGUI_VERSION_NUM 18004
|
||||
#define IMGUI_VERSION "1.81"
|
||||
#define IMGUI_VERSION_NUM 18100
|
||||
#define IMGUI_CHECKVERSION() ImGui::DebugCheckVersionAndDataLayout(IMGUI_VERSION, sizeof(ImGuiIO), sizeof(ImGuiStyle), sizeof(ImVec2), sizeof(ImVec4), sizeof(ImDrawVert), sizeof(ImDrawIdx))
|
||||
#define IMGUI_HAS_TABLE
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (demo code)
|
||||
|
||||
// Help:
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (tables and columns code)
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.81 WIP
|
||||
// dear imgui, v1.81
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
@ -21,5 +21,10 @@ The default Dear ImGui styles will be impacted by this change (alpha values will
|
||||
See https://gist.github.com/ocornut/b3a9ecf13502fd818799a452969649ad
|
||||
|
||||
### Known issues
|
||||
- `cfg.OversampleH`, `OversampleV` are ignored (but perhaps not so necessary with this rasterizer).
|
||||
|
||||
- Oversampling settins are ignored but also not so much necessary with the higher quality rendering.
|
||||
|
||||
### Comparaison
|
||||
|
||||
Small, thin anti-aliased fonts are typically benefiting a lots from Freetype's hinting:
|
||||
![comparing_font_rasterizers](https://user-images.githubusercontent.com/8225057/107550178-fef87f00-6bd0-11eb-8d09-e2edb2f0ccfc.gif)
|
||||
|
Loading…
Reference in New Issue
Block a user