Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a callback for customizing how textures are set during rendering #2528

Closed
wants to merge 1 commit into from

Conversation

kudaba
Copy link
Contributor

@kudaba kudaba commented May 2, 2019

Context:
DX12 (and I think Vulkan) have a much more complicated resource management system. This change enabled better integration with existing render systems. For DX12 it can help prevent having multiple calls to SetDescriptorHeaps in a frame which can be a costly operation.

Changes:

  • The only change to imgui core is just adding a function pointer to ImGuiIO. It's up to the user + render backend to support it.
  • Only implemented for DX12 since it's the only backend I can test. Updated to only try to set texture if it changed (and after a reset state request). Prevent creating font texture if it's already set.

… rendering.

DX12: Only generate the Font texture if it doesn't already exist. Only set texture if it actually changes.
These changes can enable better integration to existing rendereres by ensuring that all ImTextureID objects are the same type as defined by the user.
@ocornut
Copy link
Owner

ocornut commented Jul 28, 2019

Why are you closing this ?
edit sorry just saw the other issue now!

@kudaba kudaba deleted the set_texture_callback branch May 9, 2020 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants