Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec479b2

Browse filesBrowse files
leodAngelOnFira
andauthored
N47: posh (rust-gamedev#1408)
Co-authored-by: Forest Anderson <forestkzanderson@gmail.com>
1 parent c86c828 commit ec479b2
Copy full SHA for ec479b2

File tree

2 files changed

+32
-0
lines changed
Filter options

2 files changed

+32
-0
lines changed

‎content/news/047/index.md

Copy file name to clipboardExpand all lines: content/news/047/index.md
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,38 @@ contribute for everyone, be it with suggestions, bugs or PRs.
238238

239239
## Library Updates
240240

241+
### [posh]
242+
243+
![Example code written with posh, simplified from the hello triangle
244+
example](posh.jpg)
245+
246+
[`posh`][posh] is a crate that seamlessly integrates a graphics library with an
247+
embedded functional shading language. It is a proof of concept that aims to
248+
demonstrate that graphics programming can be both type-safe and ergonomic.
249+
250+
With `posh`, shaders are written in plain Rust (with some caveats). Procedural
251+
macros are only required for defining custom vertex and uniform types.
252+
253+
The core component of `posh` is the `Program<U, V, F>` type, which acts as a
254+
bridge between the shading language and the graphics library. This type
255+
represents a compiled shader and serves as the entry point for draw calls. By
256+
explicitly carrying the types `U` (uniform interface), `V` (vertex shader
257+
interface), and `F` (fragment shader interface), `posh` enables static
258+
verification, ensuring that the data provided in draw calls matches the shader's
259+
signature.
260+
261+
For simplicity, `posh` currently targets OpenGL ES 3.0. Although it is an
262+
experimental project, its authors hope to inspire the community to further
263+
explore how static typing can elegantly bridge the gap between host code and
264+
shader code.
265+
266+
For more details, check out the [examples][posh-examples] or the authors' [blog
267+
post][posh-blog].
268+
269+
[posh]: https://github.com/leod/posh
270+
[posh-examples]: https://github.com/leod/posh/tree/main/examples
271+
[posh-blog]: https://leod.github.io/rust/gamedev/posh/2023/06/04/posh.html
272+
241273
## Popular Workgroup Issues in Github
242274

243275
<!-- Up to 10 links to interesting issues -->

‎content/news/047/posh.jpg

Copy file name to clipboard
114 KB
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.