Just throwing this out there (sdl 2.0)

I guess I should've put this on the sdl forums, I will if you guys cant do it.
here it is:
optimizedImage = SDL_ConvertSurfaceFormat( loadedImage );
I get an error from it.
I was trying to convert lazyfoo's tutorial into sdl 2.0, to understand it.
I can show more code if you would like :1
http://wiki.libsdl.org/SDL_ConvertSurfaceFormat
You need to pass two more arguments.
optimizedImage = SDL_ConvertSurfaceFormat( SDL_Surface* loadedImage, Uint32, SDL_PIXELFORMAT_UNKNOWN );
Like this?
Nope.
optimizedImage = SDL_ConvertSurfaceFormat( loadedImage, SOME_PIXEL_FORMAT, 0);
The last argument should always be 0.
I think the format should be the one to which you are converting the image, and IIRC the pixelFormat of the screen is used. Otherwise I have no clue of which to use.
Thank you!
Topic archived. No new replies allowed.