Skip to content
Merged
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
25 changes: 25 additions & 0 deletions ports/dartsim/0007-fix-imgui.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/dart/gui/osg/ImGuiHandler.cpp b/dart/gui/osg/ImGuiHandler.cpp
index 39b1005..05e252c 100644
--- a/dart/gui/osg/ImGuiHandler.cpp
+++ b/dart/gui/osg/ImGuiHandler.cpp
@@ -128,16 +128,16 @@ ConvertedKey convertFromOSGKey(int key)
return ImGuiKey_Escape;
case KeySymbol::KEY_Control_L:
case KeySymbol::KEY_Control_R:
- return ImGuiKey_ModCtrl;
+ return ImGuiMod_Ctrl;
case KeySymbol::KEY_Shift_L:
case KeySymbol::KEY_Shift_R:
- return ImGuiKey_ModShift;
+ return ImGuiMod_Shift;
case KeySymbol::KEY_Alt_L:
case KeySymbol::KEY_Alt_R:
- return ImGuiKey_ModAlt;
+ return ImGuiMod_Alt;
case KeySymbol::KEY_Super_L:
case KeySymbol::KEY_Super_R:
- return ImGuiKey_ModSuper;
+ return ImGuiMod_Super;
case KeySymbol::KEY_A:
return ImGuiKey_A;
case KeySymbol::KEY_C:
1 change: 1 addition & 0 deletions ports/dartsim/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vcpkg_from_github(
0004-pkgconfig.patch
0005-add-cassert.patch
0006-support-eigen3-5.patch
0007-fix-imgui.patch
)
file(REMOVE_RECURSE "${SOURCE_PATH}/dart/external/imgui")

Expand Down
2 changes: 1 addition & 1 deletion ports/dartsim/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dartsim",
"version": "6.15.0",
"port-version": 6,
"port-version": 7,
"description": "Dynamic Animation and Robotics Toolkit",
"homepage": "https://dartsim.github.io/",
"license": "BSD-2-Clause",
Expand Down
13 changes: 13 additions & 0 deletions ports/hello-imgui/cmake-config.diff
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ index 2b93540..6cfa3f8 100644

include(${CMAKE_CURRENT_LIST_DIR}/hello_imgui_cmake/hello_imgui_add_app.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/hello-imgui-targets.cmake)
diff --git a/hello_imgui_cmake/hello_imgui_build_lib.cmake b/hello_imgui_cmake/hello_imgui_build_lib.cmake
index 7b5e7ac..37f5910 100644
--- a/hello_imgui_cmake/hello_imgui_build_lib.cmake
+++ b/hello_imgui_cmake/hello_imgui_build_lib.cmake
@@ -1181,7 +1181,7 @@ endfunction()
# Install: API = him_install
###################################################################################################
function(him_install)
- if (HELLOIMGUI_INSTALL AND NOT IOS AND NOT ANDROID)
+ if (HELLOIMGUI_INSTALL)
install(TARGETS ${HELLOIMGUI_TARGET} DESTINATION lib/)
file(GLOB headers *.h)
install(FILES ${headers} DESTINATION include/hello_imgui/)
13 changes: 13 additions & 0 deletions ports/hello-imgui/disable-sdl-android.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/hello_imgui/internal/hello_imgui_assets.cpp b/src/hello_imgui/internal/hello_imgui_assets.cpp
index 028c8ef..d7ec663 100644
--- a/src/hello_imgui/internal/hello_imgui_assets.cpp
+++ b/src/hello_imgui/internal/hello_imgui_assets.cpp
@@ -249,7 +249,7 @@ std::string AssetFileFullPath(const std::string& assetFilename, bool assertIfNot
// Returns true if this asset file exists
bool AssetExists(const std::string& assetFilename)
{
-#ifdef __ANDROID__
+#if defined(__ANDROID__) && defined(HELLOIMGUI_USE_SDL2)
size_t dataSize;
void *data = SDL_LoadFile(assetFilename.c_str(), &dataSize);
bool exists = (data != nullptr);
23 changes: 23 additions & 0 deletions ports/hello-imgui/fix-vulkan-binding.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/src/hello_imgui/internal/image_vulkan.h b/src/hello_imgui/internal/image_vulkan.h
index ee165d0..aa0e445 100644
--- a/src/hello_imgui/internal/image_vulkan.h
+++ b/src/hello_imgui/internal/image_vulkan.h
@@ -18,12 +18,12 @@ namespace HelloImGui
// Specific to Vulkan
VkDescriptorSet DS;
static constexpr int Channels = 4; // We intentionally only support RGBA for now
- VkImageView ImageView = nullptr;
- VkImage Image = nullptr;
- VkDeviceMemory ImageMemory = nullptr;
- VkSampler Sampler = nullptr;
- VkBuffer UploadBuffer = nullptr;
- VkDeviceMemory UploadBufferMemory = nullptr;
+ VkImageView ImageView;
+ VkImage Image;
+ VkDeviceMemory ImageMemory;
+ VkSampler Sampler;
+ VkBuffer UploadBuffer;
+ VkDeviceMemory UploadBufferMemory;
};
}

6 changes: 3 additions & 3 deletions ports/hello-imgui/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pthom/hello_imgui
REF "v${VERSION}"
SHA512 b44741e27278974f6a545a3143abd18027d98503cc912085e08528c467197fb208d2d4876e483f74e518f3dfc14d12c3579e379b9939dc364a1fff4ee98bb8f5
SHA512 a81faf70a564147cf9c4587de54e46965b744ce93afadf7c9ce8a4868a9a584eea0c8f8df0c7f701e0404b4984f95ecfa3f5aa36a94ef2a84eaadbcc1e80c9b7
HEAD_REF master
PATCHES
cmake-config.diff
imgui-test-engine.diff
# PR has been merged into https://github.com/pthom/hello_imgui/pull/142. This patch should not be needed in the next release.
support-imgui-1_91_9.patch
disable-sdl-android.patch
fix-vulkan-binding.patch
)
file(REMOVE_RECURSE
"${SOURCE_PATH}/external/imgui"
Expand Down
49 changes: 0 additions & 49 deletions ports/hello-imgui/support-imgui-1_91_9.patch

This file was deleted.

3 changes: 1 addition & 2 deletions ports/hello-imgui/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "hello-imgui",
"version": "1.6.0",
"port-version": 3,
"version": "1.92.5",
"description": [
"Hello ImGui: unleash your creativity in app development and prototyping",
"Note that at least on renderer backend and at least one platform backend must be chosen."
Expand Down
79 changes: 79 additions & 0 deletions ports/imgui-node-editor/fix-imgui-v1.92.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
diff --git a/imgui_node_editor.cpp b/imgui_node_editor.cpp
index 7dee2e4..4b2ea5f 100644
--- a/imgui_node_editor.cpp
+++ b/imgui_node_editor.cpp
@@ -1659,7 +1659,8 @@ void ed::EditorContext::SetNodePosition(NodeId nodeId, const ImVec2& position)
if (node->m_Bounds.Min != position)
{
node->m_Bounds.Translate(position - node->m_Bounds.Min);
- node->m_Bounds.Floor();
+ node->m_Bounds.Min = ImFloor(node->m_Bounds.Min);
+ node->m_Bounds.Max = ImFloor(node->m_Bounds.Max);
MakeDirty(NodeEditor::SaveReasonFlags::Position, node);
}
}
@@ -1679,7 +1680,8 @@ void ed::EditorContext::SetGroupSize(NodeId nodeId, const ImVec2& size)
{
node->m_GroupBounds.Min = node->m_Bounds.Min;
node->m_GroupBounds.Max = node->m_Bounds.Min + size;
- node->m_GroupBounds.Floor();
+ node->m_GroupBounds.Min = ImFloor(node->m_GroupBounds.Min);
+ node->m_GroupBounds.Max = ImFloor(node->m_GroupBounds.Max);
MakeDirty(NodeEditor::SaveReasonFlags::Size, node);
}
}
@@ -1757,10 +1759,12 @@ void ed::EditorContext::UpdateNodeState(Node* node)

node->m_Bounds.Min = settings->m_Location;
node->m_Bounds.Max = node->m_Bounds.Min + settings->m_Size;
- node->m_Bounds.Floor();
+ node->m_Bounds.Min = ImFloor(node->m_Bounds.Min);
+ node->m_Bounds.Max = ImFloor(node->m_Bounds.Max);
node->m_GroupBounds.Min = settings->m_Location;
node->m_GroupBounds.Max = node->m_GroupBounds.Min + settings->m_GroupSize;
- node->m_GroupBounds.Floor();
+ node->m_GroupBounds.Min = ImFloor(node->m_GroupBounds.Min);
+ node->m_GroupBounds.Max = ImFloor(node->m_GroupBounds.Max);
}

void ed::EditorContext::RemoveSettings(Object* object)
@@ -3785,7 +3789,8 @@ bool ed::SizeAction::Process(const Control& control)
if ((m_Pivot & NodeRegion::Right) == NodeRegion::Right)
newBounds.Max.x = ImMax(newBounds.Min.x + minimumSize.x, Editor->AlignPointToGrid(newBounds.Max.x + dragOffset.x));

- newBounds.Floor();
+ newBounds.Min = ImFloor(newBounds.Min);
+ newBounds.Max = ImFloor(newBounds.Max);

m_LastSize = newBounds.GetSize();

@@ -5308,7 +5313,8 @@ void ed::NodeBuilder::End()
ImGui::EndGroup();

m_NodeRect = ImGui_GetItemRect();
- m_NodeRect.Floor();
+ m_NodeRect.Min = ImFloor(m_NodeRect.Min);
+ m_NodeRect.Max = ImFloor(m_NodeRect.Max);

if (m_CurrentNode->m_Bounds.GetSize() != m_NodeRect.GetSize())
{
@@ -5416,7 +5422,8 @@ void ed::NodeBuilder::PinRect(const ImVec2& a, const ImVec2& b)
IM_ASSERT(nullptr != m_CurrentPin);

m_CurrentPin->m_Bounds = ImRect(a, b);
- m_CurrentPin->m_Bounds.Floor();
+ m_CurrentPin->m_Bounds.Min = ImFloor(m_CurrentPin->m_Bounds.Min);
+ m_CurrentPin->m_Bounds.Max = ImFloor(m_CurrentPin->m_Bounds.Max);
m_ResolvePinRect = false;
}

@@ -5466,7 +5473,8 @@ void ed::NodeBuilder::Group(const ImVec2& size)
ImGui::Dummy(size);

m_GroupBounds = ImGui_GetItemRect();
- m_GroupBounds.Floor();
+ m_GroupBounds.Min = ImFloor(m_GroupBounds.Min);
+ m_GroupBounds.Max = ImFloor(m_GroupBounds.Max);
}

ImDrawList* ed::NodeBuilder::GetUserBackgroundDrawList() const
2 changes: 2 additions & 0 deletions ports/imgui-node-editor/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ vcpkg_from_github(
PATCHES
fix-vec2-math-operators.patch
remove-getkeyindex.patch # GetKeyIndex() is a no-op since 1.87; see https://github.com/ocornut/imgui/issues/5979#issuecomment-1345349492
fix-imgui-v1.92.5.patch
)

file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
file(REMOVE_RECURSE "${SOURCE_PATH}/external/imgui")

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
Expand Down
2 changes: 1 addition & 1 deletion ports/imgui-node-editor/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "imgui-node-editor",
"version": "0.9.3",
"port-version": 2,
"port-version": 3,
"description": "Node Editor built using Dear ImGui",
"homepage": "https://github.com/thedmd/imgui-node-editor",
"license": "MIT",
Expand Down
Loading