2019-03-13 13:35:34 +03:00
|
|
|
-----------------------------------------------------------------------
|
2020-10-12 14:02:38 +03:00
|
|
|
dear imgui, v1.80 WIP
|
2018-08-31 12:33:12 +03:00
|
|
|
-----------------------------------------------------------------------
|
|
|
|
examples/README.txt
|
|
|
|
(This is the README file for the examples/ folder. See docs/ for more documentation)
|
|
|
|
-----------------------------------------------------------------------
|
2016-03-29 12:33:23 +03:00
|
|
|
|
2018-06-08 20:37:33 +03:00
|
|
|
Dear ImGui is highly portable and only requires a few things to run and render:
|
|
|
|
|
|
|
|
- Providing mouse/keyboard inputs
|
|
|
|
- Uploading the font atlas texture into graphics memory
|
|
|
|
- Providing a render function to render indexed textured triangles
|
|
|
|
- Optional: clipboard support, mouse cursor supports, Windows IME support, etc.
|
|
|
|
|
|
|
|
This is essentially what the example bindings in this folder are providing + obligatory portability cruft.
|
|
|
|
|
|
|
|
It is important to understand the difference between the core Dear ImGui library (files in the root folder)
|
|
|
|
and examples bindings which we are describing here (examples/ folder).
|
|
|
|
You should be able to write bindings for pretty much any platform and any 3D graphics API. With some extra
|
|
|
|
effort you can even perform the rendering remotely, on a different machine than the one running the logic.
|
|
|
|
|
|
|
|
This folder contains two things:
|
|
|
|
|
|
|
|
- Example bindings for popular platforms/graphics API, which you can use as is or adapt for your own use.
|
|
|
|
They are the imgui_impl_XXXX files found in the examples/ folder.
|
|
|
|
|
|
|
|
- Example applications (standalone, ready-to-build) using the aforementioned bindings.
|
|
|
|
They are the in the XXXX_example/ sub-folders.
|
|
|
|
|
2019-01-21 00:23:29 +03:00
|
|
|
You can find binaries of some of those example applications at:
|
2019-03-13 13:35:34 +03:00
|
|
|
http://www.dearimgui.org/binaries
|
2018-01-24 20:40:23 +03:00
|
|
|
|
2015-11-29 13:53:03 +03:00
|
|
|
|
2018-06-08 20:37:33 +03:00
|
|
|
---------------------------------------
|
2020-06-19 11:56:54 +03:00
|
|
|
GETTING STARTED
|
2018-06-08 20:37:33 +03:00
|
|
|
---------------------------------------
|
|
|
|
|
2018-06-11 20:52:40 +03:00
|
|
|
- Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
|
|
|
|
Please read the comments and instruction at the top of each file.
|
2020-06-19 11:56:54 +03:00
|
|
|
Please read FAQ at http://www.dearimgui.org/faq
|
2019-01-21 00:23:29 +03:00
|
|
|
|
2020-06-19 11:56:54 +03:00
|
|
|
- If you are using of the backend provided here, you can add the imgui_impl_xxx.cpp/h files
|
2018-06-08 20:37:33 +03:00
|
|
|
to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
|
2020-06-19 11:56:54 +03:00
|
|
|
Changelog at the top of the .cpp files, so if you want to update them later it will be easier to
|
2018-06-08 20:37:33 +03:00
|
|
|
catch up with what changed.
|
|
|
|
|
2020-06-19 11:56:54 +03:00
|
|
|
- Dear ImGui has no particular extra lag for most behaviors, e.g. the value of 'io.MousePos' provided in
|
|
|
|
NewFrame() will result at the time of EndFrame()/Render() in a moved windows rendered following that mouse
|
|
|
|
movement. At 60 FPS your experience should be pleasant.
|
|
|
|
However, consider that OS mouse cursors are typically drawn through a very specific hardware accelerated
|
|
|
|
path and will feel smoother than the majority of contents rendererd via regular graphics API (including,
|
|
|
|
but not limited to Dear ImGui windows). Because UI rendering and interaction happens on the same plane as
|
|
|
|
the mouse, that disconnect may be jarring to particularly sensitive users.
|
|
|
|
You may experiment with enabling the io.MouseDrawCursor flag to request Dear ImGui to draw a mouse cursor
|
|
|
|
using the regular graphics API, to help you visualize the difference between a "hardware" cursor and a
|
|
|
|
regularly rendered software cursor.
|
|
|
|
However, rendering a mouse cursor at 60 FPS will feel sluggish so you likely won't want to enable that at
|
|
|
|
all times. It might be beneficial for the user experience to switch to a software rendered cursor _only_
|
|
|
|
when an interactive drag is in progress.
|
|
|
|
Note that some setup or GPU drivers are likely to be causing extra display lag depending on their settings.
|
|
|
|
If you feel that dragging windows feels laggy and you are not sure what the cause is: try to build a simple
|
|
|
|
drawing a flat 2D shape directly under the mouse cursor.
|
2018-01-24 20:40:23 +03:00
|
|
|
|
2016-01-21 21:51:42 +03:00
|
|
|
|
2018-06-08 20:37:33 +03:00
|
|
|
---------------------------------------
|
|
|
|
EXAMPLE BINDINGS
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Most the example bindings are split in 2 parts:
|
|
|
|
|
|
|
|
- The "Platform" bindings, in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, windowing.
|
2019-10-21 17:12:46 +03:00
|
|
|
Examples: Windows (imgui_impl_win32.cpp), GLFW (imgui_impl_glfw.cpp), SDL2 (imgui_impl_sdl.cpp), etc.
|
2018-06-08 20:37:33 +03:00
|
|
|
|
|
|
|
- The "Renderer" bindings, in charge of: creating the main font texture, rendering imgui draw data.
|
2019-10-21 17:12:46 +03:00
|
|
|
Examples: DirectX11 (imgui_impl_dx11.cpp), GL3 (imgui_impl_opengl3.cpp), Vulkan (imgui_impl_vulkan.cpp), etc.
|
2018-06-08 20:37:33 +03:00
|
|
|
|
|
|
|
- The example _applications_ usually combine 1 platform + 1 renderer binding to create a working program.
|
2018-06-10 17:14:43 +03:00
|
|
|
Examples: the example_win32_directx11/ application combines imgui_impl_win32.cpp + imgui_impl_dx11.cpp.
|
2018-06-08 20:37:33 +03:00
|
|
|
|
|
|
|
- Some bindings for higher level frameworks carry both "Platform" and "Renderer" parts in one file.
|
|
|
|
This is the case for Allegro 5 (imgui_impl_allegro5.cpp), Marmalade (imgui_impl_marmalade5.cpp).
|
|
|
|
|
2019-01-21 00:23:29 +03:00
|
|
|
- If you use your own engine, you may decide to use some of existing bindings and/or rewrite some using
|
2018-06-08 20:37:33 +03:00
|
|
|
your own API. As a recommendation, if you are new to Dear ImGui, try using the existing binding as-is
|
2019-01-21 00:23:29 +03:00
|
|
|
first, before moving on to rewrite some of the code. Although it is tempting to rewrite both of the
|
2018-06-08 20:37:33 +03:00
|
|
|
imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
|
|
|
|
In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
|
|
|
|
|
2019-01-21 00:23:29 +03:00
|
|
|
Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
|
2018-06-11 20:52:40 +03:00
|
|
|
system layered over DirectX11.
|
2019-01-21 00:23:29 +03:00
|
|
|
Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
|
|
|
|
Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
|
|
|
|
using your own functions, etc.
|
2018-06-08 20:37:33 +03:00
|
|
|
Please consider using the bindings to the lower-level platform/graphics API as-is.
|
|
|
|
|
|
|
|
Example: your engine is multi-platform (consoles, phones, etc.), you have high-level systems everywhere.
|
|
|
|
Suggestion: step 1: try using a non-portable binding first (e.g. win32 + underlying graphics API)!
|
|
|
|
This is counter-intuitive, but this will get you running faster! Once you better understand how imgui
|
|
|
|
works and is bound, you can rewrite the code using your own systems.
|
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
- Road-map: Dear ImGui 1.80 (WIP currently in the "docking" branch) will allows imgui windows to be
|
2019-01-21 00:23:29 +03:00
|
|
|
seamlessly detached from the main application window. This is achieved using an extra layer to the
|
2019-06-11 17:11:19 +03:00
|
|
|
platform and renderer bindings, which allows Dear ImGui to communicate platform-specific requests.
|
2019-01-21 00:23:29 +03:00
|
|
|
If you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
|
2018-07-08 11:57:16 +03:00
|
|
|
improvements and fixes related to viewports and platform windows without extra work on your side.
|
|
|
|
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-11 20:27:11 +03:00
|
|
|
List of Platforms Bindings in this repository:
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-11 20:27:11 +03:00
|
|
|
imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
|
2019-05-06 11:02:59 +03:00
|
|
|
imgui_impl_osx.mm ; macOS native API (not as feature complete as glfw/sdl back-ends)
|
2018-06-11 20:27:11 +03:00
|
|
|
imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
|
2018-07-08 11:57:16 +03:00
|
|
|
imgui_impl_win32.cpp ; Win32 native API (Windows)
|
2020-01-20 20:09:59 +03:00
|
|
|
imgui_impl_glut.cpp ; GLUT/FreeGLUT (absolutely not recommended in 2020!)
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-11 20:27:11 +03:00
|
|
|
List of Renderer Bindings in this repository:
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-11 20:27:11 +03:00
|
|
|
imgui_impl_dx9.cpp ; DirectX9
|
|
|
|
imgui_impl_dx10.cpp ; DirectX10
|
|
|
|
imgui_impl_dx11.cpp ; DirectX11
|
2018-07-08 11:47:31 +03:00
|
|
|
imgui_impl_dx12.cpp ; DirectX12
|
|
|
|
imgui_impl_metal.mm ; Metal (with ObjC)
|
2019-03-04 01:14:30 +03:00
|
|
|
imgui_impl_opengl2.cpp ; OpenGL 2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
|
|
|
|
imgui_impl_opengl3.cpp ; OpenGL 3/4, OpenGL ES 2, OpenGL ES 3 (modern programmable pipeline)
|
2018-06-11 20:27:11 +03:00
|
|
|
imgui_impl_vulkan.cpp ; Vulkan
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-11 20:27:11 +03:00
|
|
|
List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
|
2018-06-08 20:37:33 +03:00
|
|
|
|
|
|
|
imgui_impl_allegro5.cpp
|
|
|
|
imgui_impl_marmalade.cpp
|
|
|
|
|
2019-10-21 17:12:46 +03:00
|
|
|
Note that Dear ImGui works with Emscripten. The examples_emscripten/ app uses imgui_impl_sdl.cpp and
|
|
|
|
imgui_impl_opengl3.cpp, but other combinations are possible.
|
|
|
|
|
2018-06-16 11:23:11 +03:00
|
|
|
Third-party framework, graphics API and languages bindings are listed at:
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-16 11:43:05 +03:00
|
|
|
https://github.com/ocornut/imgui/wiki/Bindings
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2020-01-24 17:25:47 +03:00
|
|
|
Including backends for:
|
2019-10-21 17:12:46 +03:00
|
|
|
|
2020-01-24 17:25:47 +03:00
|
|
|
AGS/Adventure Game Studio, Amethyst, bsf, Cinder, Cocos2d-x, Diligent Engine, Flexium,
|
|
|
|
GML/Game Maker Studio2, GTK3+OpenGL3, Irrlicht Engine, LÖVE+LUA, Magnum, NanoRT, Nim Game Lib,
|
|
|
|
Ogre, openFrameworks, OSG/OpenSceneGraph, Orx, px_render, Qt/QtDirect3D, SFML, Sokol,
|
|
|
|
Unreal Engine 4, vtk, Win32 GDI, etc.
|
2019-10-21 17:12:46 +03:00
|
|
|
|
|
|
|
Not sure which to use?
|
|
|
|
Recommended platform/frameworks:
|
|
|
|
|
|
|
|
GLFW https://github.com/glfw/glfw Use imgui_impl_glfw.cpp
|
2020-01-24 17:25:47 +03:00
|
|
|
SDL2 https://www.libsdl.org Use imgui_impl_sdl.cpp
|
2019-10-21 17:12:46 +03:00
|
|
|
Sokol https://github.com/floooh/sokol Use util/sokol_imgui.h in Sokol repository.
|
|
|
|
|
|
|
|
Those will allow you to create portable applications and will solve and abstract away many issues.
|
2018-06-08 20:37:33 +03:00
|
|
|
|
|
|
|
|
|
|
|
---------------------------------------
|
|
|
|
EXAMPLE APPLICATIONS
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
Building:
|
2020-03-19 13:10:58 +03:00
|
|
|
Unfortunately in 2020 it is still tedious to create and maintain portable build files using external
|
2019-01-21 00:23:29 +03:00
|
|
|
libraries (the kind we're using here to create a window and render 3D triangles) without relying on
|
2020-06-19 11:56:54 +03:00
|
|
|
third party software. For most examples here we choose to provide:
|
2018-06-08 20:37:33 +03:00
|
|
|
- Makefiles for Linux/OSX
|
|
|
|
- Batch files for Visual Studio 2008+
|
2020-06-19 11:56:54 +03:00
|
|
|
- A .sln project file for Visual Studio 2012+
|
2018-07-08 11:47:31 +03:00
|
|
|
- Xcode project files for the Apple examples
|
2020-06-19 11:56:54 +03:00
|
|
|
Please let us know if they don't work with your setup!
|
2018-06-08 20:37:33 +03:00
|
|
|
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.
|
2015-02-24 12:59:56 +03:00
|
|
|
|
2020-03-19 13:10:58 +03:00
|
|
|
If you are interested in using Cmake to build and links examples, see:
|
|
|
|
https://github.com/ocornut/imgui/pull/1713 and https://github.com/ocornut/imgui/pull/3027
|
|
|
|
|
2015-03-09 18:09:24 +03:00
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_allegro5/
|
|
|
|
Allegro 5 example.
|
|
|
|
= main.cpp + imgui_impl_allegro5.cpp
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-07-08 11:57:16 +03:00
|
|
|
example_apple_metal/
|
|
|
|
OSX & iOS + Metal.
|
2019-01-17 20:04:35 +03:00
|
|
|
= main.m + imgui_impl_osx.mm + imgui_impl_metal.mm
|
2018-07-08 11:57:16 +03:00
|
|
|
It is based on the "cross-platform" game template provided with Xcode as of Xcode 9.
|
2019-05-06 11:02:59 +03:00
|
|
|
(NB: imgui_impl_osx.mm is currently not as feature complete as other platforms back-ends.
|
|
|
|
You may prefer to use the GLFW Or SDL back-ends, which will also support Windows and Linux.)
|
2018-07-08 11:57:16 +03:00
|
|
|
|
|
|
|
example_apple_opengl2/
|
|
|
|
OSX + OpenGL2.
|
|
|
|
= main.mm + imgui_impl_osx.mm + imgui_impl_opengl2.cpp
|
2019-05-06 11:02:59 +03:00
|
|
|
(NB: imgui_impl_osx.mm is currently not as feature complete as other platforms back-ends.
|
|
|
|
You may prefer to use the GLFW Or SDL back-ends, which will also support Windows and Linux.)
|
2018-07-08 11:57:16 +03:00
|
|
|
|
2019-04-15 02:01:44 +03:00
|
|
|
example_empscripten:
|
|
|
|
Emcripten + SDL2 + OpenGL3+/ES2/ES3 example.
|
|
|
|
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
|
2019-05-06 11:02:59 +03:00
|
|
|
Note that other examples based on SDL or GLFW + OpenGL could easily be modified to work with Emscripten.
|
2019-04-15 02:01:44 +03:00
|
|
|
We provide this to make the Emscripten differences obvious, and have them not pollute all other examples.
|
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_glfw_metal/
|
2019-05-07 17:36:08 +03:00
|
|
|
GLFW (Mac) + Metal example.
|
2020-02-10 17:13:29 +03:00
|
|
|
= main.mm + imgui_impl_glfw.cpp + imgui_impl_metal.mm
|
2019-05-06 11:02:59 +03:00
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_glfw_opengl2/
|
2019-01-17 20:04:35 +03:00
|
|
|
GLFW + OpenGL2 example (legacy, fixed pipeline).
|
|
|
|
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
|
2018-06-10 16:42:14 +03:00
|
|
|
**DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
|
2020-07-10 15:36:00 +03:00
|
|
|
**Prefer using OPENGL3 code (with gl3w/glew/glad/glad2/glbinding, you can replace the OpenGL function loader)**
|
2018-09-13 17:44:08 +03:00
|
|
|
This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
|
2018-06-08 20:37:33 +03:00
|
|
|
If your code is using GL3+ context or any semi modern OpenGL calls, using this renderer is likely to
|
|
|
|
make things more complicated, will require your code to reset many OpenGL attributes to their initial
|
|
|
|
state, and might confuse your GPU driver. One star, not recommended.
|
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_glfw_opengl3/
|
2019-01-17 20:04:35 +03:00
|
|
|
GLFW (Win32, Mac, Linux) + OpenGL3+/ES2/ES3 example (programmable pipeline).
|
|
|
|
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
|
2019-01-21 00:23:29 +03:00
|
|
|
This uses more modern OpenGL calls and custom shaders.
|
2018-06-08 20:37:33 +03:00
|
|
|
Prefer using that if you are using modern OpenGL in your application (anything with shaders).
|
2019-05-06 11:02:59 +03:00
|
|
|
(Please be mindful that accessing OpenGL3+ functions requires a function loader, which are a frequent
|
|
|
|
source for confusion for new users. We use a loader in imgui_impl_opengl3.cpp which may be different
|
|
|
|
from the one your app normally use. Read imgui_impl_opengl3.h for details and how to change it.)
|
2019-01-21 00:23:29 +03:00
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_glfw_vulkan/
|
|
|
|
GLFW (Win32, Mac, Linux) + Vulkan example.
|
2018-06-08 20:37:33 +03:00
|
|
|
= main.cpp + imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
|
2019-01-17 20:04:35 +03:00
|
|
|
This is quite long and tedious, because: Vulkan.
|
2019-06-18 12:28:26 +03:00
|
|
|
For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
|
2015-07-08 18:49:32 +03:00
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_glut_opengl2/
|
|
|
|
GLUT (e.g., FreeGLUT on Linux/Windows, GLUT framework on OSX) + OpenGL2.
|
|
|
|
= main.cpp + imgui_impl_glut.cpp + imgui_impl_opengl2.cpp
|
|
|
|
Note that GLUT/FreeGLUT is largely obsolete software, prefer using GLFW or SDL.
|
|
|
|
|
|
|
|
example_marmalade/
|
|
|
|
Marmalade example using IwGx.
|
|
|
|
= main.cpp + imgui_impl_marmalade.cpp
|
|
|
|
|
2019-06-11 17:11:19 +03:00
|
|
|
example_null
|
|
|
|
Null example, compile and link imgui, create context, run headless with no inputs and no graphics output.
|
|
|
|
= main.cpp
|
|
|
|
This is used to quickly test compilation of core imgui files in as many setups as possible.
|
|
|
|
Because this application doesn't create a window nor a graphic context, there's no graphics output.
|
|
|
|
|
2019-06-18 12:28:26 +03:00
|
|
|
example_sdl_directx11/
|
|
|
|
SDL2 + DirectX11 example, Windows only.
|
|
|
|
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_dx11.cpp
|
|
|
|
This to demonstrate usage of DirectX with SDL.
|
|
|
|
|
2020-02-10 17:13:29 +03:00
|
|
|
example_sdl_metal/
|
|
|
|
SDL2 (Mac) + Metal example.
|
|
|
|
= main.mm + imgui_impl_sdl.cpp + imgui_impl_metal.mm
|
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_sdl_opengl2/
|
2019-01-17 20:04:35 +03:00
|
|
|
SDL2 (Win32, Mac, Linux etc.) + OpenGL example (legacy, fixed pipeline).
|
|
|
|
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl2.cpp
|
2018-06-10 16:42:14 +03:00
|
|
|
**DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
|
2020-07-10 15:36:00 +03:00
|
|
|
**Prefer using OPENGL3 code (with gl3w/glew/glad/glad2/glbinding, you can replace the OpenGL function loader)**
|
2018-09-13 17:44:08 +03:00
|
|
|
This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
|
2018-02-23 01:20:37 +03:00
|
|
|
If your code is using GL3+ context or any semi modern OpenGL calls, using this renderer is likely to
|
2018-06-08 20:37:33 +03:00
|
|
|
make things more complicated, will require your code to reset many OpenGL attributes to their initial
|
2019-01-21 00:23:29 +03:00
|
|
|
state, and might confuse your GPU driver. One star, not recommended.
|
2015-07-08 20:46:18 +03:00
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_sdl_opengl3/
|
2018-08-09 18:42:53 +03:00
|
|
|
SDL2 (Win32, Mac, Linux, etc.) + OpenGL3+/ES2/ES3 example.
|
2019-01-17 20:04:35 +03:00
|
|
|
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
|
2019-01-21 00:23:29 +03:00
|
|
|
This uses more modern OpenGL calls and custom shaders.
|
2018-02-23 01:20:37 +03:00
|
|
|
Prefer using that if you are using modern OpenGL in your application (anything with shaders).
|
2019-05-06 11:02:59 +03:00
|
|
|
(Please be mindful that accessing OpenGL3+ functions requires a function loader, which are a frequent
|
|
|
|
source for confusion for new users. We use a loader in imgui_impl_opengl3.cpp which may be different
|
|
|
|
from the one your app normally use. Read imgui_impl_opengl3.h for details and how to change it.)
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2018-06-10 16:42:14 +03:00
|
|
|
example_sdl_vulkan/
|
2018-06-08 20:37:33 +03:00
|
|
|
SDL2 (Win32, Mac, Linux, etc.) + Vulkan example.
|
2018-06-10 16:45:54 +03:00
|
|
|
= main.cpp + imgui_impl_sdl.cpp + imgui_impl_vulkan.cpp
|
2019-01-17 20:04:35 +03:00
|
|
|
This is quite long and tedious, because: Vulkan.
|
2019-06-18 12:28:26 +03:00
|
|
|
For this example, the main.cpp file exceptionally use helpers function from imgui_impl_vulkan.h/cpp.
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_win32_directx9/
|
|
|
|
DirectX9 example, Windows only.
|
|
|
|
= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx9.cpp
|
2018-06-08 20:37:33 +03:00
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_win32_directx10/
|
|
|
|
DirectX10 example, Windows only.
|
|
|
|
= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx10.cpp
|
2018-06-11 20:52:40 +03:00
|
|
|
|
2019-05-06 11:02:59 +03:00
|
|
|
example_win32_directx11/
|
|
|
|
DirectX11 example, Windows only.
|
|
|
|
= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx11.cpp
|
|
|
|
|
|
|
|
example_win32_directx12/
|
|
|
|
DirectX12 example, Windows only.
|
|
|
|
= main.cpp + imgui_impl_win32.cpp + imgui_impl_dx12.cpp
|
|
|
|
This is quite long and tedious, because: DirectX12.
|