Skip to content
Open

Update #1911

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Framework/Modules/Knobs/ThirdParty/imgui-knobs
Submodule imgui-knobs updated 1 files
+4 −0 imgui-knobs.cpp
2 changes: 1 addition & 1 deletion Framework/Modules/OS/ThirdParty/UntitledOpen
2 changes: 1 addition & 1 deletion Framework/Modules/OS/ThirdParty/uexec
2 changes: 1 addition & 1 deletion Framework/Modules/Plotting/ThirdParty/implot
2 changes: 1 addition & 1 deletion Framework/Modules/Toggles/ThirdParty/imgui_toggle
23 changes: 1 addition & 22 deletions Framework/Renderer/Vulkan/VulkanTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,27 +98,7 @@ void UImGui::VulkanTexture::load(TextureData& dt, void* data, FVector2 size, uin
return;
}

const vk::SamplerCreateInfo samplerCreateInfo
{
.sType = vk::StructureType::eSamplerCreateInfo,
.magFilter = dt.bFiltered ? vk::Filter::eLinear : vk::Filter::eNearest,
.minFilter = dt.bFiltered ? vk::Filter::eLinear : vk::Filter::eNearest,
.mipmapMode = vk::SamplerMipmapMode::eLinear,
.addressModeU = vk::SamplerAddressMode::eRepeat,
.addressModeV = vk::SamplerAddressMode::eRepeat,
.addressModeW = vk::SamplerAddressMode::eRepeat,
.maxAnisotropy = 1.0f,
.minLod = -1000,
.maxLod = 1000,
};
result = device.createSampler(&samplerCreateInfo, nullptr, &texDt->sampler);
if (result != vk::Result::eSuccess)
{
Logger::log("Couldn't create image sampler for Vulkan texture at location: ", ULOG_LOG_TYPE_WARNING, dt.filename);
return;
}

texDt->descriptorSet = ImGui_ImplVulkan_AddTexture(texDt->sampler, texDt->imageView, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
texDt->descriptorSet = ImGui_ImplVulkan_AddTexture(texDt->imageView, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);

const vk::BufferCreateInfo bufferCreateInfo =
{
Expand Down Expand Up @@ -296,7 +276,6 @@ void UImGui::VulkanTexture::clear(TextureData& dt) noexcept

device.freeMemory(texDt->uploadBufferMemory, nullptr);
device.destroyBuffer(texDt->uploadBuffer, nullptr);
device.destroySampler(texDt->sampler, nullptr);
device.destroyImageView(texDt->imageView, nullptr);
device.destroyImage(texDt->image, nullptr);
device.freeMemory(texDt->imageMemory, nullptr);
Expand Down
1 change: 0 additions & 1 deletion Framework/Renderer/Vulkan/VulkanTexture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace UImGui
vk::ImageView imageView{};
vk::Image image{};
vk::DeviceMemory imageMemory{};
vk::Sampler sampler{};
vk::Buffer uploadBuffer{};
vk::DeviceMemory uploadBufferMemory{};
};
Expand Down
2 changes: 1 addition & 1 deletion Framework/ThirdParty/logger
65 changes: 50 additions & 15 deletions Framework/ThirdParty/source-libraries/cimgui/cimgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2609,9 +2609,9 @@ CIMGUI_API void cimgui::ImGui_SetNextItemShortcut(ImGuiKeyChord key_chord, ImGui
::ImGui::SetNextItemShortcut(key_chord, flags);
}

CIMGUI_API void cimgui::ImGui_SetItemKeyOwner(cimgui::ImGuiKey key)
CIMGUI_API bool cimgui::ImGui_SetItemKeyOwner(cimgui::ImGuiKey key)
{
::ImGui::SetItemKeyOwner(static_cast<::ImGuiKey>(key));
return ::ImGui::SetItemKeyOwner(static_cast<::ImGuiKey>(key));
}

CIMGUI_API bool cimgui::ImGui_IsMouseDown(ImGuiMouseButton button)
Expand Down Expand Up @@ -3294,14 +3294,34 @@ CIMGUI_API void cimgui::ImDrawList_AddLineEx(cimgui::ImDrawList* self, ci
reinterpret_cast<::ImDrawList*>(self)->AddLine(ConvertToCPP_ImVec2(p1), ConvertToCPP_ImVec2(p2), col, thickness);
}

CIMGUI_API void cimgui::ImDrawList_AddLineH(cimgui::ImDrawList* self, float min_x, float max_x, float y, ImU32 col)
{
reinterpret_cast<::ImDrawList*>(self)->AddLineH(min_x, max_x, y, col);
}

CIMGUI_API void cimgui::ImDrawList_AddLineHEx(cimgui::ImDrawList* self, float min_x, float max_x, float y, ImU32 col, float thickness)
{
reinterpret_cast<::ImDrawList*>(self)->AddLineH(min_x, max_x, y, col, thickness);
}

CIMGUI_API void cimgui::ImDrawList_AddLineV(cimgui::ImDrawList* self, float x, float min_y, float max_y, ImU32 col)
{
reinterpret_cast<::ImDrawList*>(self)->AddLineV(x, min_y, max_y, col);
}

CIMGUI_API void cimgui::ImDrawList_AddLineVEx(cimgui::ImDrawList* self, float x, float min_y, float max_y, ImU32 col, float thickness)
{
reinterpret_cast<::ImDrawList*>(self)->AddLineV(x, min_y, max_y, col, thickness);
}

CIMGUI_API void cimgui::ImDrawList_AddRect(cimgui::ImDrawList* self, cimgui::ImVec2 p_min, cimgui::ImVec2 p_max, ImU32 col)
{
reinterpret_cast<::ImDrawList*>(self)->AddRect(ConvertToCPP_ImVec2(p_min), ConvertToCPP_ImVec2(p_max), col);
}

CIMGUI_API void cimgui::ImDrawList_AddRectEx(cimgui::ImDrawList* self, cimgui::ImVec2 p_min, cimgui::ImVec2 p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness)
CIMGUI_API void cimgui::ImDrawList_AddRectEx(cimgui::ImDrawList* self, cimgui::ImVec2 p_min, cimgui::ImVec2 p_max, ImU32 col, float rounding, float thickness, ImDrawFlags flags)
{
reinterpret_cast<::ImDrawList*>(self)->AddRect(ConvertToCPP_ImVec2(p_min), ConvertToCPP_ImVec2(p_max), col, rounding, flags, thickness);
reinterpret_cast<::ImDrawList*>(self)->AddRect(ConvertToCPP_ImVec2(p_min), ConvertToCPP_ImVec2(p_max), col, rounding, thickness, flags);
}

CIMGUI_API void cimgui::ImDrawList_AddRectFilled(cimgui::ImDrawList* self, cimgui::ImVec2 p_min, cimgui::ImVec2 p_max, ImU32 col)
Expand Down Expand Up @@ -3429,9 +3449,9 @@ CIMGUI_API void cimgui::ImDrawList_AddBezierQuadratic(cimgui::ImDrawList*
reinterpret_cast<::ImDrawList*>(self)->AddBezierQuadratic(ConvertToCPP_ImVec2(p1), ConvertToCPP_ImVec2(p2), ConvertToCPP_ImVec2(p3), col, thickness, num_segments);
}

CIMGUI_API void cimgui::ImDrawList_AddPolyline(cimgui::ImDrawList* self, const cimgui::ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness)
CIMGUI_API void cimgui::ImDrawList_AddPolyline(cimgui::ImDrawList* self, const cimgui::ImVec2* points, int num_points, ImU32 col, float thickness, ImDrawFlags flags)
{
reinterpret_cast<::ImDrawList*>(self)->AddPolyline(reinterpret_cast<const ::ImVec2*>(points), num_points, col, flags, thickness);
reinterpret_cast<::ImDrawList*>(self)->AddPolyline(reinterpret_cast<const ::ImVec2*>(points), num_points, col, thickness, flags);
}

CIMGUI_API void cimgui::ImDrawList_AddConvexPolyFilled(cimgui::ImDrawList* self, const cimgui::ImVec2* points, int num_points, ImU32 col)
Expand Down Expand Up @@ -3494,9 +3514,9 @@ CIMGUI_API void cimgui::ImDrawList_PathFillConcave(cimgui::ImDrawList* se
reinterpret_cast<::ImDrawList*>(self)->PathFillConcave(col);
}

CIMGUI_API void cimgui::ImDrawList_PathStroke(cimgui::ImDrawList* self, ImU32 col, ImDrawFlags flags, float thickness)
CIMGUI_API void cimgui::ImDrawList_PathStroke(cimgui::ImDrawList* self, ImU32 col, float thickness, ImDrawFlags flags)
{
reinterpret_cast<::ImDrawList*>(self)->PathStroke(col, flags, thickness);
reinterpret_cast<::ImDrawList*>(self)->PathStroke(col, thickness, flags);
}

CIMGUI_API void cimgui::ImDrawList_PathArcTo(cimgui::ImDrawList* self, cimgui::ImVec2 center, float radius, float a_min, float a_max, int num_segments)
Expand Down Expand Up @@ -3534,9 +3554,9 @@ CIMGUI_API void cimgui::ImDrawList_PathRect(cimgui::ImDrawList* self, cim
reinterpret_cast<::ImDrawList*>(self)->PathRect(ConvertToCPP_ImVec2(rect_min), ConvertToCPP_ImVec2(rect_max), rounding, flags);
}

CIMGUI_API void cimgui::ImDrawList_AddCallback(cimgui::ImDrawList* self, cimgui::ImDrawCallback callback, void* userdata)
CIMGUI_API void cimgui::ImDrawList_AddCallback(cimgui::ImDrawList* self, cimgui::ImDrawCallback callback)
{
reinterpret_cast<::ImDrawList*>(self)->AddCallback(reinterpret_cast<::ImDrawCallback>(callback), userdata);
reinterpret_cast<::ImDrawList*>(self)->AddCallback(reinterpret_cast<::ImDrawCallback>(callback));
}

CIMGUI_API void cimgui::ImDrawList_AddCallbackEx(cimgui::ImDrawList* self, cimgui::ImDrawCallback callback, void* userdata, size_t userdata_size)
Expand Down Expand Up @@ -3611,6 +3631,21 @@ CIMGUI_API void cimgui::ImDrawList_PrimVtx(cimgui::ImDrawList* self, cimg

#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS

CIMGUI_API void cimgui::ImDrawList_AddRectImDrawFlags(cimgui::ImDrawList* self, cimgui::ImVec2 p_min, cimgui::ImVec2 p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness)
{
reinterpret_cast<::ImDrawList*>(self)->AddRect(ConvertToCPP_ImVec2(p_min), ConvertToCPP_ImVec2(p_max), col, rounding, flags, thickness);
}

CIMGUI_API void cimgui::ImDrawList_AddPolylineImDrawFlags(cimgui::ImDrawList* self, const cimgui::ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness)
{
reinterpret_cast<::ImDrawList*>(self)->AddPolyline(reinterpret_cast<const ::ImVec2*>(points), num_points, col, flags, thickness);
}

CIMGUI_API void cimgui::ImDrawList_PathStrokeImDrawFlags(cimgui::ImDrawList* self, ImU32 col, ImDrawFlags flags, float thickness)
{
reinterpret_cast<::ImDrawList*>(self)->PathStroke(col, flags, thickness);
}

CIMGUI_API void cimgui::ImDrawList_PushTextureID(cimgui::ImDrawList* self, cimgui::ImTextureRef tex_ref)
{
reinterpret_cast<::ImDrawList*>(self)->PushTextureID(ConvertToCPP_ImTextureRef(tex_ref));
Expand Down Expand Up @@ -3838,6 +3873,11 @@ CIMGUI_API void cimgui::ImFontAtlas_Clear(cimgui::ImFontAtlas* self
reinterpret_cast<::ImFontAtlas*>(self)->Clear();
}

CIMGUI_API void cimgui::ImFontAtlas_ClearFonts(cimgui::ImFontAtlas* self)
{
reinterpret_cast<::ImFontAtlas*>(self)->ClearFonts();
}

CIMGUI_API void cimgui::ImFontAtlas_CompactCache(cimgui::ImFontAtlas* self)
{
reinterpret_cast<::ImFontAtlas*>(self)->CompactCache();
Expand All @@ -3853,11 +3893,6 @@ CIMGUI_API void cimgui::ImFontAtlas_ClearInputData(cimgui::ImFontAt
reinterpret_cast<::ImFontAtlas*>(self)->ClearInputData();
}

CIMGUI_API void cimgui::ImFontAtlas_ClearFonts(cimgui::ImFontAtlas* self)
{
reinterpret_cast<::ImFontAtlas*>(self)->ClearFonts();
}

CIMGUI_API void cimgui::ImFontAtlas_ClearTexData(cimgui::ImFontAtlas* self)
{
reinterpret_cast<::ImFontAtlas*>(self)->ClearTexData();
Expand Down
Loading