I'm experimenting with android SDL 2.0, however I encountered a problem that I just can't solve. My problem is that I try to make a 1080*1920 picture as the background of my application. I create it in photoshop, but whenever I try to start the app on my phone, the image quality is much worse.
Here's an example.You can't really see on the picture how bad it is, but looking on my phone screen, it is way worse:
The code I'm using:
int main(int argc, char *argv[])
{
int w, h;
KEP kep;
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Surface *surface;
SDL_CreateWindowAndRenderer(0, 0, 0, &window, &renderer);
SDL_GetWindowSize(window, &w, &h);
surface = IMG_Load("hatter.png");
kep.w = w;
kep.h = h;
kep.texture=SDL_CreateTextureFromSurface(renderer, surface);
SDL_FreeSurface(surface);
SDL_Rect destination={0, 0, kep.w, kep.h};
SDL_RenderClear(renderer);
SDL_RenderCopy(renderer, kep.texture, NULL, &destination);
SDL_RenderPresent(renderer);
return 0;
}
The "kep" is just a structure with the texture, width, and height of the picture, declared earlier. I'm using SDL_image extension right now, but it didn't work with the SDL_LoadBMP()
either.
What can I do to don't end up in such a bad quality?
Thanks a lot!