Commit graph

39 commits

Author SHA1 Message Date
Jay Oster 294a875c8e
Update dependencies and prepare release (#177) 2021-06-17 20:00:24 -07:00
Jay Oster b76ae1f7bc
Update winit to 0.25 (#168)
- Update winit
- Update egui_winit_platform
- Update imgui_winit_support
- Fix hyperlink and resize in `egui-winit` example
2021-05-29 02:18:48 -07:00
Jay Oster f238814d12
Update wgpu to 0.8 (#160)
- Also update other dependencies
2021-05-07 23:52:11 -07:00
Jay Oster 316400e6e0
Prepare release 0.3.0 (#159)
* Try to fix CI by updating MSRV

* Prepare release
2021-05-05 00:48:25 -07:00
JMS55 f2d4a4f084
Upgrade to wgpu 0.7 (#134)
Co-authored-by: Jay Oster <jay@kodewerx.org>
2021-02-28 15:29:36 -08:00
Jay Oster 0a893d6eff
Update all dependencies (#130) 2021-01-05 18:20:36 -08:00
Jay Oster b6526c27e5
Remove pixels-dragons (#114)
- I don't want to publish this crate.
- Can't publish pixels 0.2.0 if it depends on an internal unpublished crate.
- This requires allowing unsafe code, and removing the safety dance badge.
2020-08-20 17:19:40 -07:00
Jay Oster 265ba2e5b3
Render API v2 (#112)
* WIP: Render API v2

* Fix doctests

* Expose all of PixelsContext (#110)

* Fix ScalingRenderer::new() taking &mut Device

* Replace getters with direct access to &mut PixelsContext

* Fix wrong reference type

* Fix unneeded mut

* Remove unnecessary mutable borrow, resurrect the shorter getter methods

* Initial port to wgpu master (0.6)
Surface creation is broken (see examples)
Does not support compressed textures

* Fix SurfaceTexture and examples

* Add support for compressed texture formats

* resize doesn't need mutability

* Update documentation

* Update wgpu

* Prepare release

* Goodbye Travis! Thanks for all the fish

Co-authored-by: JMS55 <47158642+JMS55@users.noreply.github.com>
2020-08-20 16:49:19 -07:00
Jay Oster 1dd84cb412
Prepare 0.1.0 (#105) 2020-07-19 14:15:27 -07:00
Jay Oster 6c37916a56
Remove the workaround for metal 0.18.1 (yanked) (#104) 2020-07-19 13:52:00 -07:00
Jay Oster 1191379388
Temporary workaround to fix build on macOS (#101) 2020-07-19 03:29:47 -07:00
JMS55 4991d2cddc
Switch from futures-executor to pollster (#84) 2020-05-29 05:29:12 -07:00
Jay Oster de21862c77
Prepare 0.0.4 (#79) 2020-05-21 20:04:12 -07:00
Aeledfyr c96e46d3d4
Add a method to convert cursor coords to pixel coords (#77)
* Add a method to convert cursor coords to pixel coords

* Add method `window_pos_to_pixel` to Pixels struct
   * Converts cursor / window physical coordinates to pixel coords

* Fix formatting

* Return result rather than clamping pixel coordinates

* Use transformation matrices to convert from cursor coord to pixel

* Adds a struct ScalingMatrix that manages the creation and usage
  of the transformation matrix used in the renderer.
* Added an inverse function on ScalingMatrix - 4x4 matrix inverse
  (This should probably use a library, but it doesn't seem worth
  adding a dependancy for one function)

* Optimize matrix multiplication for cursor position calculation

* Use ultraviolet for matrix and vector math

* Add suggested changes

This keeps the split between usize and isize
This also changes the input cursor position to f32, because it was
immediately cast to an f32 for the transformations.
2020-05-20 21:37:29 -07:00
Jay Oster 809d3f6dd9
Update badges (#73)
- crates.io badges are now deprecated: https://github.com/rust-lang/crates.io/issues/2436
2020-04-18 15:20:48 -07:00
Jay Oster 774b749145
Slim dependencies (#71) 2020-04-13 21:06:01 -07:00
Jay Oster 9de2383712
Fix dependency bloat (#67)
* Move all examples to individual crates

* CI: Add libsdl2

* Use Ubuntu bionic for updated libsdl; 2.0.8

* Clippy

* libudev-dev is a dependency of libsdl2-dev

* Clippy

* Remove unnecessary dev-dependency

* `winit` is actually used in unit tests

* Fix a typo

* Move `simple-invaders` crate
2020-04-13 10:12:18 -07:00
Bernardo Meurer 246375f0e9
treewide: bump dependencies (#60) 2020-04-12 23:13:40 -07:00
Jay Oster b38363a602
Fix CI (#58)
* Replace bespoke Error impl with `thiserror`

* cargo update

* Finix winit version in dev-dependencies
2020-03-17 20:36:08 -07:00
fuckwit c5718cc041 Remove Unsafe in macro.rs (#43)
* remove unsafe slice::from_raw_parts

this should be a way to remove the unsafe code in the Spirv Deref impl.
Not sure how it affects performance yet.
I will take a look at the bytecode and see if maybe the compiler is
smart enough to optimize that away.

* change renderers to accomodate new Deref

Let the deref return a `Vec<u32>` instead of a slice reference. This
should not hurt performance too much as this will be done a finite
amount of times att startup.

* replaced deref with normal impl

* fixed endianness, fixed offset + rustfmt

* bump version

* fixed clippy lints

* respect the target endianness

* use wgpu::read_spirv()

* remove an unneccessary allocation of a vec

* move borrow into macro
2019-11-19 21:27:55 -08:00
Jay Oster bb898d78de
Add minimal-sdl2 example (#48) 2019-11-19 19:58:21 -08:00
Jay Oster 8061ce0ea4
Reorganize dependencies (#46)
* Reorganize dependencies

* Enable logging in the minimal-winit example

* Fix a very minor bug in the minimal-winit example
2019-11-19 19:37:36 -08:00
Jay Oster a92adf1b12
Add explicit clippy deny all, and forbid unsafe code (where possible) (#38) 2019-11-06 21:16:25 -08:00
Thom Chiovoloni e0225c145d Add a conways game of life example (#37)
* Add a conways game of life example

* Rustfmt conway example

* Respond to review feedback (p_width/p_height)

* Use line_drawing instead of manual bresenham

* Optimize count_neibs

* Remove inline(never) leftover from when profiling

* Bring back wrapping behavior (without regressing perf)

* Fix missing bounds check
2019-11-05 23:15:58 -08:00
Jay Oster 17c6054f40 Bump version 2019-11-03 22:28:00 -08:00
Jay Oster d97f57cb79 Fix the maintenance badge 2019-11-03 22:12:56 -08:00
Jay Oster 84d35e1205
Update wgpu to 0.4.0 (#35)
- Closes #16
- Closes #32
2019-11-03 22:07:57 -08:00
Jay Oster 0792d47ae7
Add badges for crates.io (#34) 2019-11-03 16:55:17 -08:00
Jay Oster 703773f35d
Exclude extraneous files from crate (#33) 2019-11-02 22:44:10 -07:00
Jay Oster 28f927e153
Switch from rand_core to randomize (#31)
- For #7
2019-11-02 15:29:09 -07:00
Jay Oster 7844c15a77
Add gamepad support (#28)
* Add gamepad support

* Try to fix the build
2019-10-28 01:03:03 -07:00
Jay Oster 5795fa7943
Add include_spv!() macro, donated by Ralith (#26) 2019-10-27 19:50:15 -07:00
Jay Oster b18690f19f
Clean up event handling with winit_input_helper (#21)
* Clean up event handling with winit_input_helper

- Closes #20

* QoL improvements
2019-10-21 22:34:12 -07:00
Jay Oster a7802453ec
Update dependencies (#17)
* Update dependencies. Fixed #14

* Fix CI

* Update locked dependencies
2019-10-20 17:32:11 -07:00
Jay Oster 383b0d83ff
Replace vk-shader-macros with pre-compiled GLSL. Fixes #9 (#10) 2019-10-13 21:43:30 -07:00
Jay Oster 3b7638a012 Initial simple-invaders WIP
- Currently animates two flavors of invader in their usual formation
- Lots left to do, but this is a good start
2019-10-06 02:24:07 -07:00
Jay Oster 2ec43fccd1 Cleanly separate the two texture dimensions
- The pixel buffer dimensions
- The surface texture dimensions
2019-10-01 22:00:37 -07:00
Jay Oster 337241c866 Switch to vk_shader_macros 2019-09-29 17:40:05 -07:00
Jay Oster cc4976079b Initial commit.
- Just a copy of the wgpu `hello-triangle` example for now... more to come!
2019-09-25 23:07:30 -07:00