genfy
genfy

Reputation: 83

Invalid conversion from int to SDL_RendererFlip

I'm trying to flip an image both horizontally and vertically. It doesn't seem to be working though:

SDL_RenderCopyEx(renderer, ResourceManager::GetInstance().getTexture("rpg_pack"), &wood_corner, &rect, 0, 0, SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL);

I'm running SDL, image, mixer, ttf and net.

Upvotes: 3

Views: 960

Answers (1)

marirena
marirena

Reputation: 308

Try

SDL_RendererFlip flip = (SDL_RendererFlip)(SDL_FLIP_HORIZONTAL | SDL_FLIP_VERTICAL); 

SDL_RenderCopyEx(renderer, ResourceManager::GetInstance().getTexture("rpg_pack"), &wood_corner, &rect, 0, 0, flip);

Upvotes: 2

Related Questions