JOML-CI / JOML

A Java math library for OpenGL rendering calculations
MIT License
715 stars 101 forks source link

Move primitives to another library #274

Closed pollend closed 3 years ago

pollend commented 3 years ago

If joml is dropping support for primitives. could they be moved to another library? I'm thinking something along the lines of: joml-primitives. in terms of primitives I don't really see a need for integer types since I see the implementation to be very case by case. I would still like to use these but they do seem different given the scope of the library?

https://github.com/JOML-CI/JOML/pull/246

httpdigest commented 3 years ago

I am leaning towards having the client of JOML (i.e. game/engine) handle primitive types for themselves in their own library/sourcebase. But I also have no problem with introducing a new library with the geometric primitives and also the Intersection classes.

skaldarnar commented 3 years ago

I think we would publish our interpretation of primitive handling to be usable by others in that case 🤓 .. or would contribute to a JOML side-lib for this purpose 🙃

In general, if we can help improving JOML we'd like to do so. Do you have some kind of roadmap, or is it more considering PRs on a case-by-case base? How much do you know about the JOML user base? I found a couple of other projects using it, would be interesting to get their opinion on this, too, I guess.

IntegratedQuantum commented 3 years ago

We(from Cubyz) don't use any of the geometric primitives. And we don't plan on using them in the future.

pollend commented 3 years ago

the primitives could be moved to another library with the same namespace to avoid any dramatic changes. It's just a matter of setting up the repo under this org and migrating in all the classes.

pollend commented 3 years ago

@httpdigest I wanted to ask when you would have some time to setup another repo and start moving the primitives over. Any other long term plans in regards to what you think about these primitives and what you would like to do? would like to know so I can plan out changes from my end with Terasology.

https://github.com/pollend/joml-primitives

httpdigest commented 3 years ago

@pollend I've now prepared a separate repo/artifact like you did which only contains the geometric primitives classes, and removed them from JOML's base artifact. Now, I just wait for Travis to finally build and publish that so that I can push the code for the joml-primitives repo which will then get built and published via GitHub Actions as org.joml:joml-primitives:1.9.26-SNAPSHOT. I had to use a different package org.joml.primitives instead of the base package org.joml (which I would've prefered to be 100% compatible) but Java 9 Module System does not allow multiple modules to export the same package, while also one module depending on that same package.

httpdigest commented 3 years ago

org.joml:joml-primitives:1.9.26-SNAPSHOT is now up on oss.sonatype.org New repo: https://github.com/JOML-CI/joml-primitives