Ok I set the window size to be 960x640 (width x height) and used my
larger tile set as well to fill the doubled size and I still see problem.
Also, it seems that It’s only present when I restrict the device to
landscape mode.
In the application summary, there’s an option for “Supported Device
Orientation”.
http://imgur.com/GrVfY,adWxV,IKYHs,6W873,Uaibq#0
When I select Landscape for this option I am getting the same issue with
the graphics only showing in the bottom left corner.
http://imgur.com/GrVfY,adWxV,IKYHs,6W873,Uaibq#1
http://imgur.com/GrVfY,adWxV,IKYHs,6W873,Uaibq#2
When this option is not selected I get a full screen, however it isn’t
orientated correctly since my artwork and window is designed for a
landscape screen.
http://imgur.com/GrVfY,adWxV,IKYHs,6W873,Uaibq#3
http://imgur.com/GrVfY,adWxV,IKYHs,6W873,Uaibq#4
I’m thinking that this has something to do with the “Supported Device
Orientation” somehow?
JONNY MORRILL
Consultant & Freelancer
ph: 925.550.2416
em: jonny at morrill.me
wb: jonny.morrill.me
[image: My status] jrmorrill
add me on http://linkedin.com/in/jrmorrill
follow me @jrmorrill https://twitter.com/jrmorrill
On 11/24/11 12:32 AM, Vittorio Giovara wrote:
Last time I checked you need to set the window width and height to its
double dimenions (640x960) to enable retina display; the renderer will
then resize the window context to fit the size of the screen.
You could get around that by querying the video modes available and
use the biggest one to create the window.
Vittorio
On Thu, Nov 24, 2011 at 8:49 AM, Jonny Morrill wrote:
Hello All,
I am having issues when using a Retina device in Landscape mode. I was
previously developing using a iPhone 3GS and I had no problems with the
480x320 window size. However, I recently got a new 4S and tried developing
for the larger screen size. I was under the impression that SDL was able to
handle scaling, is this not the case? Perhaps I am not setting up SDL
properly. Here is how I am currently initializing the window.
// Initialize SDL
if (SDL_Init(SDL_INIT_VIDEO) != 0) {
printf(“Unable to initialize SDL: %s\n”, SDL_GetError());
}
int screen = 0;
int modes = SDL_GetNumDisplayModes(screen);
for (int i = 0; i < modes; i++) {
SDL_DisplayMode mode;
SDL_GetDisplayMode(screen, i, &mode);
printf("%dx%d\n", mode.w, mode.h);
}
// Create the SDL Window
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
appFacade->setWindow(SDL_CreateWindow(0, 0, 0, AppFacade::SCREEN_WIDTH,
AppFacade::SCREEN_HEIGHT,
SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_BORDERLESS |
SDL_WINDOW_RESIZABLE));
SDL_SetHint(“SDL_HINT_ORIENTATIONS”, “LandscapeLeft LandscapeRight”);
SDL_Renderer* renderer = SDL_CreateRenderer(appFacade->getWindow(), -1,
0);
I am using the latest SDL 1.3 build and the most recent Xcode (4.2).
Here are two screenshots of the behavior:
http://imgur.com/R64H3,8nOtC#1
http://imgur.com/R64H3,8nOtC#0
Thanks!
Jonny
SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing listSDL at lists.libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org