
MiniFB: Small cross platform library to create framebuffer to draw pixels in - ingve
https://github.com/emoon/minifb
======
jms55
For Rust, there's the very similar
[https://github.com/parasyte/pixels](https://github.com/parasyte/pixels).
Unlike MiniFB, it doesn't handle windowing for you (you use winit/sdl2/glfw).

It's built over wgpu-rs, so it runs on Vulkan/Metal/DirectX12/WEBGPU. You can
compile to wasm, and then run your game in the browser, which is neat. And you
can add custom shaders on top.

I used it for my game, and was very happy with it
[https://github.com/JMS55/sandbox](https://github.com/JMS55/sandbox)

~~~
ChickeNES
There's already a version of minifb for Rust though:
[https://github.com/emoon/rust_minifb](https://github.com/emoon/rust_minifb)

~~~
qchris
I've used this library on a few occasions on personal projects, and once the
necessary system deps are installed (just a few apt-get commands that are
well-documented), it's worked pretty flawlessly. Fairly low boilerplate, good
examples--I haven't had any regrets on deciding to use it.

------
marcodiego
I still miss the simplicity of Borland's BGI and somewhat happy with direction
SDL_bgi is taking:
[http://libxbgi.sourceforge.net/](http://libxbgi.sourceforge.net/) . Latest
version has support to Broland's .CHR fonts and seeing those glyphs rendered
on modern hardware after 30 years is very cool.

Disclaimer: I'm a contributor.

~~~
iamgopal
....the amount of times I have typed initgraph(&gdriver,&gmode,"");

------
albertzeyer
Looks very similar to SDL ([http://www.libsdl.org/](http://www.libsdl.org/)).
What's the difference?

~~~
the_pwner224
SDL has more features: joystick/gamepad input, image loading from PNG/etc,
scaling/rotating/overlapping images onto the framebuffer, multiple windows,
touch events, audio, and a lot more[0]. And is GPU accelerated for 2d, or 3d
with opengl.

It's more of a generic application framework which works well for games,
whereas this seems to be more of put a window on a screen, fill pixels, and
get mouse/KB/resize events.

[http://wiki.libsdl.org/Introduction](http://wiki.libsdl.org/Introduction)

SDL also has stuff that lets it work nicely with HiDPI screens.

~~~
albertzeyer
I think SDL also mostly started like that (just a window where you fill
pixels, and very basic kb/mouse events). You can also very easily use it just
like that (which is why this looked so similar to me like MiniFB).

Then over time, more and more people used it, and had special request. E.g. to
be able to setup an OpenGL context. Use gamepad input (as this was used mostly
for games). Multiple windows. Etc.

------
gameswithgo
this is a great crate for doing quick prototypes, testing image processing and
graphics ideas, or just to go back to 1990

------
swiley
One of the only nice things about X11 is that getting a drawing context and
drawing lines and (unwrapped) text on it is super easy.

------
tonetheman
Feels a lot like raylib or sdl to me. Both of those projects are more about
games and have other functionality.

------
ShizzleNauts
So frustrating to see a graphics related tool not have any example screenshots
in the README.

------
avmich
Is there something similar for JVM?

~~~
t0astbread
Isn't Graphics2D quite capable?

~~~
avmich
Something cross-platform would be nice, and without some quirks (e.g. can draw
a line fine, but to draw a pixel an extra object layer is needed).

------
jbirer
nice. I am writing a hobby OS for RISC-V and I might implement this in it.

