-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Basis Universal support #660
Comments
I've been following Basis for a while and it would indeed be nice to have in LWJGL. Unfortunately, there's no C API available yet. |
Thanks for the response @Spasi. Perhaps once we get C++ support with Panama we will be good to go (crossing my fingers that it happens within our lifetime). |
@tlf30 |
@Illithidek I was not aware that KTX-Software had JNI bindings, thank you for bringing it to my attention. Looking at the repo it looks like a very recent addition: KhronosGroup/KTX-Software#556. Do you know if the bindings are complete and released? Or if they are going to be included into a release in the near future? |
Well I was going to test these bindings in near future, but I can share what I've been able to determine :). From what I've seen the releases are pretty slow(last one was 1 year ago). When it comes to bindings, I don't think there's big misses when it comes to base usage. You can just look over https://github.com/KhronosGroup/KTX-Software/blob/master/include/ktx.h (probably methods with prefixes ktxTexture2_ will mostly interest you), and corresponding bindings in the https://github.com/KhronosGroup/KTX-Software/tree/master/interface/java_binding/src/main/cpp (for methods with ktxTexture2_, JNI version is KtxTexture2.cpp). |
Great, thank you for the information. I can dive in deeper when I get home in a week. I am currently at work (I work at a remote location in the artic circle). This does look like it will be a good alternative to adding the bindings to LWJGL. |
I finally returned to the topic, today quite quickly I managed to build a project from the master branch with result of 3 files: For testing I used PVRTexTool to convert *.png to BASIS UASTC(Basis Universal format), and saved it in *.ktx2. |
I am currently working with Khronos on getting the jni bindings published to maven central. There is an issue open for it over in their repo if anyone would like to comment. |
Hey @tlf30, @Illithidek, I somehow missed this discussion about KTX. Had a quick look now and it seems that Basis is nicely integrated into KTX and there's a (fully featured?) C API exposed for it. Am I wrong? If that's the case, I'd much rather add bindings for KTX, instead of just Basis. Note that this would make sense even in the presence of an official binding. (LWJGL-style API + javadoc, snapshot builds, easy download / Maven artifacts, jlink-able modules, etc.) |
@Spasi they are working on an official JNI binding, but I personally think that an LWJGL style binding would be better. I have not evaluated the C api yet. My understanding is that Universal Basis support is included, along with other formats such as jpg, png, and other compressed/encoded formats, but for the use of KTX files (AFAIK Univeral Basis was created as part of the KTX format, or vice versa). Perhaps it would make more sense for them to drop the jni binding they are working on and just have LWJGL, and you have more experience with properly bundling the natives and automating binding generation. Tagging @MarkCallow from Khronos. |
I'll address a few points...
The binding is complete and will be in the 4.1.0 release. I am waiting for a new code-signing certificate for signing the windows binaries and installers. Once I have that I'll make the 4.1.0 release. The release will include KhronosGroup/KTX-Software#621. The binding was contributed so I am not deeply familiar with it.
I plan to work on this once 4.1.0 is released.
This is a binding to the included basisu software used for the sole purpose of creating a test comparing the result of decoding a basisu file vs a KTX v2.0 file with the same content. It is not complete and definitely not intended for use outside the KTX project.
I am not familar with LWJGL. The name suggests it has something to do with OpenGL. The only part of libktx that is OpenGL related is the
KTX and libktx only support formats supported by GPUs (i.e. uncompressed and block-compressed formats) plus the transcodable Basis Universal formats so it does not support jpp, png or anything similar. Basis Universal and KTX v2.0 evolved together. Transcodable formats are the invention of Rich Geldreich at Binomial. When we started KTX v2 we planned to use some of Rich's earlier attempts but, thanks to funding from Google, Rich was able to open source Basis Universal so we incorporated that. |
The latest build (3.3.2-snapshot+6) now includes KTX bindings. Both the full library (write/encode support) and the |
It would be great to get Basis Universal support in LWJGL for texture compression.
https://github.com/BinomialLLC/basis_universal
More information can be found here: https://www.khronos.org/assets/uploads/apis/KTX-2.0-Launch-Overview-Apr21_.pdf
Thanks,
Trevor
The text was updated successfully, but these errors were encountered: