mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-15 11:33:29 +01:00
Merge branch 'master' into viewport
# Conflicts: # examples/imgui_impl_dx10.cpp # examples/imgui_impl_dx11.cpp
This commit is contained in:
commit
3a678d48b1
@ -29,6 +29,17 @@ HOW TO UPDATE?
|
||||
- Please report any issue!
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.67 (In Progress)
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking Changes:
|
||||
|
||||
Other Changes:
|
||||
- Examples: DirectX10/11/12: Made imgui_impl_dx10/dx11/dx12.cpp link d3dcompiler.lib from the .cpp file
|
||||
to ease integration.
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
VERSION 1.66b (Released 2018-12-01)
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -12,6 +12,7 @@
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2018-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
|
||||
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
|
||||
// 2018-07-13: DirectX10: Fixed unreleased resources in Init and Shutdown functions.
|
||||
// 2018-06-08: Misc: Extracted imgui_impl_dx10.cpp/.h away from the old combined DX10+Win32 example.
|
||||
@ -29,6 +30,9 @@
|
||||
#include <d3d10_1.h>
|
||||
#include <d3d10.h>
|
||||
#include <d3dcompiler.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
|
||||
#endif
|
||||
|
||||
// DirectX data
|
||||
static ID3D10Device* g_pd3dDevice = NULL;
|
||||
|
@ -12,6 +12,7 @@
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2018-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
|
||||
// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
|
||||
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
|
||||
// 2018-08-01: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility.
|
||||
// 2018-07-13: DirectX11: Fixed unreleased resources in Init and Shutdown functions.
|
||||
@ -28,6 +29,9 @@
|
||||
#include <stdio.h>
|
||||
#include <d3d11.h>
|
||||
#include <d3dcompiler.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
|
||||
#endif
|
||||
|
||||
// DirectX data
|
||||
static ID3D11Device* g_pd3dDevice = NULL;
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
// CHANGELOG
|
||||
// (minor and older changes stripped away, please see git history for details)
|
||||
// 2018-12-03: Misc: Added #pragma comment statement to automatically link with d3dcompiler.lib when using D3DCompile().
|
||||
// 2018-11-30: Misc: Setting up io.BackendRendererName so it can be displayed in the About Window.
|
||||
// 2018-06-12: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from NewFrame() to RenderDrawData().
|
||||
// 2018-06-08: Misc: Extracted imgui_impl_dx12.cpp/.h away from the old combined DX12+Win32 example.
|
||||
@ -25,6 +26,9 @@
|
||||
#include <d3d12.h>
|
||||
#include <dxgi1_4.h>
|
||||
#include <d3dcompiler.h>
|
||||
#ifdef _MSC_VER
|
||||
#pragma comment(lib, "d3dcompiler") // Automatically link with d3dcompiler.lib as we are using D3DCompile() below.
|
||||
#endif
|
||||
|
||||
// DirectX data
|
||||
static ID3D12Device* g_pd3dDevice = NULL;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (main code and documentation)
|
||||
|
||||
// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
|
||||
@ -3432,8 +3432,9 @@ void ImGui::NewFrame()
|
||||
g.CurrentPopupStack.resize(0);
|
||||
ClosePopupsOverWindow(g.NavWindow);
|
||||
|
||||
// Create implicit window - we will only render it if the user has added something to it.
|
||||
// Create implicit/fallback window - which we will only render it if the user has added something to it.
|
||||
// We don't use "Debug" to avoid colliding with user trying to create a "Debug" window with custom flags.
|
||||
// This fallback is particularly important as it avoid ImGui:: calls from crashing.
|
||||
SetNextWindowSize(ImVec2(400,400), ImGuiCond_FirstUseEver);
|
||||
Begin("Debug##Default");
|
||||
|
||||
@ -4673,7 +4674,7 @@ static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_au
|
||||
ImGuiWindowFlags flags = window->Flags;
|
||||
if ((flags & ImGuiWindowFlags_NoResize) || (flags & ImGuiWindowFlags_AlwaysAutoResize) || window->AutoFitFramesX > 0 || window->AutoFitFramesY > 0)
|
||||
return;
|
||||
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit Debug window.
|
||||
if (window->WasActive == false) // Early out to avoid running this code for e.g. an hidden implicit/fallback Debug window.
|
||||
return;
|
||||
|
||||
const int resize_border_count = g.IO.ConfigResizeWindowsFromEdges ? 4 : 0;
|
||||
@ -5114,7 +5115,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
ClampWindowRect(window, viewport_rect, clamp_padding);
|
||||
else if (window->ViewportOwned && g.PlatformIO.Monitors.Size > 0)
|
||||
{
|
||||
IM_ASSERT(window->Viewport->PlatformMonitor != INT_MIN);
|
||||
if (window->Viewport->PlatformMonitor == -1)
|
||||
{
|
||||
// Fallback for "lost" window (e.g. a monitor disconnected): we move the window back over the main viewport
|
||||
|
4
imgui.h
4
imgui.h
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (headers)
|
||||
|
||||
// See imgui.cpp file for documentation.
|
||||
@ -1931,9 +1931,9 @@ struct ImFontAtlas
|
||||
// Building in RGBA32 format is provided for convenience and compatibility, but note that unless you manually manipulate or copy color data into
|
||||
// the texture (e.g. when using the AddCustomRect*** api), then the RGB pixels emitted will always be white (~75% of memory/bandwidth waste.
|
||||
IMGUI_API bool Build(); // Build pixels data. This is called automatically for you by the GetTexData*** functions.
|
||||
IMGUI_API bool IsBuilt() { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
||||
IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel
|
||||
IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel
|
||||
bool IsBuilt() { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
||||
void SetTexID(ImTextureID id) { TexID = id; }
|
||||
|
||||
//-------------------------------------------
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (demo code)
|
||||
|
||||
// Message to the person tempted to delete this file when integrating Dear ImGui into their code base:
|
||||
@ -199,7 +199,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
||||
|
||||
if (show_app_metrics) { ImGui::ShowMetricsWindow(&show_app_metrics); }
|
||||
if (show_app_style_editor) { ImGui::Begin("Style Editor", &show_app_style_editor); ImGui::ShowStyleEditor(); ImGui::End(); }
|
||||
if (show_app_about) { ShowAboutWindow(&show_app_about); }
|
||||
if (show_app_about) { ImGui::ShowAboutWindow(&show_app_about); }
|
||||
|
||||
// Demonstrate the various window flags. Typically you would just use the default!
|
||||
static bool no_titlebar = false;
|
||||
@ -2470,7 +2470,7 @@ static void ShowDemoWindowMisc()
|
||||
void ImGui::ShowAboutWindow(bool* p_open)
|
||||
{
|
||||
ImGui::Begin("About Dear ImGui", p_open, ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::Text("Dear ImGui, %s", ImGui::GetVersion());
|
||||
ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
|
||||
ImGui::Separator();
|
||||
ImGui::Text("By Omar Cornut and all dear imgui contributors.");
|
||||
ImGui::Text("Dear ImGui is licensed under the MIT License, see LICENSE for more information.");
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (drawing and font code)
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.66b
|
||||
// dear imgui, v1.67 WIP
|
||||
// (widgets code)
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user