Merge branch 'master' into docking

# Conflicts:
#	examples/imgui_impl_dx12.cpp
#	imgui.cpp
#	imgui.h
#	imgui_widgets.cpp
This commit is contained in:
omar
2019-10-24 15:11:37 +02:00
17 changed files with 290 additions and 223 deletions

View File

@ -63,10 +63,10 @@ You can find binaries of some of those example applications at:
Most the example bindings are split in 2 parts:
- The "Platform" bindings, in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, windowing.
Examples: Windows (imgui_impl_win32.cpp), GLFW (imgui_impl_glfw.cpp), SDL2 (imgui_impl_sdl.cpp)
Examples: Windows (imgui_impl_win32.cpp), GLFW (imgui_impl_glfw.cpp), SDL2 (imgui_impl_sdl.cpp), etc.
- The "Renderer" bindings, in charge of: creating the main font texture, rendering imgui draw data.
Examples: DirectX11 (imgui_impl_dx11.cpp), GL3 (imgui_impl_opengl3.cpp), Vulkan (imgui_impl_vulkan.cpp)
Examples: DirectX11 (imgui_impl_dx11.cpp), GL3 (imgui_impl_opengl3.cpp), Vulkan (imgui_impl_vulkan.cpp), etc.
- The example _applications_ usually combine 1 platform + 1 renderer binding to create a working program.
Examples: the example_win32_directx11/ application combines imgui_impl_win32.cpp + imgui_impl_dx11.cpp.
@ -129,16 +129,32 @@ List of high-level Frameworks Bindings in this repository: (combine Platform + R
imgui_impl_allegro5.cpp
imgui_impl_marmalade.cpp
Note that Dear ImGui works with Emscripten.
The examples_emscripten/ app uses sdl.cpp + opengl3.cpp but other combinations are possible.
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.
Third-party framework, graphics API and languages bindings are listed at:
https://github.com/ocornut/imgui/wiki/Bindings
Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, SFML, GML/GameMaker Studio, Irrlicht, Ogre, OpenSceneGraph,
openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
Miscellaneous: Software Renderer, RemoteImgui, etc.
Languages:
C, C#, ChaiScript, CovScript, D, Go, Haxe/hxcpp, Java, JavaScript, Julia, Lua, Nim,
Odin, Pascal, PureBasic, Python, Ruby, Rust, Swift...
Frameworks:
Amethyst, bsf, Cinder, Cocoa2d-x, Diligent Engine, Flexium, GML/GameMaker Studio,
GTK3 + OpenGL, Irrlicht, Ogre, OpenSceneGraph/OSG, openFrameworks, Orx, LÖVE+LUA,
Magnum, NanoRT, Nim Game Lib, px_render, Qt, Qt3d, SFML, Sokol, Unreal Engine 4, vtk...
Miscellaneous: Software Renderer, RemoteImgui, imgui-ws, etc.
Not sure which to use?
Recommended platform/frameworks:
GLFW https://github.com/glfw/glfw Use imgui_impl_glfw.cpp
SDL2 https://www.libsdl.org Use imgui_impl_sdl.cp
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.
---------------------------------------

View File

@ -24,7 +24,8 @@ UNAME_S := $(shell uname -s)
EMS = -s USE_SDL=2 -s WASM=1
EMS += -s ALLOW_MEMORY_GROWTH=1 -s BINARYEN_TRAP_MODE=clamp
EMS += -s DISABLE_EXCEPTION_CATCHING=1 -s NO_EXIT_RUNTIME=0
EMS += -s ASSERTIONS=1 -s NO_FILESYSTEM=1
EMS += -s ASSERTIONS=1
#EMS += -s NO_FILESYSTEM=1 ## Getting "error: undefined symbol: $FS" if filesystem is removed
#EMS += -s SAFE_HEAP=1 ## Adds overhead
CPPFLAGS = -I../ -I../../

View File

@ -9,7 +9,12 @@
#include <dxgi1_4.h>
#include <tchar.h>
#define DX12_ENABLE_DEBUG_LAYER 0
//#define DX12_ENABLE_DEBUG_LAYER
#ifdef DX12_ENABLE_DEBUG_LAYER
#include <dxgidebug.h>
#pragma comment(lib, "dxguid.lib")
#endif
struct FrameContext
{
@ -252,15 +257,14 @@ bool CreateDeviceD3D(HWND hWnd)
sd.Stereo = FALSE;
}
if (DX12_ENABLE_DEBUG_LAYER)
#ifdef DX12_ENABLE_DEBUG_LAYER
ID3D12Debug* pdx12Debug = NULL;
if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&pdx12Debug))))
{
ID3D12Debug* dx12Debug = NULL;
if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&dx12Debug))))
{
dx12Debug->EnableDebugLayer();
dx12Debug->Release();
}
pdx12Debug->EnableDebugLayer();
pdx12Debug->Release();
}
#endif
D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0;
if (D3D12CreateDevice(NULL, featureLevel, IID_PPV_ARGS(&g_pd3dDevice)) != S_OK)
@ -348,6 +352,15 @@ void CleanupDeviceD3D()
if (g_fence) { g_fence->Release(); g_fence = NULL; }
if (g_fenceEvent) { CloseHandle(g_fenceEvent); g_fenceEvent = NULL; }
if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; }
#ifdef DX12_ENABLE_DEBUG_LAYER
IDXGIDebug1* pDebug = NULL;
if (SUCCEEDED(DXGIGetDebugInterface1(0, IID_PPV_ARGS(&pDebug))))
{
pDebug->ReportLiveObjects(DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_SUMMARY);
pDebug->Release();
}
#endif
}
void CreateRenderTarget()

View File

@ -15,6 +15,8 @@
// CHANGELOG
// (minor and older changes stripped away, please see git history for details)
// 2019-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
// 2019-10-18: DirectX12: *BREAKING CHANGE* Added extra ID3D12DescriptorHeap parameter to ImGui_ImplDX12_Init() function.
// 2019-05-29: DirectX12: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag.
// 2019-04-30: DirectX12: Added support for special ImDrawCallback_ResetRenderState callback to reset render state.
// 2019-03-29: Misc: Various minor tidying up.