Small assets on high resolution SDL_Window |
Alvin Beach
Guest
|
Hello all,
I've noticed that on high resolution displays (e.g. Dell XPS13 laptop and Samsung Galaxy Tab PRO) that my assets (e.g. icons, images, text, etc.) render very small. I'm just curious what others do in these situations? I've poked around in the SDL wiki, Google and, in the case of Android, the Android source in SDL2, but haven't found a clear way to manage this. For instance, the Tab PRO has a resolution of 2560x1600 and all my widgets images (via SDL_image) and text (via SDL_ttf) are extremely tiny. On the Dell XPS13, the effect wasn't too bad, so I just increased the font size as the images weren't too small. Is SDL_RenderSetLogicalSize() the way to handle this? If so, do you just call SDL_RenderSetLogicalSize() when the actual SDL_Window is "too large"? Or, in the case on Android, is there some magical setting in AndroidManifest.xml that I could use to "normalise" the SDL_Window across devices? Correct me if I am wrong, but I'm thinking that this is an issue with the monitor/display rather than with the platform. I would prefer a solution that would work on both the Dell XPS13 and Android. But, maybe that isn't possible? Many thanks. Cheers, Alvin _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Small assets on high resolution SDL_Window |
Alvin Beach
Guest
|
On Sun, Mar 1, 2015 at 9:17 PM, alabouza wrote:
Thanks for the feedback! In the end I gave SDL_RenderSetLogicalSize() a try. In my situation, my widgets hug the edges of the window and are relative to each other. To make it work I just had to replace all calls to SDL_GetWindowSize() with SDL_RenderGetLogicalSize(). On displays where I do not really need to set a logical size, I simply set the logical size to the actual window dimensions (otherwise I just get 0x0). This just allowed me to stick to just SDL_RenderGetLogicalSize(). So far it seems "good enough" in terms of speed and look and feel. Cheers, Alvin _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|