RenderCopy or RenderCopyEx

Hi everyone,

What’s the difference between the following two calls, and is there a reason I should prefer one over the other?

SDL_RenderCopy(renderer, texture, NULL, NULL)
SDL_RenderCopyEx(renderer, texture, NULL, NULL, 0, NULL, SDL_FLIP_NONE)

I’m asking because I’m building a higher-level framework on top of SDL and I was wondering if can always just call SDL_RenderCopyEx, or if there are cases where I should prefer SDL_RenderCopy

I’ve also noticed that SDL_RenderCopyExF delegates to SDL_RenderCopyF when no transformation is required:

The answer is right there in the question. If that’s all you’re doing, just call SDL_RenderCopy. It’s smaller and simpler. But if what you’re trying to render won’t work without non-default values for those extra parameters, well, that’s when it’s good to have a bigger API available that can take more detailed information in its input.

I’m working in Swift, so my function calls are already much cleaner and simpler. I also have no need for separate functions, as I can just use parameters with default values. So I’m left wondering whether I should differentiate between Copy and CopyEx in my implementation.

Given that the implementation of SDL_RenderCopyExF bothers to check and delegate to SDL_RenderCopyF if possible, and that there are separate QueueCopyEx and QueueCopy functions, I get the impression that there’s a difference (in performance?) between the two.