Steps to create VGA resolution on iPad

Hi,

I have been fiddling with trying to get VGA 640x480 resolution working on my retina iPad, and have come up against an OpenGL barrier. Pardon my complete ignorance, but I don’t actually know how to adjust the ‘screen size’ in OpenGL and am hoping someone can shed some light on this.

I’ve stepped through SDL’s setup procedure for UIKit and have found that it gets it’s screen mode from, surprise, UIScreenMode. This explains why force adding a SDL_DisplayMode doesn’t do what I had hoped :P. The screen modes seem to be locked to full retina or standard 1024x768. So I was experimenting with getting the display I want through pure OpenGL, as GLES seems to be a solid standard for iOS devices. I played around with SDL_RenderSetViewport and had fun moving my canvas around the iPad screen, but now I’d like to scale it so it fills the screen. I must be googling for the wrong things, and it’s getting really, really confusing.

How can I scale the viewport to fill my screen? Am I looking at orthographic projection functions? Some possible functions/attribs which may be related to what I want are GLES2_SetOrthographicProjection and UIView contentScaleFactor, but I don’t know if I’m going down a dead end. Any advice would be super appreciated. Sorry for the GL related noise but every time I try to get into it, my head a’splode.

Thanks for any insights, sorry for the lame ‘how do I do X’ request,
Jeremy J.

If you are using the SDL render API, I’m getting exactly this working over
the next week, and I’ll send an e-mail to the list when it’s done.

Cheers!On Mon, Oct 1, 2012 at 8:55 AM, Jeremy Jurksztowicz wrote:

Hi,

I have been fiddling with trying to get VGA 640x480 resolution working on
my retina iPad, and have come up against an OpenGL barrier. Pardon my
complete ignorance, but I don’t actually know how to adjust the ‘screen
size’ in OpenGL and am hoping someone can shed some light on this.

I’ve stepped through SDL’s setup procedure for UIKit and have found that
it gets it’s screen mode from, surprise, UIScreenMode. This explains why
force adding a SDL_DisplayMode doesn’t do what I had hoped :P. The screen
modes seem to be locked to full retina or standard 1024x768. So I was
experimenting with getting the display I want through pure OpenGL, as GLES
seems to be a solid standard for iOS devices. I played around with
SDL_RenderSetViewport and had fun moving my canvas around the iPad screen,
but now I’d like to scale it so it fills the screen. I must be googling for
the wrong things, and it’s getting really, really confusing.

How can I scale the viewport to fill my screen? Am I looking at
orthographic projection functions? Some possible functions/attribs which
may be related to what I want are GLES2_SetOrthographicProjection and
UIView contentScaleFactor, but I don’t know if I’m going down a dead end.
Any advice would be super appreciated. Sorry for the GL related noise but
every time I try to get into it, my head a’splode.

Thanks for any insights, sorry for the lame ‘how do I do X’ request,
Jeremy J.


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

Okay, if you’re using the SDL render API, try grabbing the latest code and
calling the new SDL_RenderSetLogicalSize(renderer, 640, 480) after you
create your renderer.On Mon, Oct 1, 2012 at 12:52 PM, Sam Lantinga <@slouken> wrote:

If you are using the SDL render API, I’m getting exactly this working over
the next week, and I’ll send an e-mail to the list when it’s done.

Cheers!

On Mon, Oct 1, 2012 at 8:55 AM, Jeremy Jurksztowicz < jurksztowicz at gmail.com> wrote:

Hi,

I have been fiddling with trying to get VGA 640x480 resolution working on
my retina iPad, and have come up against an OpenGL barrier. Pardon my
complete ignorance, but I don’t actually know how to adjust the ‘screen
size’ in OpenGL and am hoping someone can shed some light on this.

I’ve stepped through SDL’s setup procedure for UIKit and have found that
it gets it’s screen mode from, surprise, UIScreenMode. This explains why
force adding a SDL_DisplayMode doesn’t do what I had hoped :P. The screen
modes seem to be locked to full retina or standard 1024x768. So I was
experimenting with getting the display I want through pure OpenGL, as GLES
seems to be a solid standard for iOS devices. I played around with
SDL_RenderSetViewport and had fun moving my canvas around the iPad screen,
but now I’d like to scale it so it fills the screen. I must be googling for
the wrong things, and it’s getting really, really confusing.

How can I scale the viewport to fill my screen? Am I looking at
orthographic projection functions? Some possible functions/attribs which
may be related to what I want are GLES2_SetOrthographicProjection and
UIView contentScaleFactor, but I don’t know if I’m going down a dead end.
Any advice would be super appreciated. Sorry for the GL related noise but
every time I try to get into it, my head a’splode.

Thanks for any insights, sorry for the lame ‘how do I do X’ request,
Jeremy J.


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

Many thanks for the great work!

  • Jeremy Jurksztowicz>From my initial tests, it seems to be working well, and the touch events are translating perfectly too.

On 2012-10-02, at 2:25 AM, Sam Lantinga wrote:

Okay, if you’re using the SDL render API, try grabbing the latest code and calling the new SDL_RenderSetLogicalSize(renderer, 640, 480) after you create your renderer.

On Mon, Oct 1, 2012 at 12:52 PM, Sam Lantinga wrote:
If you are using the SDL render API, I’m getting exactly this working over the next week, and I’ll send an e-mail to the list when it’s done.

Cheers!

On Mon, Oct 1, 2012 at 8:55 AM, Jeremy Jurksztowicz <@Jeremy_Jurksztowicz> wrote:
Hi,

I have been fiddling with trying to get VGA 640x480 resolution working on my retina iPad, and have come up against an OpenGL barrier. Pardon my complete ignorance, but I don’t actually know how to adjust the ‘screen size’ in OpenGL and am hoping someone can shed some light on this.

I’ve stepped through SDL’s setup procedure for UIKit and have found that it gets it’s screen mode from, surprise, UIScreenMode. This explains why force adding a SDL_DisplayMode doesn’t do what I had hoped :P. The screen modes seem to be locked to full retina or standard 1024x768. So I was experimenting with getting the display I want through pure OpenGL, as GLES seems to be a solid standard for iOS devices. I played around with SDL_RenderSetViewport and had fun moving my canvas around the iPad screen, but now I’d like to scale it so it fills the screen. I must be googling for the wrong things, and it’s getting really, really confusing.

How can I scale the viewport to fill my screen? Am I looking at orthographic projection functions? Some possible functions/attribs which may be related to what I want are GLES2_SetOrthographicProjection and UIView contentScaleFactor, but I don’t know if I’m going down a dead end. Any advice would be super appreciated. Sorry for the GL related noise but every time I try to get into it, my head a’splode.

Thanks for any insights, sorry for the lame ‘how do I do X’ request,
Jeremy J.


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

You’re welcome! :)On Tue, Oct 2, 2012 at 7:25 AM, Jeremy Jurksztowicz wrote:

From my initial tests, it seems to be working well, and the touch events
are translating perfectly too.

Many thanks for the great work!

  • Jeremy Jurksztowicz

On 2012-10-02, at 2:25 AM, Sam Lantinga wrote:

Okay, if you’re using the SDL render API, try grabbing the latest code and
calling the new SDL_RenderSetLogicalSize(renderer, 640, 480) after you
create your renderer.

On Mon, Oct 1, 2012 at 12:52 PM, Sam Lantinga <@slouken> wrote:

If you are using the SDL render API, I’m getting exactly this working
over the next week, and I’ll send an e-mail to the list when it’s done.

Cheers!

On Mon, Oct 1, 2012 at 8:55 AM, Jeremy Jurksztowicz < jurksztowicz at gmail.com> wrote:

Hi,

I have been fiddling with trying to get VGA 640x480 resolution working
on my retina iPad, and have come up against an OpenGL barrier. Pardon my
complete ignorance, but I don’t actually know how to adjust the ‘screen
size’ in OpenGL and am hoping someone can shed some light on this.

I’ve stepped through SDL’s setup procedure for UIKit and have found that
it gets it’s screen mode from, surprise, UIScreenMode. This explains why
force adding a SDL_DisplayMode doesn’t do what I had hoped :P. The screen
modes seem to be locked to full retina or standard 1024x768. So I was
experimenting with getting the display I want through pure OpenGL, as GLES
seems to be a solid standard for iOS devices. I played around with
SDL_RenderSetViewport and had fun moving my canvas around the iPad screen,
but now I’d like to scale it so it fills the screen. I must be googling for
the wrong things, and it’s getting really, really confusing.

How can I scale the viewport to fill my screen? Am I looking at
orthographic projection functions? Some possible functions/attribs which
may be related to what I want are GLES2_SetOrthographicProjection and
UIView contentScaleFactor, but I don’t know if I’m going down a dead end.
Any advice would be super appreciated. Sorry for the GL related noise but
every time I try to get into it, my head a’splode.

Thanks for any insights, sorry for the lame ‘how do I do X’ request,
Jeremy J.


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


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