Skip to content

Rendering renderer image to an ImGui window #346

@NikolayKanchevski

Description

@NikolayKanchevski

I would first like to thank you for this incredible binding!

However, I am having trouble adding a custom image to ImGui. I am using pure Vulkan and have created a custom ImGui controller, as the one shown on the repository is specifically for Veldrid. I would be grateful if you could point me to how I can have an image passed to an ImGui window without having the current problem I have - for some reason, the font image gets combined with the image I want to draw, creating a mess. Same thing for the font itself - the letters are using a combination of the font image and the image I want to draw. Here is what I am seeing:

https://imgur.com/ofGCmb3

What I do is the following:

  1. Create the Vulkan image
  2. Create a descriptor for the image using a universal sampler
  3. foreach (var imageDescriptor in imageDescriptors) vkCmdBindDescriptorSets() and vkCmdDrawIndexed()

Then, when I want to display an image I do:
if (ImGui.Begin()) ImGui.Image((IntPtr) someVulkanImage.handle)

Thank you in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions