0x0ade / ImGuiCS

Heavily modified fork of ImGui.NET + SDL2-CS, XNA and FNA samples
MIT License
7 stars 0 forks source link

When opening the solution, SDL2-CS project does not load. #1

Closed BurgerBob closed 7 years ago

BurgerBob commented 7 years ago

Because the project file is not here.

0x0ade commented 7 years ago

You need to clone the repository recursively to access SDL2-CS properly. Thanks for reminding me about that, I'll keep this issue open until I added this to the README.md.

In the meantime, you can just drop in SDL2-CS into the SDL2-CS directory as if it were part of this repository: https://github.com/flibitijibibo/SDL2-CS/tree/498a565edacfa460e298f2545ae1ca04d913a39c

0x0ade commented 7 years ago

... although telling from the other issues, you won't need this anyway. SDL2-CS isn't used by ImGuiXNA or ImGuiFNA.

On a semi-related note: I haven't tested the XNA version as much. Please tell me if something doesn't work in the XNA version. Something I know of already is that there are some minor inaccuracies when rendering, but I haven't tracked those down yet and they're not critical.

BurgerBob commented 7 years ago

Ok my bad for the recursive clone, I just had to double click on SDL2-CS in Source Tree for some reason.

I'm taking the occasion to introduce myself. I'm Cyrille Lagarigue, programmer on Streets of Fury EX, a game on Steam that runs both on XNA and FNA (you can chose at startup): http://store.steampowered.com/app/350910/Streets_of_Fury_EX Here is a Steam key if you want to check it out : FF4HB-Z4QVQ-TVVP2

I'm still working on the engine for future projects, and I'm adding editor capabilities. I had a problem with FNA and was chatting with Ethan Lee, and when I said that I used ImGui he told me about ImGuiSDL2CS. So thanks for working on this project, that is going to be very useful to me ! I had my own mod of ImGui.Net in my project, but it was pretty shitty, it creates a lot of garbage, etc ... (I'm giving you the code,most stuff are in ImGui.XNA.cs but I doubt that there is anything interesting for you, but just in case).

I have the same rendering problem as you have, with the "w"s and the "m"s that are cut.

So, I'm fairly new to open source development using GitHub, but I may do some pull requests if I find things :)

2017-08-31 19:17 GMT-04:00 Maik Macho notifications@github.com:

... although telling from the other issues, you won't need this anyway. SDL2-CS isn't used by ImGuiXNA or ImGuiFNA.

On a semi-related note: I haven't tested the XNA version as much. Please tell me if something doesn't work in the XNA version. Something I know of already is that there are some minor inaccuracies when rendering, but I haven't tracked those down yet and they're not critical.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/0x0ade/ImGuiSDL2CS/issues/1#issuecomment-326445285, or mute the thread https://github.com/notifications/unsubscribe-auth/AEsoHJXZ7OmTwXctcQDs9TlUoao_90Ttks5sdz75gaJpZM4PJciQ .

0x0ade commented 7 years ago

This is really great to hear - I just began working on this about a week ago. Great to hear that it's being used in a game 😄

My original plans were to use ImGui.NET, too, but I saw things that could be improved when creating ImGuiSDL2CS.

About ImGui.NET and ImGuiCS creating garbage: It's due to how we interact with the native cimgui library. We wrap the "native" structs minimally so you can access data without unsafe blocks. My goal builds upon that - it's to avoid exposing pointers if wrapping them is possible, and abusing the nature of this to build more fitting wrappers in some cases: https://github.com/0x0ade/ImGuiCS/blob/master/ImGuiCS/src/ImVector.cs

For example, ImWrappedPtrVector allows you to use ImFontAtlas.Fonts without unsafe code in your own project as it resolves and then wraps the fonts internally. With ImGui.NET, you have to use the NativeFontAtlas to access your fonts manually. I assume that will change in ImGui.NET as it grows, too.

I haven't really checked memory usage yet, but I assume this is what you meant by "it creates a lot of garbage." I'll see what I can do to reduce it.

I'll open up a discussion issue for each "version" of ImGuiCS so we can discuss any XNA issues in a proper place. I'll also update to ImGui 1.51 quite soon, I just need to get my hands on cimgui 1.51 macOS binaries so it doesn't break compatibility with macOS.

Good luck with your work on the engine and thanks for the Steam key! I'll check your game out!

0x0ade commented 7 years ago

I've closed this issue. The notes have been added to the README.md.

I've also fixed the rendering issue. For any further discussion, check #6

Thanks for your feedback!

BurgerBob commented 7 years ago

About the garbage creation, I was talking about my implementation (I created a vertex buffer per frame), not yours ! :)

Anyway, garbage creation is a non issue in that case for me, because ImGui is mainly used for development tools.

2017-09-02 7:47 GMT-04:00 Maik Macho notifications@github.com:

I've closed this issue. The notes you've mentioned have been added to the README.md.

I've also fixed the rendering issue. For any further discussion, check #6 https://github.com/0x0ade/ImGuiCS/issues/6

Thanks for your feedback!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/0x0ade/ImGuiCS/issues/1#issuecomment-326739369, or mute the thread https://github.com/notifications/unsubscribe-auth/AEsoHLsyIJkN5sreV1UWTrto4-MjZTUBks5seUBGgaJpZM4PJciQ .