Skip to content

Currently only a playground for rust, wgpu, openlayers web mapping combo

License

Notifications You must be signed in to change notification settings

codeart1st/wgpu-layers

Repository files navigation

Preview

image


WebGPU mapping renderer for OpenLayers
Currently only a playground for rust, wgpu, openlayers web mapping combo

Build the project

wasm-pack build --release --all-features --target web

Next goals

  • Fill
    • Initial support
  • Line
    • Initial support
    • Anti aliasing
    • Line joins
    • Line caps
  • Points
    • Initial support
    • Shapes
  • Move polygon triangulation to worker threads
  • Architecture overhaul
    • Combine tiles in buckets with same material
    • Split code in smaller chunks
  • CI
    • Initial
    • Deployment
    • Publishing
  • OpenLayers integration
    • Smooth frame sync

Run a native example

cargo run --example window --target `rustc -vV | sed -n 's|host: ||p'`

Run tests

Native unit tests

LIBGL_ALWAYS_SOFTWARE=true cargo test --target `rustc -vV | sed -n 's|host: ||p'` -- --nocapture

WASM Browser Integration tests

wasm-pack test --chrome --release --features console_log,console_error_panic_hook --test '*'

Useful environment variables

Name Example
WGPU_BACKEND gl
LIBGL_ALWAYS_SOFTWARE true
WINIT_UNIX_BACKEND x11
VK_ICD_FILENAMES /usr/share/vulkan/icd.d/lvp_icd.x86_64.json