zaafar / ClickableTransparentOverlay

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

Sharing Image Texture with Unity #53

Closed krulci closed 1 year ago

krulci commented 1 year 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 1 year 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.