Results 1 to 5 of 5

Thread: 2D rendering on iOS after iPhone 5 support update

  1. #1
    Squire tehJP's Avatar
    Join Date
    Aug 2012
    Location
    Bristol, UK
    Posts
    14

    Default 2D rendering on iOS after iPhone 5 support update

    Right. So. I'm struggling and I'm not ashamed to admit it!

    I'm making an iOS game and hadn't updated proton for a while. Then I got an iPhone 5 and saw that I needed to update the engine to get support for it.

    I made a boo boo with my source control setup when I started my project and just took a copy of proton rather than branching or working in the svn repository. And I've been making changes to proton to support irrlicht's 2D rendering which wasn't working before. And I've been working on windows and mac separately with svn only on windows so the update to proton was slightly ropey and painful as I'm sure you can imagine! Lesson learned and all that...

    Having now made some progress and got everything compiling and running the 2D rendering isn't working as it was before the proton update. It was all squashed in the y axis initially.

    The way my 2D rendering works isn't too barmy... I basically treated everything as if it was 480x320 and then applied retina scaling where necessary before calling irrlicht's 2D render functions.

    So if I was drawing a rectangle on retina i would double the size of the rectangle on retina displays. Now, after updating proton it only seems I should double on the y axis but that means the scene is drawn bigger than the screens height by a fair amount on a 4th gen iPod and only slightly bigger than the screen on iPhone 5....

    The way in which proton reports the screen size has changed so that the size is reported non-retina and there's a new function to get the screen scale... Any ideas if some changes to all this has affected 2D rendering? Seems like the aspect ratio might be affecting the scale...

    I've not actually tried on a non-retina device to see what happens there but wanted to see if something had been done within the engine that could affect 2D!

    If you made it this far many thanks, pat yourself on the back!

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    The changes when I added proper iPhone 5 support did remove some weird cruft from before and things ended up cleaner, (removed some special cases that were needed before) so it should be easier to work with on the iOS side, not more difficult.

    Hmm, sorry I'm not sure.
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Squire tehJP's Avatar
    Join Date
    Aug 2012
    Location
    Bristol, UK
    Posts
    14

    Default

    Ahh well, I figured there might not be an easy answer. I shall have to dig deeper and see what I can find. I'm just happy that it's sort of rendering somewhat sensibly on both screen sizes now after having all kind of stress from merge hell and spending hours copying data between laptops and for it to inexplicably not be using the full iphone 5 screen!

  4. #4
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Ok, no idea if this matters, but a random though:

    One of the related recent changes is you should take out SetManualRotation(true) from your App.cpp if you were using that before, it could make a difference as it makes everything now works more iphone friendly without it. (non manual lets the OS do the rotations when you turn the phone upside down, works better)

    SimpleApp should now be setup this way as an example.
    Seth A. Robinson
    Robinson Technologies

  5. #5
    Squire tehJP's Avatar
    Join Date
    Aug 2012
    Location
    Bristol, UK
    Posts
    14

    Default

    Yeah I'm pretty sure that line got commented out in the update. I don't imagine it's anything to do with rotation but who knows... I know I had to implement rotating Irrlicht's 2D rendering by sort of duplicating rotateGLIfNecessary.. or something similar to that, that one just did the 3D rotation as you'd not done any 2D work in Proton (had another thread about that last year).

    Possibly there's some dodgy scaling i put into that rotateGL2DIfNecessary function which is affecting things... we shall see!

Similar Threads

  1. /update to see the next game update time!
    By Abdolhai talebi in forum Suggestion Box
    Replies: 5
    Last Post: 04-13-2013, 02:43 PM
  2. Mind Wall for iPhone
    By davids in forum RTsoft Tavern
    Replies: 3
    Last Post: 07-11-2009, 11:45 PM
  3. how about iPhone support?
    By koloska in forum Novashell Game Creation System
    Replies: 8
    Last Post: 06-04-2009, 11:13 PM
  4. Clanlib 2 Iphone and other ports possible?
    By sandelz in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 05-06-2009, 11:09 AM
  5. making a game for the iphone
    By Phonetools in forum Novashell Game Creation System
    Replies: 1
    Last Post: 04-09-2009, 10:53 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •