Update FAQ.md

This commit is contained in:
omar
2026-07-20 15:23:35 +02:00
committed by GitHub
parent c9c458c40a
commit 295385ff96

View File

@@ -85,7 +85,7 @@ Here's a very simplified comparison between the approach taken by Dear ImGui vs
|--------------------------|--------------------------|
| UI fully issued on every update. | UI issued once then later modified. |
| UI layout is fully dynamic and can change at any time.<BR>UI is generally emitted programmatically, which empowers reflecting a dynamic set of data. | UI layout is mostly static.<BR>UI may be emitted programmatically or from data created by offline tools. UI need extra code to evolve, which is often tedious and error-prone if it needs to be reflecting dynamic data and systems. |
| UI system is optimized for the worst case and designed be optimal under constant changes. | UI system is optimized for the case where nothing changes. Performances tends to degrade when UI changes. |
| UI system is optimized for the worst case and designed to be optimal even under frequent changes. | UI system is optimized for the case where nothing changes. Performances tends to degrade when anything changes. |
| Application can submit UI based on arbitrary logic without bookkeeping all aspects of that logic. | Application needs more bookkeeping of UI elements. |
| UI library stores minimal amounts of data. At one point in time, it typically doesn't know or remember which other widgets are displayed and which widgets are coming next. As a result, certain layout features (alignment, resizing) are not as easy to implement or require ad-hoc code. | UI library stores entire widgets tree and state. UI library can use this retained data to easily layout things. |
| UI code may be added anywhere.<BR>You can even create UI to edit a local variable! | UI code needs to be added in dedicated spots. |
@@ -95,7 +95,7 @@ Here's a very simplified comparison between the approach taken by Dear ImGui vs
| API is low-level. Few abstractions, uses raw language types and your existing data. | API are higher-level. More abstractions, advanced language features. |
| Less fancy look and feel. But keeps improving :) | Standard look and feel. |
| Compile yourself. Easy to debug, hack, modify, study. | Mostly use precompiled libraries. Compiling, modifying or studying is daunting if not impossible. |
| Run on every platform. | Run on limited desktop platforms. |
| Run on every platform (incl. web, consoles, mobiles, legacy systems). | Run on major desktop platforms. |
Idiomatic Dear ImGui code:
```cpp