Skip to content
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

Function to change default texture scale mode per renderer #12083

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Oen44
Copy link

@Oen44 Oen44 commented Jan 25, 2025

New functions to set default scale mode for newly created textures per renderer and get current scale mode set for given renderer.

Description

This will save using SDL_SetTextureScaleMode every time we create new texture and want to use nearest-point scale instead of linear. Helpful for pixel art games where everything should be scaled to nearest-point.

  • SDL_SetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode scale_mode)
  • SDL_GetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode *scale_mode)

Existing Issue(s)

#11919

* SDL_SetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode scale_mode)
* SDL_GetDefaultTextureScaleMode(SDL_Renderer *renderer, SDL_ScaleMode *scale_mode)
@slouken slouken added this to the 3.4.0 milestone Jan 25, 2025
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