zaafar / ClickableTransparentOverlay

A library for creating transparent overlay using windows API & ImGui.NET
Apache License 2.0
87 stars 33 forks source link

Sharing Image Texture with Unity #53

Closed krulci closed 9 months ago

krulci commented 9 months ago

I am using this with Unity. I would like to present a Texture loaded by Unity main thread to an ImGui.Image. How would I be able to do this? I kept getting the

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
zaafar commented 9 months ago

No idea, I have never used unity, however, I would assume you would have to pass the texture to the graphic device (https://github.com/zaafar/ClickableTransparentOverlay/blob/master/ClickableTransparentOverlay/ImGuiRenderer.cs#L221) on which imgui is rendering.

NOTE: This lib is using https://github.com/amerkoleci/Vortice.Windows API for the graphic device.

Closing the issue as it's not related to the purpose of this library, but feel free to continue commenting on closed issue, I will reply.