# Looking for code examples for Hydra and ImGui

**URL:** <https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451>\
**Category:** Hydra\
**Tags:** rendering, cpp, beginner\
**Created:** [April 17, 2024, 4:59pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451 "2024-04-17T16:59:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlesfleche](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@charlesfleche](https://forum.aousd.org/u/charlesfleche)\
**Post date:** [April 17, 2024, 4:59pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/1 "2024-04-17T16:59:32Z")

</div>

Hi everyone,  
Are you aware of a project that would draw an [ImGui](https://github.com/ocornut/imgui) UI on top of an Hydra render ? I’m looking for code examples.  
Thank you !

---

<div class="post-metadata">

**Author:** ![olihey](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/olihey/32/92_2.png) [@olihey](https://forum.aousd.org/u/olihey)\
**Post date:** [April 17, 2024, 7:11pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/2 "2024-04-17T19:11:25Z")

</div>

The great [usdtweak](https://github.com/cpichard/usdtweak) is using ImGui. Might worth checking it out.

---

<div class="post-metadata">

**Author:** ![charlesfleche](https://avatars.discourse-cdn.com/v4/letter/c/f6c823/32.png) [@charlesfleche](https://forum.aousd.org/u/charlesfleche)\
**Post date:** [April 17, 2024, 7:45pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/3 "2024-04-17T19:45:20Z")

</div>

This is awesome, thank you very much !

---

<div class="post-metadata">

**Author:** ![nporcino](https://avatars.discourse-cdn.com/v4/letter/n/3d9bf3/32.png) [@nporcino](https://forum.aousd.org/u/nporcino)\
**Post date:** [April 17, 2024, 9:15pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/4 "2024-04-17T21:15:44Z")

</div>

usdtweak is awesome, see the also awesome ImGuiHydraEditor! [GitHub - raph080/ImGuiHydraEditor: ImGui Hydra Editor is a USD editor written in c++ with the ImGui and OpenUSD frameworks.](https://github.com/raph080/ImGuiHydraEditor)

---

<div class="post-metadata">

**Author:** ![nburkard](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@nburkard](https://forum.aousd.org/u/nburkard)\
**Post date:** [April 21, 2024, 12:11am UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/5 "2024-04-21T00:11:10Z")

</div>

Ive also had great success with dearpygui \< [GitHub - hoffstadt/DearPyGui: Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies](https://github.com/hoffstadt/DearPyGui) \> imgui python bindings using the node editor functionality. Our team at Meta moved away to full pyQt but before we did, we had dearpygui + usdview (qt based) viewport interacting with each other in python.  
It got us moving and authoring usd connections and relationships really fast despite moving away.

---

<div class="post-metadata">

**Author:** ![benmalartre](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@benmalartre](https://forum.aousd.org/u/benmalartre)\
**Post date:** [April 23, 2024, 12:57pm UTC](https://forum.aousd.org/t/looking-for-code-examples-for-hydra-and-imgui/1451/6 "2024-04-23T12:57:51Z")

</div>

Hello, i work on a project where i use ImGui .  
I go the other way around, i draw the hydra render on top (inside) imgui render

see:

i first render hydra in its own render target:

> <https://github.com/benmalartre/Jivaro/blob/e7f28f5611d620dacc450303c1046b9fb2272a26/src/ui/viewport.cpp#L423C3-L435C25>

then draw the render target texture in imgui

> <https://github.com/benmalartre/Jivaro/blob/e7f28f5611d620dacc450303c1046b9fb2272a26/src/ui/viewport.cpp#L516C4-L528C6>

which let me “composite” on top of the hydra render

> <https://github.com/benmalartre/Jivaro/blob/e7f28f5611d620dacc450303c1046b9fb2272a26/src/ui/viewport.cpp#L524C4-L528C6>

/!\ beware this project is very unstable as it is place for me to experiment with usd /!\
