Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
PixEngine
Summary
pix_engine
is a cross-platform graphics & UI library for simple games,
visualizations, digital art, and graphics applications written in Rust,
supporting SDL2 (and soon Web-Assembly!) renderers.
The primary goal of this library is to be simple to setup and use for graphics or algorithm exploration and is not meant to be as fully-featured as other, larger graphics libraries.
It is intended to be more than just a toy library, however, and can be used to
drive real applications. The Tetanes NES emulator, for example uses
pix_engine
for rendering, window and event handling.
Getting Started
Creating an application is as simple as implementing the only required method of the AppState trait for your application: AppState::on_update which gets executed as often as possible by default. Within that function you'll have access to a mutable PixState object which provides several methods for modifying settings and drawing to the screen.
AppState has several additional methods that can be implemented to respond to user and system events.
Here's an example application:
use *;
;
Crate features
Utility features
- serde -
Enables Serialize/Deserialize implementations for most enums/structs.
serde
support for const generics is still pending, so many structs are not serializable just yet.
Renderer features
- opengl -
Forces
sdl2
to useopengl
as its renderer. This feature is disabled by default, allowingsdl2
to use whichever renderer it defaults to on the target system. For example, macOs defaults tometal
.
Known Issues
See the github issue tracker.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Contact
For issue reporting, please use the github issue tracker. You can contact me directly here.
Credits
Implementation heavily inspired by OneLoneCoder and his amazing olcPixelGameEngine project.
Also heavily influenced by p5js.