I'm currently working on a project in which I render pictures raw. That is I use simple IMG_LoadTexture(), SDL_RenderCopy(). I want the program to be able to zoom in/out and textures to be scaled to screenwidth/height. I googled it but most of the answers for this question was outdated. Can I achieve this in SDL2. If not what's the way of doing this.
By using SDL_RenderCopy you can do all the zoom in/out or scaling stuff, by using non
null values for the
Here is the prototype of the function :
int SDL_RenderCopy(SDL_Renderer* renderer, SDL_Texture* texture, const SDL_Rect* srcrect, const SDL_Rect* dstrect)
So you just need to create two
SDL_Rect and setup them accordingly.