Dear ImGui
=====
[![Build Status](https://github.com/ocornut/imgui/workflows/build/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=build) [![Static Analysis Status](https://github.com/ocornut/imgui/workflows/static-analysis/badge.svg)](https://github.com/ocornut/imgui/actions?workflow=static-analysis)
<sub>(This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using Dear ImGui, please consider reaching out.)</sub>
Businesses: support continued development and maintenance via invoiced technical support, maintenance, sponsoring contracts:
<br> _E-mail: contact @ dearimgui dot com_
Individuals: support continued development and maintenance [here](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WGHNC6MBFLZ2S).
Also see [Sponsors](https://github.com/ocornut/imgui/wiki/Sponsors) page.
----
Dear ImGui is a **bloat-free graphical user interface library for C++**. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
Dear ImGui is designed to **enable fast iterations** and to **empower programmers** to create **content creation tools and visualization / debug tools** (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal, and lacks certain features normally found in more high-level libraries.
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 & 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) |
### Usage
**The core of Dear ImGui is self-contained within a few platform-agnostic files** which you can easily compile in your application/engine. They are all the files in the root folder of the repository (imgui*.cpp, imgui*.h).
**No specific build process is required**. You can add the .cpp files to your existing project.
You will need a backend to integrate Dear ImGui in your app. The backend passes mouse/keyboard/gamepad inputs and variety of settings to Dear ImGui, and is in charge of rendering the resulting vertices.
**Backends for a variety of graphics api and rendering platforms** are provided in the [backends/](https://github.com/ocornut/imgui/tree/master/backends) folder, along with example applications in the [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder. See the [Integration](#integration) section of this document for details. You may also create your own backend. Anywhere where you can render textured triangles, you can render Dear ImGui.
After Dear ImGui is setup in your application, you can use it from \_anywhere\_ in your program loop:
Code:
```cpp
ImGui::Text("Hello, world %d", 123);
if (ImGui::Button("Save"))
MySaveFunction();
ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
```
Result:
<br>![sample code output (dark)](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v175/capture_readme_styles_0001.png) ![sample code output (light)](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v175/capture_readme_styles_0002.png)
<br>_(settings: Dark style (left), Light style (right) / Font: Roboto-Medium, 16px)_
Code:
```cpp
// Create a window called "My First Tool", with a menu bar.
ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
if (ImGui::BeginMenuBar())
{
if (ImGui::BeginMenu("File"))
{
if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
if (ImGui::MenuItem("Save", "Ctrl+S")) { /* Do stuff */ }
if (ImGui::MenuItem("Close", "Ctrl+W")) { my_tool_active = false; }
ImGui::EndMenu();
}
ImGui::EndMenuBar();
}
// Edit a color (stored as ~4 floats)
ImGui::ColorEdit4("Color", my_color);
// Plot some values
const float my_values[] = { 0.2f, 0.1f, 1.0f, 0.5f, 0.9f, 2.2f };
ImGui::PlotLines("Frame Times", my_values, IM_ARRAYSIZE(my_values));
// Display contents in a scrolling region
ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
ImGui::BeginChild("Scrolling");
for (int n = 0; n < 50; n++)
ImGui::Text("%04d: Some text", n);
ImGui::EndChild();
ImGui::End();
```
Result:
<br>![sample code output](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v180/code_sample_04_color.gif)
Dear ImGui allows you to **create elaborate tools** as well as very short-lived ones. On the extreme side of short-livedness: using the Edit&Continue (hot code reload) feature of modern compilers you can add a few widgets to tweaks variables while your application is running, and remove the code a minute later! Dear ImGui is not just for tweaking values. You can use it to trace a running algorithm by just emitting text commands. You can use it along with your own reflection data to browse your dataset live. You can use it to expose the internals of a subsystem in your engine, to create a logger, an inspection tool, a profiler, a debugger, an entire game making editor/framework, etc.
### How it works
Check out the Wiki's [About the IMGUI paradigm](https://github.com/ocornut/imgui/wiki#about-the-imgui-paradigm) section if you want to understand the core principles behind the IMGUI paradigm. An IMGUI tries to minimize superfluous state duplication, state synchronization and state retention from the user's point of view. It is less error prone (less code and less bugs) than traditional retained-mode interfaces, and lends itself to create dynamic user interfaces.
Dear ImGui outputs vertex buffers and command lists that you can easily render in your application. The number of draw calls and state changes required to render them is fairly small. Because Dear ImGui doesn't know or touch graphics state directly, you can call its functions anywhere in your code (e.g. in the middle of a running algorithm, or in the middle of your own rendering process). Refer to the sample applications in the examples/ folder for instructions on how to integrate Dear ImGui with your existing codebase.
_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 & 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
Calling the `ImGui::ShowDemoWindow()` function will create a demo window showcasing variety of features and examples. The code is always available for reference in `imgui_demo.cpp`.
![screensho
没有合适的资源?快使用搜索试试~ 我知道了~
QT 3D地球模型OpenGL
共140个文件
h:45个
cpp:42个
obj:12个
4 下载量 75 浏览量
2024-03-24
16:45:28
上传
评论
收藏 68.02MB RAR 举报
温馨提示
项目是用QT5.12开发的基于OpenGL的3维地球项目,同时包含了ImGUI库。暂时没有做地图分级功能。
资源推荐
资源详情
资源评论
收起资源包目录
QT 3D地球模型OpenGL (140个子文件)
imgui.cpp 608KB
imgui_widgets.cpp 399KB
imgui_demo.cpp 390KB
implot.cpp 236KB
imgui_tables.cpp 209KB
imgui_draw.cpp 208KB
implot_items.cpp 127KB
implot_demo.cpp 99KB
imgui_impl_vulkan.cpp 74KB
imgui_freetype.cpp 37KB
imgui_impl_opengl3.cpp 37KB
imgui_impl_dx12.cpp 34KB
imgui_impl_wgpu.cpp 31KB
imgui_impl_win32.cpp 30KB
imgui_impl_dx11.cpp 28KB
imgui_impl_dx10.cpp 26KB
imgui_impl_glfw.cpp 22KB
imgui_impl_sdl.cpp 22KB
imgui_impl_allegro5.cpp 21KB
ImGuiRenderer.cpp 20KB
imgui_impl_dx9.cpp 18KB
imgui_impl_opengl2.cpp 14KB
binary_to_compressed_c.cpp 13KB
imgui_impl_sdlrenderer.cpp 10KB
imgui_impl_android.cpp 9KB
Controller.cpp 8KB
imgui_impl_glut.cpp 8KB
Helper.cpp 7KB
QtImGui.cpp 4KB
Shader.cpp 4KB
imgui_stdlib.cpp 3KB
ShaderManager.cpp 3KB
Window.cpp 2KB
Camera.cpp 2KB
Node.cpp 1KB
PerspectiveCamera.cpp 1KB
ModelData.cpp 1KB
Model.cpp 286B
main.cpp 217B
Mouse.cpp 196B
Sun.cpp 165B
DummyCamera.cpp 161B
Earth.frag 969B
EarthMousePosition.frag 270B
glsl_shader.frag 249B
imgui.gdb 555B
imgui.h 276KB
imgui_internal.h 200KB
imstb_truetype.h 188KB
implot.h 61KB
implot_internal.h 56KB
imstb_textedit.h 54KB
imgui_impl_opengl3_loader.h 32KB
imstb_rectpack.h 20KB
imconfig.h 9KB
imgui_impl_vulkan.h 9KB
imgui_freetype.h 3KB
imgui_impl_glfw.h 3KB
imgui_impl_opengl3.h 3KB
imgui_impl_win32.h 3KB
imgui_impl_glut.h 3KB
imgui_impl_dx12.h 3KB
imgui_impl_sdl.h 2KB
imgui_impl_opengl2.h 2KB
ImGuiRenderer.h 2KB
imgui_impl_allegro5.h 2KB
Controller.h 2KB
imgui_impl_metal.h 2KB
imgui_impl_android.h 2KB
Shader.h 2KB
ShaderManager.h 2KB
imgui_impl_osx.h 1KB
imgui_impl_wgpu.h 1KB
imgui_impl_sdlrenderer.h 1KB
Camera.h 1KB
imgui_impl_dx11.h 1KB
imgui_impl_dx10.h 1KB
imgui_impl_dx9.h 1KB
Node.h 1KB
imgui_stdlib.h 1KB
Helper.h 1KB
Window.h 984B
imgui_single_file.h 751B
ModelData.h 742B
PerspectiveCamera.h 686B
Model.h 532B
Macros.h 493B
Mouse.h 369B
QtImGui.h 335B
DummyCamera.h 328B
Sun.h 285B
world.topo.bathy.200411.3x21600x10800.jpg 28.35MB
world.200409.3x21600x10800.jpg 21.32MB
implot.lib 11.6MB
imgui.lib 3.1MB
qt_imgui_widgets.lib 163KB
LICENSE 1KB
FAQ.md 44KB
README.md 19KB
FONTS.md 19KB
共 140 条
- 1
- 2
资源评论
hellocode_7812
- 粉丝: 25
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功