This is an open-source C++ implementation of deck.gl.
This project is no longer active. It was an experiment to understand what it would take to build a native version of deck.gl. There are discussions about restarting a deck.gl-native effort (this time probably in Rust instead of C++) to help us integrate more non-JavaScript code, better support mobile platforms, and collaborate better with basemaps like maplibre-gl. If you have more than a passing interest in this topic you are welcome to join us at https://www.openvisualization.org/#get-involved.
LineLayer + ScatterplotLayer
SolidPolygonLayer
ScatterplotLayer
This project targeted a minimal, proof-of-concept prototype. This initial deck.gl-native
release is unlikely to meet the requirements of most applications.
ScatterplotLayer
, LineLayer
, SolidPolygonLayer
Many features normally considered fundamental by deck.gl applications are not even being addressed at this stage
Metal
is available on the simulator starting with iOS13To get oriented on the deck.gl software architecture:
A primary concern for the deck.gl-native port, especially once it matures, is how to keep it develop in sync with the various implementations and variants of the deck.gl API, such as the core JavaScript codebase, the pydeck Python API etc.
Currently the two main guidelines are:
Beyond the above rules, it is certainly acceptable C++ and JavaScript APIs to diverge, as long as it makes sense, to ensure they are both natural to use for programmers with backgrounds in the respective programming language. (E.g. functional style UI programming is common in the JS community while C++ programmers on the balance are likely favor a more imperative API style).
Top-level API also includes exception-less counterparts for core functionality across the modules.
The deck.gl-native code bases exposes a set of C++ "module header files" following a <framework>/<module>.h
structure.
probe.gl/core.h
Platform/Compiler detection, assertions, logging and timers math.gl/core.h
Vectors and Matrices math.gl/web-mercator.h
Geospatial math for Web Mercator projection loaders.gl/csv.h
. A CSV table loader loaders.gl/json.h
. A JSON table loader luma.gl/core.h
Model
, AnimationLoop
etc implemented on dawn API luma.gl/webgpu.h
Internal utilities for working with the WebGPU API (adaptions from the dawn repo) luma.gl/garrow.h
GPU-based implementation of Arrow-like API deck.gl/core.h
The core deck.gl classes:\ Deck
, Layer
, View
, etc. deck.gl/layers.h
The initial layer catalog deck.gl/json.h
Classes for parsing (deck.gl) JSON into C++ objects
Remarks:
framework
part of the C++ module header file name corresponds on the JavaScript side to a framework from the vis.gl framework suite, and the module
part corresponds to a submodule in that framework monorepo.All in-memory table processing is based on the Apache Arrow C++ API. This will be almost invisible to applications if they use the provided loaders, however for more advanced table processing applications may need to work directly with the Arrow API.
To get started with Arrow, useful resources might be:
CSV and JSON table loaders are provided as part of the deck.gl library. To support additional table formats, the envisioned approach is to implement additional "loaders" that load various formats and "convert" the loaded tables to Arrow representation.
Graphics Backend: dawn/WebGPUdeck.gl-native is being built on top of the C++ WebGPU API using the dawn framework.
The dawn framework is a compelling choice for deck.gl:
Note that Dawn is still a work in progress (with different levels of support for different platforms - the prototype is only being tested on iOS) and there is some risk with this technology choice. However, given the momentum behind WebGPU in browsers, we feel that the prospects are currently looking good.
This porting project is led by Unfolded, Inc, and currently relies on initial funding provided by a customer as well as external contributions. At this stage, this is not an fully or independenly resourced project. It only targets a proof-of-concept prototype, it does not have a maintenance plan and is not set up to address feature requests etc.
Our hope is to see this project quickly grow into a living part of the core deck.gl project. If this project reaches a sufficient level of completeness / critical mass, the ambition is to make this project part of the main deck.gl project and transfer it to an open governance setup.
Setting up a Development EnvironmentDevelopment can be done on macOS which is the primary environment, or Linux, which is supported mainly for CI testing. (Windows is not a supported dev env.)
NOTE: Building using gcc
currently doesn't work, this is to be updated
If you haven't already configured Xcode:
sudo xcode-select -s /Applications/Xcode.app
(Subsitute with path to your Xcode app if different).For macOS:
brew install clang cmake clang-format lcov
For macOS:
brew install gcc cmake clang-format lcov
scripts/bootstrap.sh
to fetch the dependencies and perform setup. bootstrap.sh
can/should be called after pulling a branch to ensure environment is up to datescripts/build-clang
or scripts/build-gcc
to buildAll the dependencies for macOS and Linux are bundled in a dependency repository that's being used as a submodule. Running scripts/bootstrap.sh
, among other things, fetches all the submodules. Alternatively, you can fetch them by running git submodule update --init --recursive
.
mkdir build
cd build
cmake ..
make -j 16
To use different compilers, set the build options CMAKE_C_COMPILER
and CMAKE_CXX_COMPILER
on the cmake
command line. There is a number of build scripts for different compilers available in scripts
directory.
For Google Test formatted output, run ./deckgl-bundle-tests
. For CTest formatted output, run ctest
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4