SDL_RenderCopy => automatic size croping?

Hi to all,
when I use RenderCopy to copy an image to my current renderer, and some parts of the image goes off screen, is there some trimming done by the SDL-libary itself?

I don´t want any accidental memory crashes.

At the moment I calculate the source x-offset & y-offset, width & height for source & destination before calling RenderCopy, for safety.

Thanks for any reply :slightly_smiling_face:
friendly greetings
alex

You can safely use SDL_RenderCopy — it does the texture clipping, so there won’t be any memory issues.

2 Likes