Closed
Description
I see SampleBase has ImGui integrated, but it doesn't have support for user images or custom font textures.
A working example of this for NRI would be really useful, and I guess this would be the most convenient place to do it.
Ideally the Descriptor*
would be used as the ImTextureID
, but I'm not sure how to make that work with NRI's design.
I'm currently very inexperienced with NRI, but integration is clearly not as simple as:
nri::Descriptor* image = (nri::Descriptor*)drawCmd.GetTexID();
if (image)
{
nri::DescriptorRangeUpdateDesc descriptorRangeUpdateDesc[] = {
{&image, 1},
{&m_Sampler, 1}};
NRI.UpdateDescriptorRanges(*m_DescriptorSet, 0, helper::GetCountOf(descriptorRangeUpdateDesc), descriptorRangeUpdateDesc);
}
NRI.CmdSetScissors(commandBuffer, &rect, 1);
NRI.CmdDrawIndexed(commandBuffer, {drawCmd.ElemCount, 1, indexOffset, vertexOffset, 0});
(As UpdateDescriptorRanges()
is immediate but CmdDrawIndexed()
buffered.)
Since the descriptor set part of NRI sort of resembles Vulkan, perhaps this issue is relevant: ocornut/imgui#914
Metadata
Metadata
Assignees
Labels
No labels