Add SFML example (#133)
* Add SFML example
Adds a rough demo using SFML for rendering.
* Simplifications to SFML example
* Rely on sfml 0.16 rather than a git revision
* Avoid allocating temporary Path
* Take into account margin and spacing
* Directly produce a FloatRect, since it is what SFML needs
* Renamed VertexMesh to QuadMesh
* Use Vertex::with_pos_coords since we always passed Color::WHITE
* Removed TileLayer wrapper, since it added no value
* Removed handling of gid == 0 in Tilesheet::tile_rect
* Update contributors list
* Apply formatting
* Avoid the need to inverse the camera matrix
* De-hardcode the tile size
Also fixes the example a bit, because the map was drawn too small.
* Update workflow
* Try fixing CI issue by removing rust-cache
* Fix CI
* Fix map asset path
* Merge SFML and Rust workflow
* Misc changes
* Merge upstream/master
* Update example to master
* Fix line endings
* Fixed comment
Co-authored-by:
Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Showing
- .github/workflows/rust.yml 5 additions, 3 deletions.github/workflows/rust.yml
- CONTRIBUTORS.md 2 additions, 1 deletionCONTRIBUTORS.md
- Cargo.toml 10 additions, 2 deletionsCargo.toml
- examples/sfml/main.rs 184 additions, 0 deletionsexamples/sfml/main.rs
- examples/sfml/mesh.rs 43 additions, 0 deletionsexamples/sfml/mesh.rs
- examples/sfml/tilesheet.rs 51 additions, 0 deletionsexamples/sfml/tilesheet.rs
Loading
Please register or sign in to comment