mirror of
https://github.com/kevinporetti/UnrealImGui.git
synced 2025-01-18 08:20:32 +00:00
d4ffe9443f
- Removed explicit PCH. - Fixed includes to compile for all supported engine versions, including non-unity builds. - Configured build.cs to treat ImGui as an engine module and added stricter compilation rules.
25 lines
864 B
C++
25 lines
864 B
C++
// Distributed under the MIT License (MIT) (see accompanying LICENSE file)
|
|
|
|
#include "ImGuiTextureHandle.h"
|
|
|
|
#include "ImGuiInteroperability.h"
|
|
|
|
|
|
FImGuiTextureHandle::FImGuiTextureHandle()
|
|
: FImGuiTextureHandle(NAME_None, ImGuiInterops::ToImTextureID(INDEX_NONE))
|
|
{
|
|
}
|
|
|
|
FImGuiTextureHandle::FImGuiTextureHandle(const FName& InName, ImTextureID InTextureId)
|
|
: Name(InName)
|
|
, TextureId(InTextureId)
|
|
{
|
|
const TextureIndex Index = ImGuiInterops::ToTextureIndex(TextureId);
|
|
checkf((Index == INDEX_NONE) == (Name == NAME_None),
|
|
TEXT("Mismatch between Name and TextureId parameters, with only one indicating a null handle.")
|
|
TEXT(" Name = '%s', TextureIndex(TextureId) = %d"), *Name.ToString(), Index);
|
|
}
|
|
|
|
// FImGuiTextureHandle::HasValidEntry() is implemented in ImGuiModule.cpp to get access to FImGuiModuleManager instance
|
|
// without referencing in this class.
|