A C++ library for producing Scene Layer Package (SLPK) files. Currently it does not provide reading / validating capabilities, this is planned for the future. For a test program please see here.
-Create SLPK from elevation image(PNG) and color image(PNG)
There is a number of third-party libraries needed for i3slib to build and run:
- zlib
- libjpeg There's no public git repository for the project. Today it seems like instead of the original libjpeg everyone is using libjpeg-turbo - SIMD-enabled fork of libjpeg, API & ABI compatible. This is the version our 3rdparty project (see below) installs.
- libpng The project home page has no references to a public git repo, but this one seems to be the "official" one.
- draco
- etc2comp
- lepcc
- jsoncpp
Due to some historical reasons jsoncpp sources are included directly in the source tree, so you don't need to perform a separate install. (This may change in the future).
The rest of the dependencies need to be present in 3rdparty
directory. You can download, build and install them manually, but it is recommended to do this by performing a CMake build on projects/3rdparty
(see instructions below).
NB: the only library from the above list that has an external dependency is libpng, and its only dependency is zlib.
Start Visual Studio, choose "Open folder" command, point to projects/3rdparty
. A CMake project will open. Select a configuration to build. Run "Project -> Generate Cache", then "Build -> Build All".
You can build everything with Clang instead of the MSVC compiler, select "x64-Clang-" configurations for that. NB: you'll need to have the C++ Clang tools for Windows component installed.
$ mkdir -p build/3rdparty
$ cd build/3rdparty
$ cmake ../../projects/3rdparty
$ cmake --build .
The CMake script downloads the source code for all third-party dependencies, builds them and installs into the 3rdparty
directory. After the build process completes3rdparty
should contain subdirectories draco, etc2comp, lepcc, libjpeg, libpng, zlib
.
NB: the current version of the 3rdparty build script relies on ExternalProject_Add() feature, which has some peculiarities. An alternative to consider is using git submodules to checkout the third-party repositories explicitly, in a more controllable manner.
NB: In a typical Linux distribution some of the libraries listed above (zlib, libjpeg, libpng) and their development headers can be easily installed from packages available in the distribution. On most systems zlib, libjpeg and libpng are installed system-wide with the base system setup. Future implementation build options would allow use of existing instances of basic libraries, which would avoid downloading and building them.
Open the sdk/build/i3s.sln
solution. It contains three projects:
i3s_static
- builds i3s library as a static libraryi3s
- builds i3s library as a DLLdemo
- a sample application demonstrating a basic workflow of SLPK generation using the library
Select configuration and build the solution.
Start Visual Stusio, choose "Open folder" command, point to the root of the i3slib source tree. A CMake project will open. Select a configuration to build. Run "Project -> Generate Cache", then "Build -> Build All". The build will produce i3s DLL and the demo application executable.
You can build everything with Clang instead of the MSVC compiler, select "x64-Clang-" configurations for that. NB: you'll need to have the C++ Clang tools for Windows component installed.
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
By default, the Release configuration is built. You can specify the build configuration (Debug or Release) with CMAKE_BUILD_TYPE option:
$ cmake . -DCMAKE_BUILD_TYPE="Debug"
$ cmake --build .
The library should build correctly with GCC 8+ or Clang 6+. The code uses C++17 features, so you need an appropriate release of libstdc++ (the one coming with GCC 8 is good). To build with particular compiler, do something like this before the build:
export CXX=/usr/bin/clang++-9
or use -DCMAKE_CXX_COMPILER option at configuration step:
$ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
$ cmake --build .
- Have never built for / tested on 32-bit platforms yet. Please report if you have any issues. We are going to add 32-bit build configuration.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
Please find licensing information here.