low performance on iphone 3gs

Discussion in 'iOS Programming' started by aluxoft, Dec 30, 2009.

  1. aluxoft macrumors newbie

    Joined:
    Dec 30, 2009
    #1
    Hi,

    We(the group of people who i am working with) have been working on a game-engine for some time we have been using two 2nd Gen iPod Touch as testing devices, 2 days ago we got our very first iPhone 3GS and decided to test our engine on it... but the tests gave us really LOW fps (and i need to stress the low, because it changed drastically).

    We are currently using the iPhone OS 3.1.2 and opengl es 1.1

    In the iPod the engine goes at 30~35fps
    In the iPhone 3GS it goes at 7fps~

    We were shocked... and started wondering why!

    We digged in our code and wondered if the problem was with the glBufferSubData that we are using to update the indices every frame, we changed it to glBufferData.

    In the iPod the engine goes at 18~20 fps -- went down.. (so maybe wasn't that?). Anyway we tested it on the iPhone 3GS
    In the iPhone 3GS it goes at 30fps for some seconds then... it crash... and the iPhone reboots...

    Our index buffer object configuration is something similar to:
    int id;
    glGenBuffers(1, &id);

    to update with glBufferSubData we use:
    glBufferSubData(GL_ELEMENT_ARRAY_BUFFER, someOffsetInBytes, someSizeToUpdateInBytes, ((unsigned char*)validPointerToData) + someOffsetsInBytes);

    and to update with glBufferData we use:
    glBufferData(GL_ELEMENT_ARRAY_BUFFER, 3000*sizeof(unsigned short), validPointerToData, GL_DYNAMIC_DRAW);

    Summing up, the iPhone 3GS goes slower than a 2nd Gen iPod AND it crash if we use glBufferData insteand of glBufferSubData...

    Has anyone experienced this problem or something similar? or anyone has an idea of what it could be or were we could start looking for?
     
  2. Leet Apple macrumors 6502a

    Leet Apple

    Joined:
    Nov 10, 2009
    Location:
    Canada
    #2
    I also get Low Performance on my 3G for most games i think its because the IPhone uses more RAM up at times, while the Itouch doesn't eat up and has extra which makes games run smoother...Before my SIM card was unlocked onto my IPhone I used to get Amazing FPS


    Try Taking out the SIM, and if it doesn't have a SIM then I'm also :confused:
     
  3. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #3
    Are you sure you are compiling for Armv6/armv7 ?
    The 3gs does have a different gpu with opengles2.0 instead of 1.1.
     

Share This Page