Skip to content

Commit

Permalink
N47: posh
Browse files Browse the repository at this point in the history
  • Loading branch information
leod committed Jul 22, 2023
1 parent 656c5ca commit 42f1339
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions content/news/047/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,38 @@ If needed, a section can be split into subsections with a "------" delimiter.

## Library Updates

### [posh]

![Example code written with posh, simplified from the hello triangle
example](posh.png)

[`posh`][posh] is a crate that seamlessly integrates a graphics library with an
embedded functional shading language. It is a proof of concept that aims to
demonstrate that graphics programming can be both type-safe and ergonomic.

With `posh`, shaders are written in plain Rust (with some caveats). Procedural
macros are only required for defining custom vertex and uniform types.

The core component of `posh` is the `Program<U, V, F>` type, which acts as a
bridge between the shading language and the graphics library. This type
represents a compiled shader and serves as the entry point for draw calls. By
explicitly carrying the types `U` (uniform interface), `V` (vertex shader
interface), and `F` (fragment shader interface), `posh` enables static
verification, ensuring that the data provided in draw calls matches the shader's
signature.

For simplicity, `posh` currently targets OpenGL ES 3.0. Although it is an
experimental project, its authors hope to inspire the community to further
explore how static typing can elegantly bridge the gap between graphics code and
shader code.

For more details, check out the [examples][posh-examples] or the authors' [blog
post][posh-blog].

[posh]: https://github.com/leod/posh
[posh-examples]: https://github.com/leod/posh/tree/main/examples
[posh-blog]: https://leod.github.io/rust/gamedev/posh/2023/06/04/posh.html

## Popular Workgroup Issues in Github

<!-- Up to 10 links to interesting issues -->
Expand Down
Binary file added content/news/047/posh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 42f1339

Please sign in to comment.