-
-
Notifications
You must be signed in to change notification settings - Fork 13
Improve item and texture bindings #43
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
Comments
The signature of |
Yes, because imgui accepts textures supported natively by the GL backend you're using. |
Most of your questions are related to the design of the original imgui implementation. I'll recommend you to take a look at some FAQs provided by https://github.com/ocornut/imgui and see how things are going. Like, loading image needs to be completely implemented by yourself (using DirectX API or OpenGL API, for example). I'm already doing this for you -- on Linux/macOS it's: Lines 73 to 124 in a0b56fd
Lines 45 to 58 in a0b56fd
For Windows it's: Lines 49 to 108 in a0b56fd
I assume you're not asking for |
So the problem is jimgui uses DirectX (9, if you're asking for the version. But 11 is planned) on Windows, while the reimplementation from kotlin-graphics is completely based on some OpenGL thing (thus rendering details can be customized as well). |
For the listBox thing, if you have an idea in mind, don't hesitate to tell me (or pull me). |
This sounds like you're asking for an API to release textures. Contribution is also welcomed. |
/cc #11 |
I'm working on porting an app from the (frankly shoddy) Kotlin ImGui port, and while overall the change has been a positive one (if painful), I've run into a couple issues with binding support.
The first thing I noticed not being bound was the
JImGui.listBox
function, along with theitemSize
anditemAdd
functions. The listBox was trivial to reimplement, and I figured out that theJImGui.rect
method creates an item, so I'm using that temporarily.I'm also using a lot of custom
BufferedImage
textures (I'm using it to render reference glyphs to an image to draw in imgui), but the texture support in jimgui doesn't quite support this. Firstly, in order to export aBufferedImage
to ImGui I would have to write it to a byte array as a .png for ImGui to read, which seems far from ideal. Secondly, I update these textures relatively frequently, so the fact that there isn't a method to replace or release a texture after it's created means old textures would just end up piling up.This isn't really hampering development much however, since at the moment I've got workarounds for the missing
JImGui
bindings and I'm not working on the section that uses the textures at the moment.The text was updated successfully, but these errors were encountered: