Git Product home page Git Product logo

Comments (7)

elect86 avatar elect86 commented on May 30, 2024

Hi Aurélien,

yeah, sure, it's possible, if you are doing everything yourself, theoretically we could get rid of:

  • lwjgl glfw, openal and opengl (I guess core and stb are mandatory, not sure about jemalloc)
  • jogl in whole

Also, a similar stuff came out few days ago..

We could create a branch for this purpose, since I guess this might benefit also other people..

would you be maybe available to take care of it? :)

from imgui.

Ealrann avatar Ealrann commented on May 30, 2024

I just gave a try, here what I found:

  • I saw that even if I remove some lwjgl dependencies here, they are still needed by UNO. So not sure how could this be managed properly.
  • I guess that the Test_lwjgl.java could be put in other project, to remove some dependencies in the main project.
  • Last but not least, the font looks really heavy, but maybe you needed this one?

from imgui.

elect86 avatar elect86 commented on May 30, 2024

Uh, yeah, uno is using them..

Well, one way for sure would be to manually replace all the uno imports

I guess that the Test_lwjgl.java could be put in other project, to remove some dependencies in the main project.

Honestly I don't like the idea of having the tests in another project, they are quite important as a play ground to try the library features and to fix bugs.

Last but not least, the font looks really heavy, but maybe you needed this one?

Yeah, the whole folder weights 22.6 MB, but one font itselft, ArialUni, is 22.1 MB. It included for the japanese ideograms.

With a potential vk-tiny branch, it would be just a matter of merging from time to time from the master one into that, to keep up with the changes and the updates.

Ps: in your app are you using lwjgl anyway, don't you?

from imgui.

Ealrann avatar Ealrann commented on May 30, 2024

Sorry, I will not maintain that branch myself, my need is not high enough for that, and now I will have to focus on some other project. Just sad that my zip of 40Mo contains 30Mo of UI;
But whatever, I'm still very grateful you made this port !!

Yeah, I use lwjgl, but only the minimal vulkan part. I don't use opengl, nor openal.

from imgui.

chrjen avatar chrjen commented on May 30, 2024

Hi, @Ealrann

If you don't need OpenGL and you don't use any part of this library that depends on it you should be able to simple delete the lwjgl-opengl.jar file and not include it in your project. Of course it will then crash if you call any method in the library which in turn relies on any code inside the lwjgl-opengl.jar file. If you are using gradle instead of manually doing it you should be able to do something like this.

implementation('com.github.kotlin-graphics:imgui:v1.63-beta-00') {
    exclude group: 'org.lwjgl', id: 'lwjgl-opengl'
}

You can do this for e.g. OpenAL as well.

However you seemed mostly concerned about file size. There is also a new alternative version of the library without the extra fonts and should be a lot smaller (~1 MB). It's not part of any release yet, though you can still try it, just add :light behind the version number, again assuming you are using gradle.

Currently only the latest commit has this version, but example.

implementation 'com.github.kotlin-graphics:imgui:383579e83b:light'

from imgui.

Ealrann avatar Ealrann commented on May 30, 2024

Hi @chrjen ,

Oh my god, it's way better with the light branch, and with the "exclude group". Thank you.. Here the one I use for now :

api('com.github.kotlin-graphics:imgui:383579e83b:light'){
	exclude group: 'org.lwjgl', module: 'lwjgl-opengl'
	exclude group: 'org.lwjgl', module: 'lwjgl-openal'
	exclude group: 'graphics.scenery', module: 'spirvcrossj'
}

You seems to focus a lot on the size of the font (and yes, it's important), but don't forget the dependencies. Even in the Windows build, you seems to link to many unneeded jars like openal-linux (??), spirv, armv6hf or macos natives... It's not a big deal, but for the lightweight projects, it's something.

But whatever, your solution totally fit to me, so thank you again :)

from imgui.

chrjen avatar chrjen commented on May 30, 2024

Thank you for the feedback, we'll take that under consideration. If it solved your issue consider closing it.

from imgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.