diff --git a/README.md b/README.md index 51c357e..88aa42f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Mini GL "Framebuffer" Provides an easy way to draw a window from a pixel buffer. OpenGL alternative to other -easy "framebuffer" libraries. +easy framebuffer libraries. Designed to be dead simple and easy to remember when you just want to get something on the screen ASAP! @@ -21,15 +21,38 @@ fn main() { time. You can bring your own timing mechanism, whether it's just `sleep(ms)` or something more sophisticated. +# Get full access to glutin for custom event handling + +You can also "breakout" and get access to the underlying glutin window while still having easy +setup: + +```rust +let mut fb = mini_gl_fb::gotta_go_fast("Hello world!", 800.0, 600.0); + +let GlutinBreakout { + mut events_loop, + gl_window, + mut fb, +} = fb.glutin_breakout(); + +fb.update_buffer(/*...*/); +``` + +# Other features + + - Hardware accelerated buffer scaling (window and buffer can have different sizes) + - Exposes a function for creating a context with glutin in one line + - Exposes a function for creating a VAO, VBO, quad, and blank texture in one line + - If you don't want to use glutin you can **bring your own context** too! + +See the docs for more info. + # Planned Features Listed in rough order of importance and ease (which are surprisingly correlated here!). - Bounds check on `update_buffer` which will currently segfault if you pass the wrong size. - - Provide a way to break out of the `fb` object into the raw backing glutin window and event - loop so that you can easily provide interactivity. - - Shader playground. Add a method for using shadertoy-like fragment shaders to be applied to your submitted pixel data. @@ -38,8 +61,6 @@ Listed in rough order of importance and ease (which are surprisingly correlated alternatives include automatically drawing after running some event handlers and some methods for drawing at intervals (fixed/dynamic delta time). - - Provide a way to bring your own context/window. - - Fully replace and customize the vertex, geometry, and fragment shader, including adding your own uniforms (but probably not adding any vertex attributes). diff --git a/src/lib.rs b/src/lib.rs index da8029f..2f65ba7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,6 +16,9 @@ //! } //! ``` //! +//! The default buffer format is 32bit RGBA, so every pixel is four bytes. Buffer[0] is the top +//! left pixel. +//! //! # Interlude: Library philosophy //! //! All of the internals of this library are exposed. Any fields behind `mini_gl_fb.internal`