Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Further Reading

The examples, ordered by complexity

git clone https://github.com/Akihiro120/pebble
cd pebble/examples/wgpu_showcase
cargo run
ExampleWhat it adds
ecs_basicsThe ECS core, no window
clear_screenA window, pebble::wgpu, nothing drawn
hello_triangleThe one hand-rolled-Backend example — a triangle via raw wgpu
textured_quadTexture loading, material instances, via pebble::wgpu
orbit_cameraStartup-system GPU resources, depth buffer, orbiting camera — the source for Custom GPU Resources
wgpu_showcaseThe full pebble::wgpu material/mesh/texture pipeline, running
compute_basicsA compute pass that doubles a buffer and reads it back — the source for Compute Pipelines
advanced_renderingThe textured quad from textured_quad, rendered with MSAA and a render bundle

Every example except hello_triangle uses only pebble::wgpu — no raw wgpu type anywhere, matching everything else in this book. hello_triangle is the deliberate exception: the reference for implementing your own Backend (see Windows and Backends). ecs_basics and wgpu_showcase are the two worth having open in another tab while reading this book.

Further reading

  • API docs: docs.rs/pebble-engine — every type and method this book covers, plus the ones it didn’t have room for.
  • The Readme: a denser, single-page version of the ECS core and the pebble::wgpu overview — good as a quick reference alongside this book.
  • learn-wgpu: for wgpu concepts this book takes as given — bind groups, pipelines, shader stages — sotrh.github.io/learn-wgpu covers them from first principles.

Pebble is under active development — expect the API to keep moving. If something in this book drifts out of date, it’s a bug in the book, not a reason to distrust it wholesale: open an issue.