Skip to content

Render geometry binding #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 31, 2025
Merged

Conversation

antonilol
Copy link
Contributor

@antonilol antonilol commented Mar 25, 2025

Draft while I check if this covers my use case. It does.

@antonilol antonilol linked an issue Mar 25, 2025 that may be closed by this pull request
@antonilol antonilol requested a review from jagprog5 March 25, 2025 23:08
this allows for faster code and is also needed for SDL_RenderGeometry
and refer to one doc comment instead of duplicating similar ones
- 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
@antonilol antonilol force-pushed the SDL_RenderGeometry branch from a85b726 to 48441c1 Compare March 30, 2025 19:24
@antonilol antonilol marked this pull request as ready for review March 30, 2025 20:50
@antonilol
Copy link
Contributor Author

changed almost the whole pr with ea5e52b

@antonilol antonilol requested a review from jagprog5 March 30, 2025 21:02
@antonilol antonilol merged commit ecd03de into Rust-SDL2:master Mar 31, 2025
17 checks passed
@antonilol antonilol deleted the SDL_RenderGeometry branch March 31, 2025 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SDL_RenderGeometry functionality
2 participants