Rotate Background?

I have problem. My window is 900x1440 and my texture is 1440x900. When i try to rotate it when i render texture to fill window. Windows is not fitted with texture.
Function that i use is
SDL_RenderCopy(rend, texture, NULL, NULL, 90.0, NULL, SDL_FLIP_NONE);

How to copy texture to show whole texture into window rotated.

SDL_RenderCopy only takes 4 arguments, you mean SDL_RenderCopyEx?

Are you certain your window is 900x1440? Can you explain how it doesn’t fit? Does it overlap on the width, or height, or both? From what I can see, it should work.

Wait, I know…

Try specifying the SDL_Rect dstrect (the 2nd NULL) as the texture dimensions (0,0,1440x900);

If you’re trying to make the window change size, to view the whole texture without scaling, you need to call SDL_SetWindowSize with the dimensions of the image (and swap height and width if you’re rotating).

If you’re just trying to make it show the whole texture rotated, that code should work, but would stretch the texture to fit.------------------------
Nate Fries