GLBasic forum

Main forum => GLBasic - en => Topic started by: tuncy on 2012-Apr-19

Title: iPad 3 Retina Support
Post by: tuncy on 2012-Apr-19
Hi,

Does GLBasic support iPad 3 Retina?

Thanks
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Apr-19
I have no idea. Send me one, and I'll tell you.
Title: Re: iPad 3 Retina Support
Post by: Sokurah on 2012-Apr-19
Quote from: Kitty Hello on 2012-Apr-19
I have no idea. Send me one, and I'll tell you.

=D
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-19
Hehe. Hopefully you can loan one from your country for testing.

But its seen no one have still not have tested it out with real Retina support yet. But its should works out of the box, if you ask me, but you might need to change resoulution in the option of course as well update to newest xCode SDK.

But with normal resoulution with "The New iPad", there have not been any problems at all and run perfectly.

I cant tell before juni to tell how Greedy Mouse (look under annonce) perform on that, but the game would been designed to could run in that resoulution too.
Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Apr-20
Hi.... If you take a look at my blog... you can find a snaphot of my GLBasic project running on a iPad3 with retina...

The snapshot:

(http://3.bp.blogspot.com/-gTVrI6237TE/T4WeAvbZt0I/AAAAAAAAB2w/XumgvjYRNlU/s2048/Snapshot_Ipad3_D_001.jpg)

I no declared retina resolution.... and the device shows the app correctly... at half size  :P

I made changes for retina soon... modifiing my graphics, touch routines etc...


My conclusion are: YES, GLB can use retina display ;)
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-20
opps :-D, you dosent have set 1024x768 in the project option? But that issue does shown Retina is different supported. Completly Nice.

Do you really need to rework the graphics, but just use offscreen, since game like this should not effect speed or such think on that device?

Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Apr-20
Quote from: spacefractal on 2012-Apr-20
opps :-D, you dosent have set 1024x768 in the project option? But that issue does shown Retina is different supported. Completly Nice.

Do you really need to rework the graphics, but just use offscreen, since game like this should not effect speed or such think on that device?

No no.... my project as initially for 1024x768.... a friend @Dacarsoft are making some test of my app on his new i3....  =D

Just make 2X grfx.... and adjust touch XY pos.... use GETSCREENSIZE for select device.... and voilà   :-*
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Apr-20
So... how would I run a 1024x768 app on hte iPad3 now? I'm confused.
Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Apr-20
Currently.... the snapshot you view in post.... are declared with 1027x768 screen
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-20
Its someone weird! I say that as I heard Snake Snider Light ran perfectly on the same device, but did not used Retina iPad graphics.

So I must guess its must automatic been happens when you upgrade to Lion and using the newest xCode, but still only using 1024x768 as max resoulution when you use older SDK (which make seance).

I also upgradeded to Lion and newset xCode too, so I hope Greedy Mouse run perfectly with iPad Retina graphics too and also a nice framerate too.
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-22
Confirmed!

Finnaly I got a Screenshot how Greedy Mouse look on iPad Retina screen:
(http://dl.dropbox.com/u/3236515/GreedyMouse/GreedyMouseScreens/GmIpadRetina.png)

No more than excellent, and its very sharp and the game could run at 60fps too (but it still have some remaining placeholders). Normal the game is target as 30fps.

Also the tiles texture size used here is 4096x4096.
Title: Re: iPad 3 Retina Support
Post by: AlienMenace on 2012-Apr-24
My game runs great on iPad3, I used SETSCREEN 768,1024 at the top of my code and it runs full-screen on my iPad3 just like it does on my iPad2.
Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Apr-24
Please post complete # version of Xcode please.

TIA, Hark0

;)

Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-24
I use the newest version (not remember in head) and updated once throught Mac AppStore and with Lion. Here I do not checked to see what is happens when using 1024x768 for Greedy Mouse (and I cant check that). Only if its could support Retina or not.... Then its supported it out of the box.
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Apr-24
Hi...

For me, GLBasic shows 2048 x 1536 under iPad 3 (or "new" iPad...  :P)

I can't force in any way to show 1024 x 768 as a 2X application...   it shows the app using retina resolution ever, just like the screenshots that Hark0 showed before. The image from games is showed in the top right corner (looking with the iPad in normal portrait) and the touch events are correct for the images...

Using SETSCREEN 1024, 768, 1 (or 0) appears to not have effect...

All my tests are done with Lion (10.7.3) and XCode 4.3.2

EDIT: I think that should exist a parameter that could be included in the info.plist of the XCode project to scale 1024x768 graphics up to 2X.

Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-24
That can been why. Newest Xcode auto use ipad retina, the older Xcode does not.

By now offscreen buffer should been the way and double up mouse cords. Here Performent should been fine since its a faster machine.

But nice to aware of it
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Apr-24
Oh no. My app was rejected becaus of small buttons... It uses the retina display. How can I force it to use only 1024x768??? HELP!
Title: Re: iPad 3 Retina Support
Post by: AlienMenace on 2012-Apr-25
My game works fine at 768x1024 on iPad 3, fills the screen but I am using xcode 3.2.5. Maybe that's why it is working for me.
Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Apr-25
Quote from: AlienMenace on 2012-Apr-25
My game works fine at 768x1024 on iPad 3, fills the screen but I am using xcode 3.2.5. Maybe that's why it is working for me.

mmmm I have last version of Xcode... how install OLD version?

@Dacarsoft.... X2 plist option for "double" image screen?
Title: Re: iPad 3 Retina Support
Post by: BigAnd on 2012-Apr-25
I have always rendered to an off screen buffer and then scale that to fit the target screen size. If you scale the "mouse" input appropriately this should allow you to run your game at 768x1024 but draw it at Retina size.
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Apr-25
I think I fixed the retina thing for the iPad3, too. I'll see with my current review for GACK.
But the problem will soon strike us if more devices with different resolutions come. We get in the same situation as we are with Android then.

I think about implementing a prescale function like glScalef() for all opengl output. Somehting like ZSprite library.
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Apr-25
Personly I prefer doing autoscaling by my self,  so you make sure the game would works as extended. Different Resolutions is own for issue, but a bigger issue is also pixel distiny as well differ screen ratios. So you cannot allways just do glScalingf() for anything.

Howover with iPad 3, if you not planning Retina graphics, you can use offscreen without issue and 2x (remember do with input as well). Normally you should allways avoid offscreen buffer, since its spike very much on performance as well battery. Also using offscreen buffer with same resolutions is a really bad idea as well, except if you using some effects of course, but make seance for x2 scaling here.
Title: Re: iPad 3 Retina Support
Post by: Qube on 2012-Apr-25
Quote
I think about implementing a prescale function like glScalef() for all opengl output.

So long as we have the option to use 1024x768 & 2048x1556 resolutions on the iPad 3rd gen. I'd certainly like to make sure the latest versions of my games are optimised for the iPad 3rd gen while still supporting the earlier models. It won't be a solution to simply scale down for older devices as that would be a huge memory hog.

Ideally we'll need to know / have.

1.. Know which device the app is running on (I know there are plugins on this forum but for many a simple command would be of benefit)
2.. Force use 1024x768 even on the iPad 3rd gen as not all games need to be "retina" (even though it will be scaled up)
Title: Re: iPad 3 Retina Support
Post by: Dark Schneider on 2012-Jun-19
Hi, I am very interested about this and if there is a way an universal app to show 2X on iPad Retina or we need to handle it manually.
This can be easily handled using OpenGL calls (the same than for rotating the screen) but if XCode do it by its own, it is not good to apply 2X twice, you know.

So someone has tested what happens using the lastest GLB and XCode (4.3) with the project confgured as 1024x768?
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Jun-19
With latest version of Xcode and GLBasic (10.283) and settings for 1024x768 your app will run at full retina resolution without scaling, ignoring the 1024x768 settings...     It's to say: your app will take only 1/4 of the screen...

If you upscales 2x the graphics under GLBasic and correct your coordinates, you can use the full retina screen.

In future versions of GLBasic (11) you can set 1024x768 to let GLBasic do an autoscaling for you under iPad 3. It looks good, without blur ;)   Just like in iPad 1 and 2.  If you set 2048x1536 you can use the full retina screen normally.

Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Jun-19
DaCarSoft - did you test the iPad3 screen resolution settings as well? Oh genius!!
Title: Re: iPad 3 Retina Support
Post by: Dark Schneider on 2012-Jun-19
OK thanks for quick response, I think I will make a general implementation for auto-adjust, best for future devices.

Can we disable filtering?, because for a 2X (integer zoom) we have no blurry image, only upscaled, but it will look exactly like on the iPad no Retina one  ;)

Maybe using OpenGL calls again, which filter GLB uses?, I need to know for later restore it.
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Jun-19
Yes. Try SMOOTHSHADING FALSE.
Title: Re: iPad 3 Retina Support
Post by: spicypixel on 2012-Jun-19
Auto scaling would be awesome and would save the cpu cycles currently spent within GLB coding screen dump style scaling which kills the frame rate by half in most cases on non-pc hardware. All for it! :)
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Jun-20
Quote from: Kitty Hello on 2012-Jun-19
DaCarSoft - did you test the iPad3 screen resolution settings as well? Oh genius!!

Yes!!! I was testing it by entering the retina resolutions by hand in the text box, to force the 2048x1536 resolution...

I have tested the 1024x768 resolution also under iPad 3, and it works fine, without blur effects or antialias...  It looks just like under iPad 2 or 1, like I told before...

I think that I told you in one of my emails sent to you :P
Title: Re: iPad 3 Retina Support
Post by: Dark Schneider on 2012-Jun-20
Quote from: DaCarSoft on 2012-Jun-20
Quote from: Kitty Hello on 2012-Jun-19
DaCarSoft - did you test the iPad3 screen resolution settings as well? Oh genius!!

Yes!!! I was testing it by entering the retina resolutions by hand in the text box, to force the 2048x1536 resolution...

I have tested the 1024x768 resolution also under iPad 3, and it works fine, without blur effects or antialias...  It looks just like under iPad 2 or 1, like I told before...

I think that I told you in one of my emails sent to you :P

Only for be sure, you are talking about the new GLBASIC 11, right?, not modifying the project properties in XCode or something else.
Title: Re: iPad 3 Retina Support
Post by: erico on 2012-Jun-20
I don´t think kitty hello has access to GLB 11 :P >:D
Title: Re: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Jun-20
Oh, I do. I am already at the point of the crash now. Already a bit further. If everything goes well - and it looks quite promising now - V11 will have a huge candy added.
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Jun-20
Quote from: Dark Schneider on 2012-Jun-20
Only for be sure, you are talking about the new GLBASIC 11, right?, not modifying the project properties in XCode or something else.

Yes, GLBasic 11 only ;)
Title: Re: iPad 3 Retina Support
Post by: Ian Price on 2012-Jun-20
QuoteV11 will have a huge candy added.

Let's hope the candy is nothing like these -

(http://t0.gstatic.com/images?q=tbn:ANd9GcS_cCRX2F9J_gtvfLzY3Ld0hrqF8GZVtLAyiTNEhug7v-T6DkIuVfe0TuBDeA)
:P

Looking forward to this  :nw:  :happy:
Title: Re: iPad 3 Retina Support
Post by: Hark0 on 2012-Jun-21
Quote from: Ian Price on 2012-Jun-20
QuoteV11 will have a huge candy added.

Let's hope the candy is nothing like these -

(http://t0.gstatic.com/images?q=tbn:ANd9GcS_cCRX2F9J_gtvfLzY3Ld0hrqF8GZVtLAyiTNEhug7v-T6DkIuVfe0TuBDeA)
:P

Looking forward to this  :nw:  :happy:

Penis Candy?????

:D

Title: iPad 3 Retina Support
Post by: Kitty Hello on 2012-Jun-21
I'd rather buy the counterpart.
Title: Re: iPad 3 Retina Support
Post by: erico on 2012-Jun-21
You mean this one? :P

...now please gentleman, we can all clearly see this is a legit oyster flavored lollipop! nothing wrong with it.

[attachment deleted by admin]
Title: Re: iPad 3 Retina Support
Post by: Ian Price on 2012-Jun-21
I... um... er...  :blink:   :S  :D
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Jun-21
XDDDDD

Out of the jokes: I have to correct my comments...  :(  I said that there was not blur on the iPad 3 screen with the Beta 11 compiling for 1024x768, but I just tested with some pixel art graphics, and I can appreciate a little shading or blurring around the pixels...    It's hard to appreciate the difference until you compare using the native retina resolutions and (for example) ZOOMSPRITE from GLBasic.

It depends on the graphic style that you uses, and if you like "smoothshading" or not...   But yes, there is some blurring if you forces 1024x768 from the GLBasic project settings.
Title: Re: iPad 3 Retina Support
Post by: Hemlos on 2012-Jun-21
Why dont use you just compile the games using the native screen resolution?

The resolution you use will obscure images, if you dont overlap the resolution to the native resolution.
To make a perfect fit these are available as preset default screensizes:

960x640 should be full screen, cover all the pixels perfectly.
These are proportional too
480x320
640x480
320x480


What GLBasic doesnt have natively is windows HD screen sizes
1280x720
1280x768
1920x1080 would be nice too
Title: Re: iPad 3 Retina Support
Post by: DaCarSoft on 2012-Jun-22
Hi Hemlos

I know...  I know...    =D

I was talking about the possibility of GLBasic 11 to let you compile correctly (for iPad 3) GLBasic's applications made for 1024x768 resolutions without changes.

If you have the last version of XCode, and GLBasic 10, your applications will run using only 1/4 of screen in the "new" iPad 3, because of the new retina resolution...    With GLBasic 10 and XCode 4.3.X your app will ignore the 1024x768 setting and will run natively at 2048x1536 but obviously reduced, starting at the top right corner of the screen...

With GLBasic 11, you can force the 1024x768 to upscale and fit for retina screens without changing the code, but with a little blurring.

Of course, you can forget this fact and use the full resolution of each device and DRAWSPRITE, STRETCHSPRITE, ZOOMSPRITE or POLYVECTORs...  with SMOOTHSHADING OFF   =D

Regards!
Title: Re: iPad 3 Retina Support
Post by: BdR on 2012-Dec-03
Oops, it seems I missed this bit of info and I've just released a new version of my Snake Slider game. On the new iPad it displays using 2048x1536 making the game take only 1/4 of the screen. O_O
Title: Re: iPad 3 Retina Support
Post by: BdR on 2012-Dec-03
okay I'm running into a weird problem here. I'm trying the new GLBasic V11 because of iPad3 problems, but now I get low resolution on my iPod4. :(

I have set the project resolution to 768x1024 and with GLBv10 the app would then run with best resolution. So on an iPod 4 the command GETSCREENSIZE would get a resolution of 640x960 and on iPad it would give 768x1024.

But now with GLBasic v11 when I run my app on my iPod 4G (retina) the app starts in 320x480 mode, which is the resolution of 3G devices, instead of 640x960. What am I doing wrong?

Some info:
GLBasic v11.171
XCode 4.2 (I can't upgrade to higher XCode because of MacMini)
iPod 4G
libpng-gf.a => 15-sep-2012
libGLBasiciPhone-egl.a => 15-sep-2012
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2012-Dec-05
Ii forget totally to test your game on iPad 3. Yes it's run only 1/4, but goodness on the center, which mean you uses a offbuffer? If I'm are right you could fix the issue with ZOOMSPRITE by drawing the offscreen picture by two? You we not getting real retina graphics, but its could fixing the fullscreen.

You also might found a glbasic bug, so it's night happens as well in normal retina? It's should not been happens, but nice bug found.
Title: Re: iPad 3 Retina Support
Post by: BdR on 2013-Jan-07
I've tried the v11 again but now on another iPhone4 and an iPad3. In project->options I set the Resolution to 768x1024 and then on the iPad3 my GLB app runs in 768x1024 mode instead of 1536x2048, which is a correct improvement from v10 to v11.

However, on the iPhone4 my GLB app now still runs in 320x480 mode, I can't figure out why. I've even uninstalled both GLBasic v10 and v11, and then only re-installed v11.

Here's my new info:
GLBasic v11.261
libpng-gf.a => 14-dec-2012
libGLBasiciPhone-egl.a => 14-dec-2012
Title: Re: iPad 3 Retina Support
Post by: BdR on 2013-Jan-08
Btw when I set the project settings to 640x960 and run it on my ipod4, then it does go to 640x960 ("retina") graphics mode. Here is the console output.

Code (glbasic) Select
init with frame.
App wants to support retina...
Retina scaleing available: self.contentScaleFactor = 2.000000
desktop backing: 640 x 960
mainScreen: 640x960
glb_notify_screen_size 640x960
slaunch ok
-applicationDidBecomeActive    -> unpause
timer
rbow
rbow init
Rbow::SetScreen( 640,960)
get accurate timer - 1st call
flip - 1st call
BGRA ext supported


But the problem occurs when the project settings are 768x1024 then the app starts in 320x480 mode.. O_O console gives this output..:

Code (glbasic) Select
init with frame.
desktop backing: 320 x 480
mainScreen: 320x480
glb_notify_screen_size 320x480
slaunch ok
-applicationDidBecomeActive    -> unpause
timer
rbow
rbow init
Rbow::SetScreen( 768,1024)
get accurate timer - 1st call
flip - 1st call
BGRA ext supported
Title: Re: iPad 3 Retina Support
Post by: aroldo on 2013-Jan-09
Bdr,

How are you?
Here is a code that you can test with any screen resolution  up to 2048-by-1536 (retina display)
Just unzip it and compile, it will re size automatically to any screen size up to iPad retina resolution.

Let me know if it works for you.

Sincerely,

Aroldo Carvalho

[attachment deleted by admin]
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2013-Jan-09
Its a new feature so glbasic correctly support 2x scaling on iPad 3 if a game not required doing that, but seen its might breaks other res as well and forget checking the 640x960 one. Can you post the bug in bug forum?

He property know possible to do offscreen using CREATESCREEN and USESCREEN, but they don't allways works, example with alpha and it's slower. But yes could have do that when that res is detected.

My guess is x y might have swapped under checking (so 960 was higher than 756), and forget to checks that (similar to the android issue with auto rotation). Etc portrait & vertical issue.

Greedy mouse example uses direct scaling on back buffer else it's would drop around 40% perforcement if used offscreen first...
Title: iPad 3 Retina Support
Post by: Kitty Hello on 2013-Jan-15
Yes. It detects if you want ipad or iphone and retina.
Title: Re: iPad 3 Retina Support
Post by: spacefractal on 2013-Jan-16
but the x2 features does not doing correctly in the v11 beta as bdr pointed out, and that why I asked him to post it on the bug forum:
http://www.glbasic.com/forum/index.php?topic=8847.msg75309#new

etc its works correctly on iPad Retina, but not with iPhone Retina.
Title: iPad 3 Retina Support
Post by: Kitty Hello on 2013-Jan-17
I see. So 960x640 would make iphone retina, but theres no way to get all to work retina. Hmmmm. I think setscreen must be changed to work here.