You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm trying to use this plugin on my Rust backend with gdext, I can call GetImGuiPtrs perfectly fine,
but when it comes to setting the current imgui context with the pointer returned by that function, it seems that the pointer is actually invalid, it's just pointing to a garbage memory, and when I try to destroy it (just to figure out if it's actually ImGuiContext* or not), the whole app just crashes.
Here's the code that I wrote.
let obj = ClassDb::singleton().instantiate("ImGuiSync");unsafe{let ptrs:PackedInt64Array = obj.call("GetImGuiPtrs",&[Variant::from(CStr::from_ptr(ImGui::GetVersion()).to_str().unwrap()),Variant::from(size_of::<ImGuiIO>()asi32),Variant::from(size_of::<ImDrawVert>()asi32),Variant::from(size_of::<ImDrawIdx>()asi32),Variant::from(size_of::<ImWchar>()asi32),]).to();ImGui::DestroyContext(transmute(ptrs[0]));}
I use this example , this, and this for reference
So I assume that I need to call GetImGuiPtrs
The text was updated successfully, but these errors were encountered:
Hey,
So I'm trying to use this plugin on my Rust backend with gdext, I can call
GetImGuiPtrs
perfectly fine,but when it comes to setting the current imgui context with the pointer returned by that function, it seems that the pointer is actually invalid, it's just pointing to a garbage memory, and when I try to destroy it (just to figure out if it's actually
ImGuiContext*
or not), the whole app just crashes.Here's the code that I wrote.
I use this example , this, and this for reference
So I assume that I need to call
GetImGuiPtrs
The text was updated successfully, but these errors were encountered: