VGA Display on iPad

Hello,

Hi, I’ve just upgraded my SDL lib to the latest, and everything seems to work great! I was using a very hacked up old version of 1.3 for a long time, it’s nice to see how far it’s gone in the last year.

Anyways, I’m having trouble getting a VGA resolution (640x480) set up on my retina iPad. Here is a dump of what my program runs when setting things up.

So, is VGA resolution even supported? Thanks for any insights.

  • Jeremy J.

BTW: I’m getting this data with the various SDL queries (SDL_GetDisplayMode, etc?), and passing 640x480 to SDL_CreateWindow().

Available Audio Drivers:
0) coreaudio
1) dummy
Available Video Drivers:
0) uikit
1) dummy
Available Video Modes:
0) 2048x1536
1) 1536x2048
2) 1024x768
3) 768x1024
Using Audio Driver: coreaudio
Using Video Driver: uikit
Initializing on iPad…
Created window with dimensions (2048x1536)
Available Render Drivers:
0) opengles2
1) opengles
2) software
Rendering using opengles2
SDL_RENDERER_ACCELERATED

You’re talking about VGA resolution on the video output port, right?

I just updated support for that now:
http://www.libsdl.org/tmp/SDL-2.0.zip

The external VGA resolution is treated like a secondary display in SDL, and
has the unique property of being output-only.

So, you’d create your primary screen like this:
SDL_Window *primary = SDL_CreateWindow(NULL, SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, width, height, window_flags);

and the secondary screen like this:
SDL_Window *secondary = SDL_CreateWindow(NULL,
SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1),
width, height, window_flags);

You’d get input on your primary window, and set up both windows with
renderers or OpenGL contexts for output.

See ya!On Fri, Sep 28, 2012 at 6:09 PM, Jeremy Jurksztowicz <jurksztowicz at gmail.com wrote:

Hello,

Hi, I’ve just upgraded my SDL lib to the latest, and everything seems to
work great! I was using a very hacked up old version of 1.3 for a long
time, it’s nice to see how far it’s gone in the last year.

Anyways, I’m having trouble getting a VGA resolution (640x480) set up on
my retina iPad. Here is a dump of what my program runs when setting things
up.

So, is VGA resolution even supported? Thanks for any insights.

  • Jeremy J.

BTW: I’m getting this data with the various SDL queries (SDL_GetDisplayMode,
etc?), and passing 640x480 to SDL_CreateWindow().

Available Audio Drivers:

    1. coreaudio*
    1. dummy*
      Available Video Drivers:
    1. uikit*
    1. dummy*
      Available Video Modes:
    1. 2048x1536*
    1. 1536x2048*
    1. 1024x768*
    1. 768x1024*
      Using Audio Driver: coreaudio
      Using Video Driver: uikit
      Initializing on iPad…
      Created window with dimensions (2048x1536)
      Available Render Drivers:
    1. opengles2*
    1. opengles*
    1. software*
      Rendering using opengles2
      SDL_RENDERER_ACCELERATED

SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi Sam,

I actually wanted to have a VGA resolution on the main display of an iPad, but looking at the SDL2 blockers thread about logical resolutions, looks like that isn’t supported yet? Is there a specific obstacle that is preventing this? I have time over the next few weekends and such a feature would be very valuable to me so I may try to hack up a solution. If anyone on the list has started such a venture or is otherwise aware of what files/gotchas I should pay attention to, please share.

Thanks!
Jeremy JurksztowiczOn 2012-09-29, at 3:25 AM, Sam Lantinga wrote:

You’re talking about VGA resolution on the video output port, right?

I just updated support for that now:
http://www.libsdl.org/tmp/SDL-2.0.zip

The external VGA resolution is treated like a secondary display in SDL, and has the unique property of being output-only.

So, you’d create your primary screen like this:
SDL_Window *primary = SDL_CreateWindow(NULL, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, window_flags);

and the secondary screen like this:
SDL_Window *secondary = SDL_CreateWindow(NULL, SDL_WINDOWPOS_CENTERED_DISPLAY(1), SDL_WINDOWPOS_CENTERED_DISPLAY(1), width, height, window_flags);

You’d get input on your primary window, and set up both windows with renderers or OpenGL contexts for output.

See ya!

On Fri, Sep 28, 2012 at 6:09 PM, Jeremy Jurksztowicz <@Jeremy_Jurksztowicz> wrote:

Hello,

Hi, I’ve just upgraded my SDL lib to the latest, and everything seems to work great! I was using a very hacked up old version of 1.3 for a long time, it’s nice to see how far it’s gone in the last year.

Anyways, I’m having trouble getting a VGA resolution (640x480) set up on my retina iPad. Here is a dump of what my program runs when setting things up.

So, is VGA resolution even supported? Thanks for any insights.

  • Jeremy J.

BTW: I’m getting this data with the various SDL queries (SDL_GetDisplayMode, etc?), and passing 640x480 to SDL_CreateWindow().

Available Audio Drivers:
0) coreaudio

  1. dummy
    Available Video Drivers:
  2. uikit
  3. dummy
    Available Video Modes:
  4. 2048x1536
  5. 1536x2048
  6. 1024x768
  7. 768x1024
    Using Audio Driver: coreaudio
    Using Video Driver: uikit
    Initializing on iPad…
    Created window with dimensions (2048x1536)
    Available Render Drivers:
  8. opengles2
  9. opengles
  10. software
    Rendering using opengles2
    SDL_RENDERER_ACCELERATED

SDL mailing list
SDL at lists.libsdl.org
http://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