You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to make my custom Vulkan backend for ImGui and have been successful in issuing drawcalls myself using ImDrawData, the problem is when I pass the VkDescriptorSet* casted as ImTexturteID for ImGui::Image()
I use the ImTextureID curreTexID = pcmd->GetTexID() to the pointer I passed, but it looks like that it doesn't always point to the Font (I did use ImFontAtlas::SetTexID)or the Image DescriptorSet that I have set, it's not a nullptr or FontAtlas by default which is causing my application to crash, If I manullay verify using If statement for the font Atlas Set by comparing the pointers the descriptorset and ImTextureID it get bound properly, I don't know why it spits out unset values in addition to these, isn't ImTextureID supposed be a nullptr or set to FontAtlas by default which would make using ImTextureID more safe?
Also I found this and was wondering what's the workaround for this because currently I can't use more than one ImGui::Image with Vulkan (I manually store the current Image Set and check while binding to either use font or this one)
// Since 1.83: returns ImTextureID associated with this draw call. Warning: DO NOT assume this is always same as 'TextureId' (we will change this function for an upcoming feature)inline ImTextureID GetTexID() const { return TextureId; }
The text was updated successfully, but these errors were encountered:
Pikachuxxxx
changed the title
ImTextureID casting to VkDescriptorSet* is not always true
ImTextureID casting to VkDescriptorSet* is not always FontAtlas set or a valid set
Apr 5, 2022
#ifndef ImTextureID
typedef void* ImTextureID; // user data to identify a texture (this is whatever to you want it to be! read the FAQ about ImTextureID in imgui.cpp)
#endif
Version/Branch of Dear ImGui:
Version: 1.83 WIP
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_ImplGlfw_InitForVulkan.cpp + custom renderering engine
Compiler: MSVC
Operating System: Windows 11
My Issue/Question:
I've been trying to make my custom Vulkan backend for ImGui and have been successful in issuing drawcalls myself using
ImDrawData
, the problem is when I pass the VkDescriptorSet* casted asImTexturteID
forImGui::Image()
I use the
ImTextureID curreTexID = pcmd->GetTexID()
to the pointer I passed, but it looks like that it doesn't always point to the Font (I did useImFontAtlas::SetTexID
)or the Image DescriptorSet that I have set, it's not a nullptr or FontAtlas by default which is causing my application to crash, If I manullay verify using If statement for the font Atlas Set by comparing the pointers the descriptorset and ImTextureID it get bound properly, I don't know why it spits out unset values in addition to these, isn'tImTextureID
supposed be a nullptr or set to FontAtlas by default which would make using ImTextureID more safe?Also I found this and was wondering what's the workaround for this because currently I can't use more than one ImGui::Image with Vulkan (I manually store the current Image Set and check while binding to either use font or this one)
The text was updated successfully, but these errors were encountered: