Controlling interpolated scaling |
Andreas Falkenhahn
Guest
|
Hi,
so SDL_RenderCopy() can do automatical scaling for me but is there also a way to turn interpolation on or off? AFAICS it's currently always scaling without any interpolation. Is there a way to turn interpolation on for SDL_RenderCopy()? -- Best regards, Andreas Falkenhahn mailto: _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Controlling interpolated scaling |
Sik
|
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
Not sure at which point it takes effect though (maybe it takes effect only the moment a texture is created). _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Controlling interpolated scaling |
Pallav Nawani
|
Yes, you need to set the hint BEFORE creating the texture
Pallav Nawani IronCode Gaming Private Limited Website:Â http://www.ironcode.com Twitter:Â http://twitter.com/Ironcode_Gaming Facebook: http://www.facebook.com/Ironcode.Gaming Mobile: 9997478768 On Fri, Aug 15, 2014 at 1:43 AM, Sik the hedgehog wrote:
|
|||||||||||||
|
Controlling interpolated scaling |
Andreas Falkenhahn
Guest
|
Thanks, this seems to work fine. Is this a per texture setting or a global one?
On 15.08.2014 at 05:01 Pallav Nawani wrote:
-- Best regards, Andreas Falkenhahn mailto: _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||||
|
Controlling interpolated scaling |
Sik
|
2014-08-15 7:15 GMT-03:00, Andreas Falkenhahn:
That's the part I said I didn't know It does seem like it's intended to be a global setting but it could be getting checked just when the textures get created (which would make it per texture). I'm not even sure if this changes depending on the renderer. If you just want to interpolate everything just set the hint before you create the renderer. It's going to be safer. PS: forgot to mention, the software renderer will *not* do interpolation as far as I know (not sure). Then again, if SDL ends up falling back to that one you probably don't want to use interpolation either (at this point lack of performance will be your biggest issue). It should only happen if something is wrong anyway (unless you explicitly ask for it). _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Controlling interpolated scaling |
Andreas Falkenhahn
Guest
|
On 15.08.2014 at 12:49 Sik the hedgehog wrote:
Looking at the source code I think it's local to the texture, at least for the OpenGL backend that is. -- Best regards, Andreas Falkenhahn mailto: _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||
|