Skip to content

Commit 6d65b5b

Browse files
committed
docs: Clean up README.md a little
Signed-off-by: John Nunley <dev@notgull.net>
1 parent ad3bd6d commit 6d65b5b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
Overview
22
==
3-
As the popularity of the library [minifb](https://crates.io/crates/minifb) shows, it is useful to put a 2D buffer/image
4-
on a window in a platform-independent way. Minifb's approach to doing window management itself, however, is problematic
3+
4+
Enables software rendering via drawing an image straight to a window.
5+
6+
Softbuffer integrates with the [`raw-window-handle`](https://crates.io/crates/raw-window-handle) crate
7+
to allow writing pixels to a window in a cross-platform way while using the very high quality dedicated window management
8+
libraries that are available in the Rust ecosystem.
9+
10+
Alternatives
11+
==
12+
13+
[minifb](https://crates.io/crates/minifb) also allows putting a 2D buffer/image on a window in a platform-independent way. Minifb's approach to doing window management itself, however, is problematic
514
code duplication. We already have very high quality libraries for this in the Rust ecosystem
615
(such as [winit](https://crates.io/crates/winit)), and minifb's implementation of window management is not ideal. For
716
example, it occasionally segfaults on some platforms and is missing key features such as the ability to set a window
817
icon. While it would be possible to add these features to minifb, it makes more sense to instead use the standard
918
window handling systems.
1019

11-
Softbuffer integrates with the [raw-window-handle](https://crates.io/crates/raw-window-handle) crate
12-
to allow writing to a window in a cross-platform way while using the very high quality dedicated window management
13-
libraries that are available in the Rust ecosystem.
14-
1520
What about [pixels](https://crates.io/crates/pixels)? Pixels accomplishes a very similar goal to Softbuffer,
1621
however there are two key differences. Pixels provides some capacity for GPU-accelerated post-processing of what is
1722
displayed, while Softbuffer does not. Due to not having this post-processing, Softbuffer does not rely on the GPU or
1823
hardware accelerated graphics stack in any way, and is thus more portable to installations that do not have access to
1924
hardware acceleration (e.g. VMs, older computers, computers with misconfigured drivers). Softbuffer should be used over
2025
pixels when its GPU-accelerated post-processing effects are not needed.
2126

22-
2327
License & Credits
2428
==
2529

0 commit comments

Comments
 (0)