Commit Graph

195 Commits

Author SHA1 Message Date
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
Antoni Spaanderman
829071af17 suppress warnings: unknown edition and unexpected cfg (#1471) 2025-03-26 09:07:07 +01:00
Cobrand
0b740d968b Merge pull request #1407 from nathanvoglsam/use_ios_framework
Add new use_ios_framework for linking to SDL2.framework on iOS
2024-06-15 16:06:26 +02:00
Cobrand
380c6f1c98 Changes to Readme 2024-06-14 17:02:52 +02:00
Nathan Voglsam
d5d9ea1ab4 Add new use_ios_framework for linking to SDL2.framework on iOS 2024-06-14 18:50:14 +10:00
Cobrand
4d5a1d9bc4 Prepare for 0.37.0 2024-06-13 18:27:12 +02:00
Cobrand
0ab402a616 fix bindgen 2024-06-13 15:37:12 +02:00
Cobrand
726613ed81 Merge pull request #1385 from Noahnoah55/master
Upgrade to raw-window-handle 0.6
2024-06-13 11:51:47 +02:00
Cobrand
6e0eca4fab test fix vcpkg 2024-06-12 19:39:13 +02:00
Noahnoah55
fd63cab008 Upgrade to raw-window-handle 0.6, imperfectly 2024-04-10 22:27:30 -04:00
Cobrand
2ab81ae1d9 Update VCPKG version 2023-11-22 19:11:01 +01:00
Cobrand
41f9ac5fa2 Update changelog, prepare for 0.36 2023-11-22 18:59:28 +01:00
Cobrand
6bf36f7258 Update comment for VCPKG version 2023-09-20 11:45:44 +02:00
Cobrand
7092ebb6fc Update VCPKG ver in Cargo.toml 2023-09-20 11:44:17 +02:00
Louis Johnson
c3d67f5dcd upgraded wgpu version to 0.15 for example and updated example code to match version 2023-04-16 14:36:45 +10:00
Nuckal777
31e830ede9 Update raw-window-handle to 0.5.0 2022-12-16 23:58:14 +01:00
Cobrand
bd4d9ada67 attempt fix CI; update vcpkg 2022-08-31 17:21:08 +02:00
Kaphula
28834018c1 Update wgpu to 0.12 and fix raw-window-handle-with-wgpu example program. 2022-05-03 04:01:24 +03:00
Cobrand
b36d04851a Update to 0.35.2 2022-02-06 19:13:27 +01:00
Joe Clay
9dab73d585 Update raw-window-handle to 0.4 2021-12-19 17:35:34 +00:00
Cobrand
7c1c2104c7 Update to 0.35.1 2021-10-25 19:19:33 +02:00
Oleg Andreev
e5fd890b3f Added back accidentally removed default feature. 2021-10-25 10:15:27 +03:00
Cobrand
9d99d7f68a Update changlog and version to 0.35.0 2021-10-13 19:05:01 +02:00
Cobrand
6a31d312ab Merge pull request #1131 from Yamakaky/sensor-api
Add sensor API implementation
2021-10-10 20:05:42 +02:00
Mikaël Fourrier
38e8261988 wgpu 0.10 + strip dependencies 2021-09-15 22:48:53 +02:00
Mikaël Fourrier
c261a0df2e add hidapi as default feature 2021-09-15 21:57:42 +02:00
Mikaël Fourrier
67fe292f19 First try at sensor API implementation 2021-08-21 13:55:56 +02:00
Mike Waychison
4038cd5bfc Update vcpkg rev to unblock Windows
Something happened that broke the `vcpkg.exe install` invocation for
sdl2 on Windows when using github actions with `windows-latest`.

I have not been able to determine what is actually causing the break,
however updating to a more recent version of vcpkg seems to have fixed
the issue, so that is what is proposed here.

The commit selected is current top of tree.

Original report: https://github.com/mcgoo/cargo-vcpkg/issues/9
2021-08-01 12:26:20 +00:00
Cobrand
a3b4e206f1 Update changlog and version to 0.34.5 2021-04-27 18:33:47 +02:00
Mike Waychison
26979a1958 Point at upstream vcpkg rev again
vcpkg has been updated to fix the link ordering of the brotli libraries.

This means that vcpkg rev can now point at upstream again. Version
a267ab1 is current HEAD.
2021-04-16 13:06:51 -07:00
Cobrand
18a3a9b0ba Revert some dev dependencies 2021-04-02 21:22:33 +02:00
Cobrand
d2ce2c373a Update to 0.34.4 2021-04-02 21:22:33 +02:00
waych
68ae17ccb5 Debug ci (#1085)
* Add verbose flag (-v) to `cargo vcpkg build` in CI
* Fix CI so that it works for all platforms
2021-04-01 13:56:15 +00:00
Luna Catkins
6d495071d0 Cargo.toml: bump patch version number. 2020-12-23 11:53:06 +01:00
Cobrand
7b303daa6a Update to 0.34.3 2020-08-24 23:14:02 +00:00
Cobrand
dcd311dc06 Update to 0.34.2 2020-06-27 10:38:17 +00:00
Jim McGrath
8cfeb7e309 support linking to libraries from a vcpkg installation 2020-06-11 00:25:02 -05:00
Cobrand
755f163e81 Update to 0.34.1 2020-06-07 09:22:39 +00:00
adsasddsda
92d75c7d91 Link Readme for crates.io 2020-06-05 07:55:39 +00:00
Cameron Mann
e1028ed682 Update raw-window-handle-with-wgpu example to use wgpu 0.5
* 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
2020-05-26 23:14:52 -06:00
Cobrand
1dabcf815b Update to 0.34 2020-04-25 13:41:13 +00:00
Guillaume Gomez
1f64ff2730 Enable features for docs.rs 2020-04-25 14:17:29 +02:00
Logan McGrath
92b4309564 adding an example 2020-01-30 12:15:59 -08:00
Logan McGrath
eedfc2a1f2 No more bindgen! Using separate bindings for SDL_SysWMinfo 2020-01-30 12:15:59 -08:00
vlad
efe7d9b8b7 Add HasRawWindowHandle trait for Window 2020-01-30 12:15:59 -08:00
Cobrand
761b5b39c7 Change version to 0.33 2020-01-24 21:13:40 +00:00
Dmytro Meleshko
51ea9ecdb9 Remove num-traits altogether 2019-12-31 12:08:03 +02:00
Dmytro Meleshko
eb7ea5bec2 Use the num-traits crate directly instead of num 2019-12-30 00:55:11 +02:00
Cobrand
e865c8f464 Add events example, add missing events 2019-11-06 11:50:42 +00:00
Dmytro Meleshko
f8359c14fa Remove dependency on the rand crate 2019-11-05 22:57:26 +02:00