Comments (16)
I want to load KTX files within Unity3D (editor and runtime)
With the existing build tools it's not easy to quickly integrate the library though, especially since I only need the KTX loading/transcoding part.
So I forked this repo and created my own CMake configuration (plus some C wrapping code) for this purpose only. It will be used in my Texture loading Unity package
from ktx-software.
Thanks to @atteneder, there is now a CMake build system.
from ktx-software.
build/cmake/linux/{Debug,Release}/CMakeLists.txt
are generated by GYP from the various .gyp
and .gypi
files specifically for Linux. It should not be hand edited.
That said, I am interested in replacing gyp with cmake as the reasons I originally chose gyp no longer hold and Google has stopped supporting it. This would replace all the .gyp
& .gypi
files with one or more CMakeLists.txt files which should probably be in the project root directory, definitely not in the build directory. There are 4 projects: ktxdoc, ktxtests, ktxtools and libktx. I say "one or more" because I am interested in providing Linux distribution packages for ktxtools and libktx and that might require separate CMakeLists.txt for each. I do not know. I have no familiarity with creating distribution packages and limited familiarity with cmake.
from ktx-software.
The entire setup for trying to build this project on Mac was far more complicated than necessary because of the gyp files and how little material is readily available about non-node gyp.
from ktx-software.
@AbandonedCart, did the included xcode projects (build/xcode/{mac,ios}) not work for you? If not what was the issue? I build on the Mac all the time. It's my main development machine. The .xcodeproj files were generated from the gyp files via make xcode
in the project root.
If there is something I should fix in the gyp files, please open a new issue.
from ktx-software.
@MarkCallow Much in the same way I do not like to settle for downloading the compiled binary of something to resolve issues building the source, I would not settle for the .xcodeproj
working a solution for difficulty with .gyp
files. (Edit: Revised to avoid sounding like an accusation)
I am interested in replacing gyp with cmake as the reasons I originally chose gyp no longer hold and Google has stopped supporting it.
I think this is a good idea. The .gyp
files add unnecessary difficulty due to the lack of available support for them.
Hopefully that better explains the purpose of my original post.
from ktx-software.
@AbandonedCart, so your main point is to support replacing gyp with cmake. Thanks for the vote.
Much in the same way I do not like to settle for downloading the compiled binary of something to resolve issues building the source
Did you have issues with make xcode
?
from ktx-software.
It failed for the missing gyp. After a lot of stumbling around trying to figure out if it was something that should have been there or something I needed to install, I ended up finding out how travis handles it and doing that. It seemed to work fine after that.
from ktx-software.
@bradc6 @MarkCallow
Has there been any progress on this? We are currently integrating KTX2 with https://github.com/KhronosGroup/glTF-Compressonator and a regular CMake setup would be helpful. @UX3D-wahlster @UX3D-kanzler
from ktx-software.
There has been no progress on my end. I keep hoping for a volunteer who knows cmake well to step up.
And a note for anyone who stumbles on this thread who is having a problem, like @AbandonedCart with "missing gyp", there are pointers to both GYP and instructions for installing it in the file BUILDING.md in this repo.
from ktx-software.
Thanks for letting us know @atteneder. Hopefully someone can turn it into a more general CMake configuration.
from ktx-software.
@atteneder why is it easier to integrate the library within Unity with a CMake configuration? I know very little about CMake.
from ktx-software.
@atteneder why is it easier to integrate the library within Unity with a CMake configuration? I know very little about CMake.
It's less about CMake, that just happens to be the build tool I'm familiar with. What I needed:
- Unity (on macOS) needs native libraries to be in .bundle format (dynamic libs are usually .dynlib files, just like the GYP Xcode project delivers)
- To make integrating into C# Unity code easier, I like to create a small C wrapper around the KTX functions I need.
- The library binary should be small/stripped to just the things I need.
To achieve this I thought were 3 options:
- Learn GYP and tweak it => did not want to since that takes time and GYP does not seem vital anymore
- Alter the GYP generated projects (Xcode, cmake, etc.) manually and repeat this everytime they are updated in the future => sounds like a lot of work long/mid-term
- Create a new tailor-made CMake configuration
So, option 3 won out.
I may try to add the missing targets (especially the ktxtools) once I've got some time for it.
from ktx-software.
A general CMake list that works out of the box would be much appreciated. Right now libktx is not convenient to integrate in other (CMake) projects.
from ktx-software.
@atteneder could you provide a PR with the changes to limit the library to reading, transcoding and uploading? It's something in the TODO list. If I get a PR you won't have to apply that change in future pulls.
from ktx-software.
@atteneder could you provide a PR with the changes to limit the library to reading, transcoding and uploading? It's something in the TODO list. If I get a PR you won't have to apply that change in future pulls.
Sure. I'll try to do it today/tomorrow.
from ktx-software.
Related Issues (20)
- Error using ktx create --assign-primaries none HOT 6
- [OS X] There are no include files. HOT 3
- Feature request: Tool to create combined image by gathering channels from input images HOT 6
- OptionsSingleInSingleOut does not warn or give error on excess positional parameters
- ktx transcode does not remove existing KTXwriterScParams metadata HOT 4
- Update code for KTX-Spec changes HOT 2
- createDFDPackedPadded creates DFD with bits and padding in the wrong order
- Support R16G16_S10_5_NV format
- Allow A8B8G8R8 PACK32 formats
- Loading KTX1 and KTX2 file on Linux/OpenGL 4.3 leads to weird error if not luch the program with sudo HOT 4
- Project install installs fmt lib HOT 1
- Preceding `ktx` command name with option leads to error HOT 1
- WebGL test gets shader compile error
- Converting transfer functions (using assign-oetf and convert-oetf) HOT 15
- samplePositions possibly incorrect for single-plane 4:2:2 YUV formats HOT 4
- The JNI binding for input swizzling is broken
- No option to apply `zstd`/`zlib` compression via JNI HOT 21
- Improvements for the Java/JNI bindings HOT 4
- Synchronizing auto-generated files with bindings HOT 2
- How to call `CreateFromMemory`? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktx-software.