-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Recommended way to display an image #122
Comments
Your rendering function RenderDrawListsFn needs to handle the 'texture_id' flield of ImDrawCmd. texture_id is a void* that you can use to store your own texture identifier / pointer. For example the render loop in the OpenGL2 example store the GL texture identifier (GLuint) into the texture_id field.
DirectX9 render loop:
From this point on in user code you can call ImGui::Image() and pass your texture identifier casted to a void*. To render
If you do that very frequently you may want to create your own function that takes your own texture type to avoid passing size:
|
I'll close that for now. |
Hi,
What is the recommended way to display an image buffer in a widget? For example, I have a buffer obtained from my webcam, how can I display a widget with it?
The text was updated successfully, but these errors were encountered: