Skip to content

add gamma_ramp_arrays and calculate_gamma_ramp #1451

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
Mar 5, 2025

Conversation

antonilol
Copy link
Contributor

  • gamma_ramp_arrays is similar to gamma_ramp, but returns the gamma ramps as an array of 3 arrays, this way no heap allocations are made and users get a compile time guarantee that each ramp contains 256 values
  • calculate_gamma_ramp wraps SDL_CalculateGammaRamp, which calculates the gamma ramp for a gives gamma value, see https://wiki.libsdl.org/SDL2/SDL_CalculateGammaRamp

@jagprog5
Copy link
Contributor

jagprog5 commented Mar 4, 2025

@antonilol looks good to me. resolve merge conflict (that I caused, sorry) and I will approve. please comment on this thread because then I get a notification

- gamma_ramp_arrays is similar to gamma_ramp, but returns the gamma
  ramps as an array of 3 arrays, this way no heap allocations are made
  and users get a compile time guarantee that each ramp contains 256
  values
- calculate_gamma_ramp wraps SDL_CalculateGammaRamp, which calculates
  the gamma ramp for a gives gamma value, see
  https://wiki.libsdl.org/SDL2/SDL_CalculateGammaRamp
@antonilol
Copy link
Contributor Author

rebased, there were already conflicts from other PRs, with changelog of course

@antonilol
Copy link
Contributor Author

By the way, I am also a maintainer now

@jagprog5
Copy link
Contributor

jagprog5 commented Mar 5, 2025

By the way, I am also a maintainer now

yessir! I recommended you.

@jagprog5 jagprog5 merged commit 0e6fbe3 into Rust-SDL2:master Mar 5, 2025
16 of 17 checks passed
@antonilol antonilol deleted the gamma-ramp branch March 5, 2025 14:04
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