Examples: Comments

This commit is contained in:
omar 2018-01-24 18:40:23 +01:00
parent 5148937d4d
commit 277f6e7842

View File

@ -1,10 +1,13 @@
Those are standalone ready-to-build applications to demonstrate ImGui. Those are standalone ready-to-build applications to demonstrate Dear ImGui.
Binaries of some of those demos: http://www.miracleworld.net/imgui/binaries Binaries of some of those demos: http://www.miracleworld.net/imgui/binaries
Third party languages and frameworks bindings: https://github.com/ocornut/imgui/wiki/Links Third party languages and frameworks bindings:
(languages: C, .net, rust, D, Python, Lua..) https://github.com/ocornut/imgui/wiki/Links
(frameworks: DX12, Vulkan, Cinder, OpenGLES, openFrameworks, Cocos2d-x, SFML, Flexium, NanoRT, Irrlicht..) (languages: C, C#, ChaiScript, D, Go, Haxe, Odin, Python, Rust, Lua, Pascal)
(extras: RemoteImGui, ImWindow, imgui_wm..) (frameworks: DX12, OpenGLES, FreeGlut, Cinder, Cocos2d-x, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
OpenSceneGraph, openFrameworks, LOVE, NanoRT, Qt3d, SFML, Unreal Engine 4, etc.)
(extras: RemoteImGui, ImWindow, imgui_wm, etc.)
TL;DR; TL;DR;
- Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase. - Newcomers, read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup ImGui in your codebase.
@ -19,14 +22,14 @@ TL;DR;
existing rendering backends, don't feel forced to rewrite them with your own engine API, or you can existing rendering backends, don't feel forced to rewrite them with your own engine API, or you can
do that later when you already got things to work. do that later when you already got things to work.
ImGui is highly portable and only requires a few things to run: Dear ImGui is highly portable and only requires a few things to run and render.
- Providing mouse/keyboard inputs - Providing mouse/keyboard inputs
- Load the font atlas texture into graphics memory - Load the font atlas texture into graphics memory
- Providing a render function to render indexed textured triangles - Providing a render function to render indexed textured triangles
- Optional: clipboard support, mouse cursor supports, Windows IME support, etc. - Optional: clipboard support, mouse cursor supports, Windows IME support, etc.
So this is essentially what those examples are doing + the obligatory cruft for portability. So this is essentially what those examples are doing + the obligatory cruft for portability.
Unfortunately in 2016 it is still tedious to create and maintain portable build files using external Unfortunately in 2018 it is still tedious to create and maintain portable build files using external
libraries (the kind we're using here to create a window and render 3D triangles) without relying on libraries (the kind we're using here to create a window and render 3D triangles) without relying on
third party software. For most examples here I choose to provide: third party software. For most examples here I choose to provide:
- Makefiles for Linux/OSX - Makefiles for Linux/OSX
@ -36,14 +39,15 @@ Please let me know if they don't work with your setup!
You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those
directly with a command-line compiler. directly with a command-line compiler.
ImGui has zero frame of lag for most behaviors and one frame of lag for some behaviors. Dear ImGui has zero to one frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
At 60 FPS your experience should be pleasant. Consider that OS mouse cursors are typically drawn through Consider that OS mouse cursors are typically drawn through a specific hardware accelerated route and may
a specific hardware accelerated route and may feel smoother than other GPU rendered contents. You may feel smoother than other GPU rendered contents. You may experiment with the io.MouseDrawCursor flag to
experiment with the io.MouseDrawCursor flag to request ImGui to draw a mouse cursor itself, to visualize request ImGui to draw a mouse cursor itself, to visualize the lag between a hardware cursor and a software
the lag between a hardware cursor and a software cursor. It might be beneficial to the user experience cursor. It might be beneficial to the user experience to switch to a software rendered cursor when an
to switch to a software rendered cursor when an interactive drag is in progress. interactive drag is in progress.
Also note that some setup or GPU drivers may be causing extra lag (possibly by enforcing triple buffering), Also note that some setup or GPU drivers may be causing extra lag (possibly by enforcing triple buffering),
leaving you with no option but sadness/anger (Intel GPU drivers were reported as such). leaving you with little option but sadness (Intel GPU drivers were reported as such).
opengl2_example/ opengl2_example/
**DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)** **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
@ -99,4 +103,4 @@ vulkan_example/
Vulkan example. Vulkan example.
This is quite long and tedious, because: Vulkan. This is quite long and tedious, because: Vulkan.
TODO: Apple, SDL GL/GL3, Allegro, Marmalade, Vulkan examples do not honor the io.WantMoveMouse flag. TODO: Apple, SDL GL2/GL3, Allegro, Marmalade, Vulkan examples do not honor the io.WantMoveMouse flag.