Files
Antoni Spaanderman ecd03de215 Render geometry binding (#1472)
* 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
2025-03-31 09:20:58 +02:00
..
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2022-05-30 23:52:43 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00
2020-12-08 20:30:47 +01:00