Skip to content

Commit

Permalink
Merge a5ad92c into 266b727
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Mar 6, 2024
2 parents 266b727 + a5ad92c commit 0e6b803
Show file tree
Hide file tree
Showing 11 changed files with 212 additions and 348 deletions.
18 changes: 11 additions & 7 deletions docs/api-guide/gpu/gpu-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ rendering is done with the underlying `Renderpipeline`

A major feature of any GPU API is the ability to issue GPU draw calls. luma.gl has been designed to offer developers full control over draw calls as outlined below.

## Tutorials

The luma.gl documentation includes a series of tutorials that show how to render with the luma.gl API.

## Drawing
Note that the luma.gl documentation includes a series of tutorials that explain how to render with the luma.gl API.

### Creating a RenderPipeline

Expand All @@ -33,14 +29,22 @@ pipeline.setUniforms({
});
```

Create a `VertexArray` to store buffer values for the vertices of a triangle and drawing
### Drawing

Once all bindings have been set up, call `pipeline.draw()`

```typescript
const pipeline = device.createRenderPipeline({vs, fs});

pipeline.draw({vertexArray, ...});
// Create a `VertexArray` to store buffer values for the vertices of a triangle and drawing
const vertexArray = device.createVertexArray();
...

const success = pipeline.draw({vertexArray, ...});
```

### Transform Feedback (WebGL)

Creating a pipeline for transform feedback, specifying which varyings to use

```typescript
Expand Down
Loading

0 comments on commit 0e6b803

Please sign in to comment.