* make `pixels::Color` have a stable representation (`repr(C)`)
this allows for faster code and is also needed for SDL_RenderGeometry
* add binding for SDL_RenderGeometryRaw
* add example of advanced use of `Canvas::render_geometry`
* update unsafe trait docs to include a needed guarantee
and refer to one doc comment instead of duplicating similar ones
* rework almost everything
- the macro was very hard to get sound, auto deref has to be prevented somehow
- the unsafe traits could not be implemented for types defined in other crates
the unsafety must be kept simple, users now only need to provide the
right offsets, which core::mem::offset_of does
update example
* add convenience impls for &Vec<_> to VertexIndices
* update example to use 2 ways of using render_geometry_raw, and use render_geometry
* mention alignment in safety comments in render_geometry example
* fix and improve docs
* update changelog
* Remove WindowWrapper since wgpu now uses raw-window-handle correctly
on OSX which also lets us remove the objc dependency
* Add futures dependency to handle parts of the wgpu API that are now
asynchronous
* Flip y coords in vertex shader to keep triangle oriented the same way
since wgpu flipped their y-axis
* Fix various other errors resulting from breaking API changes in wgpu
This basically provides an API to access Mix_QuickLoad_WAV and
Mix_QuickLoad_RAW with one caveat – thie API takes ownership of the
buffers, while Mix_QuickLoad_* functions don't. Since Rust-SDL2 wraps
Mix_Chunks in its own structure with its own buffer ownership flag it's
easy to work around that and deallocate the buffer when Chunk is
dropped.
There are few design considerations here:
* Taking ownership of the buffer. I couldn't come up with a way to
get a Chunk based on a buffer while still keeping the code safe and
making sure that as long as Chunk is alive the buffer is also alive
*and* not making the change be terribly involved and disruptive
* What's the best way to take an ownership of a buffer passed as a
parameter? I came up with Box<[T]> as it seems universal enough,
but I expect a more idiomatic Rust way may exist.
I modified the mixer demo to show how the API is used, a beep is
generated when no sound file is passed to the example.