Skip to content

Render geometry binding #173

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 3 commits into from
May 18, 2025
Merged

Render geometry binding #173

merged 3 commits into from
May 18, 2025

Conversation

Yoppez
Copy link
Contributor

@Yoppez Yoppez commented May 17, 2025

The most part is copied from Rust-SDL2/rust-sdl2#1472, with the needed edits and additions (like FColor).

impl From<FColor> for Color {
fn from(val: FColor) -> Color {
Color {
r: (val.r * 255.) as u8,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe these should be rounded instead of truncated?

Copy link
Contributor Author

@Yoppez Yoppez May 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. I also thought to check the boundaries, so it becomes something like
r: (val.r * 255.).round().clamp(0., 255.) as u8,

@revmischa revmischa merged commit d57ce1b into vhspace:master May 18, 2025
3 checks passed
@revmischa
Copy link
Collaborator

Thanks!

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.

2 participants