Skip to content

fix(ui): upload device hero images so they actually render - #20

Open
ssuyash3000 wants to merge 1 commit into
AmitRajput-Dev:mainfrom
ssuyash3000:fix/device-image-upload
Open

ssuyash3000 wants to merge 1 commit into
AmitRajput-Dev:mainfrom
ssuyash3000:fix/device-image-upload

Conversation

@ssuyash3000

Copy link
Copy Markdown

_deviceTexture() pushed the freshly created ImTextureData straight into
ImGui::GetPlatformIO().Textures, but UpdateTexturesEndFrame() resizes that
list to 0 each frame and refills it from the font atlases plus the registered
user textures. The entry was therefore gone before the renderer backend could
honour ImTextureStatus_WantCreate, and the texture was never uploaded:

  • Release: the product image area is blank; every device falls back to nothing.
  • Debug: IM_ASSERT(tex_id != ImTextureID_Invalid && "ImDrawCmd is referring to ImTextureData that wasn't uploaded to graphics system...") fires.

ImGui::RegisterUserTexture() (imgui 1.92+) adds it to g.UserTextures, which
is what the per-frame rebuild reads from, so the upload request survives.

`_deviceTexture()` pushed the freshly created `ImTextureData` straight into
`ImGui::GetPlatformIO().Textures`, but `UpdateTexturesEndFrame()` resizes that
list to 0 each frame and refills it from the font atlases plus the registered
user textures. The entry was therefore gone before the renderer backend could
honour `ImTextureStatus_WantCreate`, and the texture was never uploaded:

- Release: the product image area is blank; every device falls back to nothing.
- Debug: `IM_ASSERT(tex_id != ImTextureID_Invalid && "ImDrawCmd is referring to
  ImTextureData that wasn't uploaded to graphics system...")` fires.

`ImGui::RegisterUserTexture()` (imgui 1.92+) adds it to `g.UserTextures`, which
is what the per-frame rebuild reads from, so the upload request survives.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant