Skip to content
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

Accessing ImDrawData.CmdLists #4

Open
Moe2912 opened this issue Feb 19, 2023 · 0 comments
Open

Accessing ImDrawData.CmdLists #4

Moe2912 opened this issue Feb 19, 2023 · 0 comments

Comments

@Moe2912
Copy link

Moe2912 commented Feb 19, 2023

I am having problems accessing ImDrawData.CmdLists as it should be an array, but it does not seem to be one. Am I missing something?

Edit: I worked around it with the following code:


Dim dd = Runtime.InteropServices.Marshal.PtrToStructure(Of DearImguiSharp.ImDrawData.__Internal)(draw_data.__Instance)

For n = 0 To draw_data.CmdListsCount - 1
    Dim cmd_list = Runtime.InteropServices.Marshal.PtrToStructure(Of DearImguiSharp.ImDrawList.__Internal)(Runtime.InteropServices.Marshal.ReadIntPtr(dd.CmdLists + IntPtr.Size * n))

....
Next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant