WGPU How to use WGPU This is a brief, high-level view of how to use WGPU. TERMS Adapter An object that gets all GPUs. Bind group A group of bound external data. Layout Usually specifying formats (binary layout) of textures and related. Pipeline A graphics pipeline to be used. Shader Code which can modify all vertices and pixels of triangles (fragments). Render pass Combine a pipeline with data to render. Queue The job queue to submit the render pass to. SEQUENCE OF EVENTS Get adapter to get all GPU devices Request a device from adapter to get a GPU with certain description Create bind group layout configuration Create graphics pipeline layout configuration Compile shader source Create bind group for external data used in the shader source Create the pipeline with the layout, bind group and shader Create render pass { Set pipeline Set bind group Set index buffer Set vertex buffer Draw indexed vertices } -> Submit to queue NOTES