mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Backends: DX12: use dxgiformat.h to fix using forward declared DXGI_FORMAT (#4594)
This commit is contained in:
		@@ -16,13 +16,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#pragma once
 | 
					#pragma once
 | 
				
			||||||
#include "imgui.h"      // IMGUI_IMPL_API
 | 
					#include "imgui.h"      // IMGUI_IMPL_API
 | 
				
			||||||
 | 
					#include <dxgiformat.h> // DXGI_FORMAT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef _MSC_VER
 | 
					 | 
				
			||||||
#pragma warning (push)
 | 
					 | 
				
			||||||
#pragma warning (disable: 4471) // a forward declaration of an unscoped enumeration must have an underlying type
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
enum DXGI_FORMAT;
 | 
					 | 
				
			||||||
struct ID3D12Device;
 | 
					struct ID3D12Device;
 | 
				
			||||||
struct ID3D12DescriptorHeap;
 | 
					struct ID3D12DescriptorHeap;
 | 
				
			||||||
struct ID3D12GraphicsCommandList;
 | 
					struct ID3D12GraphicsCommandList;
 | 
				
			||||||
@@ -42,8 +37,3 @@ IMGUI_IMPL_API void     ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3
 | 
				
			|||||||
// Use if you want to reset your rendering device without losing Dear ImGui state.
 | 
					// Use if you want to reset your rendering device without losing Dear ImGui state.
 | 
				
			||||||
IMGUI_IMPL_API void     ImGui_ImplDX12_InvalidateDeviceObjects();
 | 
					IMGUI_IMPL_API void     ImGui_ImplDX12_InvalidateDeviceObjects();
 | 
				
			||||||
IMGUI_IMPL_API bool     ImGui_ImplDX12_CreateDeviceObjects();
 | 
					IMGUI_IMPL_API bool     ImGui_ImplDX12_CreateDeviceObjects();
 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifdef _MSC_VER
 | 
					 | 
				
			||||||
#pragma warning (pop)
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,12 +27,12 @@ In the [misc/fonts/](https://github.com/ocornut/imgui/tree/master/misc/fonts) fo
 | 
				
			|||||||
---------------------------------------
 | 
					---------------------------------------
 | 
				
			||||||
 ## Readme First
 | 
					 ## Readme First
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- You can use the `Metrics/Debugger` window (available in `Demo>Tools`) to browse your fonts and understand what's going on if you have an issue. You can also reach it in `Demo->Tools->Style Editor->Fonts`. The same information are also available in the Style Editor under Fonts.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- All loaded fonts glyphs are rendered into a single texture atlas ahead of time. Calling either of `io.Fonts->GetTexDataAsAlpha8()`, `io.Fonts->GetTexDataAsRGBA32()` or `io.Fonts->Build()` will build the atlas.
 | 
					- All loaded fonts glyphs are rendered into a single texture atlas ahead of time. Calling either of `io.Fonts->GetTexDataAsAlpha8()`, `io.Fonts->GetTexDataAsRGBA32()` or `io.Fonts->Build()` will build the atlas.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- You can use the style editor `ImGui::ShowStyleEditor()` in the "Fonts" section to browse your fonts and understand what's going on if you have an issue. You can also reach it in `Demo->Tools->Style Editor->Fonts`:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||

 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
- Make sure your font ranges data are persistent (available during the calls to `GetTexDataAsAlpha8()`/`GetTexDataAsRGBA32()/`Build()`.
 | 
					- Make sure your font ranges data are persistent (available during the calls to `GetTexDataAsAlpha8()`/`GetTexDataAsRGBA32()/`Build()`.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Use C++11 u8"my text" syntax to encode literal strings as UTF-8. e.g.:
 | 
					- Use C++11 u8"my text" syntax to encode literal strings as UTF-8. e.g.:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user