| Summary: | Expose SDL_ScaleMode and add SDL_SetTextureScaleMode/SDL_GetTextureScaleMode | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Konrad <iryont> |
| Component: | render | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz, sylvain.becker |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | All | ||
| Attachments: | Patch | ||
Added, thanks! https://hg.libsdl.org/SDL/rev/35f99d918ca2 Fixing a compilation error for the GLES renderer: https://hg.libsdl.org/SDL/rev/6bf10b024882 Good job. By accident I did copy that unused variable from OpenGL renderer and since OpenGL ES 1 was not being compiled here (due to OpenGL ES 2) I did not notice it. |
Created attachment 4136 [details] Patch This was something rather trivial to add, but asked at least several times before (I did google about it as well). It should be possible to dynamically change scaling mode of the texture. It is actually trivial task, but until now it was only possible with a hint before creating a texture. I needed it for my game as well, so I took the liberty of writing it myself. This patch adds following functions: SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode); SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode); That way you can change texture scaling on the fly.