Hey guys, how i can invert a image in SDL Texture?
To reuse sprite sheets to move to the left.
Hey guys, how i can invert a image in SDL Texture?
To reuse sprite sheets to move to the left.
Assuming SDL 2...
When rendering, use SDL_RenderCopyEx. Use SDL_FLIP_HORIZONTAL as the final parameter to flip the sprite horizontally.
See SDL_RendererFlip for the other values you can use.
What the diference between RenderCopy and RenderCopyEx?
SDL_RenderCopyEx just has some more options -- you can rotate the sprite around a given point, as well as flip the texture.
Other than that, they're identical, as far as I know.