SDL Texture Invert

Started by
2 comments, last by Lactose 8 years, 7 months ago

Hey guys, how i can invert a image in SDL Texture?

To reuse sprite sheets to move to the left.

Advertisement

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.

Hello to all my stalkers.

What the diference between RenderCopy and RenderCopyEx?

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.

Hello to all my stalkers.

This topic is closed to new replies.

Advertisement