3

I installed Dear ImGui on Windows 10 with this command:

vcpkg install imgui:x64-windows

which installs only:

imgui[core]:x64-windows -> 1.85

I suspect that I need to add one or more bindings from this list:

imgui[allegro5-binding]                   Make available Allegro5 binding                                                                          
imgui[docking-experimental]               Build with docking support                                                                               
imgui[dx10-binding]                       Make available DirectX10 binding                                                                         
imgui[dx11-binding]                       Make available DirectX11 binding                                                                         
imgui[dx12-binding]                       Make available DirectX12 binding                                                                         
imgui[dx9-binding]                        Make available DirectX9 binding                                                                          
imgui[freetype]                           Build font atlases using FreeType instead of stb_truetype                                                
imgui[glfw-binding]                       Make available GLFW binding                                                                              
imgui[glut-binding]                       Make available Glut binding                                                                              
imgui[libigl-imgui]                       Install the libigl-imgui headers                                                                         
imgui[marmalade-binding]                  Make available Marmalade binding                                                                         
imgui[metal-binding]                      Make available Metal binding                                                                             
imgui[opengl2-binding]                    Make available OpenGL (legacy) binding                                                                   
imgui[opengl3-binding]                    Make available OpenGL3/ES/ES2 (modern) binding                                                           
imgui[osx-binding]                        Make available OSX binding                                                                               
imgui[sdl2-binding]                       Make available SDL2 binding                                                                              
imgui[sdl2-renderer-binding]              Make available SDL2 Renderer binding                                                                     
imgui[vulkan-binding]                     Make available Vulkan binding                                                                            
imgui[wchar32]                            Use WCHAR32 instead of WCHAR16                                                                           
imgui[win32-binding]                      Make available Win32 binding                                                                             

The Windows 10 version I'm using has DirectX 12. Do I need just imgui[dx12-binding]? imgui[win32-binding]? More? I can't find the documentation discussing these requirements.

Paul Jurczak
  • 7,008
  • 3
  • 47
  • 72
  • 1
    https://vcpkg.info/port/imgui and https://github.com/ocornut/imgui are full of information. – Retired Ninja Dec 07 '21 at 03:45
  • @RetiredNinja Full of information they are, but I can't find an answer to my question there. Enlighten me, please. – Paul Jurczak Dec 07 '21 at 03:54
  • There are many options and it isn't clear what you're trying to do. You might have to do some research yourself and make an educated decision. https://github.com/ocornut/imgui/blob/master/docs/FAQ.md#q-how-to-get-started and examples like https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx12/main.cpp may help. – Retired Ninja Dec 07 '21 at 04:03
  • 1
    I think you will need combination of win32 and dx12. As stated in [this section](https://github.com/ocornut/imgui#integration), dx12 is a renderer and win32 is a platform. – kiner_shah Dec 07 '21 at 04:03
  • 1
    @kiner_shah Thank you for the link. It confirms what I was guessing. – Paul Jurczak Dec 07 '21 at 04:06

1 Answers1

8

Here are the steps to get a sample Dear ImGui application build and run with Visual Studio on Windows 10:

  1. Install Dear ImGui with:
vcpkg install imgui[core,dx12-binding,win32-binding]:x64-windows
  1. Get a sample project from https://github.com/ocornut/imgui/tree/master/examples/example_win32_directx12

  2. Open the project with Visual Studio and remove imgui dependencies with hard coded paths

  3. Build and enjoy.

Paul Jurczak
  • 7,008
  • 3
  • 47
  • 72