mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-04 10:07:58 +00:00
Clarification on ImTextureRef and calls like ImGui::Image() #8783
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#8783
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Version/Branch of Dear ImGui:
Version 1.92, Branch: master
Back-ends:
Python bindings integration
Compiler, OS:
Windows 10, Linux, macOS
Full config/build information:
GLFW backend, all OSs.
Details:
My Issue/Question:
I'm working on Python bindings and trying to think how to model the new ImTextureRef in the Python API.
I've read the FAQ on what are ImTextureID/ImTextureRef and also the image loading and displaying wiki page.
I get that when I have a texture and its ID tex_id, I can call
ImGui::Imagewith it likeImGui::Image((ImTextureID)tex_id, ...). This works because the texture ID is implicitly converted to an ImTextureRef with its constructorImTextureRef(ImTextureID tex_id).I can't quite wrap my head around the intended use of ImTextureRefs though.
Other than the above implicit conversion, are ImTextureRefs something that'd get normally constructed in user code? Apart from accessing font canvases like
io.Fonts->TexRef, all image-rendering cases I can imagine would be served byImTextureIDalone.