IOS Templete project performance compared to samples

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
htone
Gnoblar
Posts: 2
Joined: Sat Jul 06, 2013 7:56 pm

IOS Templete project performance compared to samples

Post by htone »

I just joined ogre community :D A newbie so please bear with me :wink:
Started with building ogre 1.8.1 for ios using this guide which I found googling for ios and ogre http://www.ogre3d.org/tikiwiki/Building ... e+-+iPhone
Finished building and started sample browser in ipad simulator in 1024x768, so far so good.
Then I realized there is a template and a prebuilt SDK that I can use, downloaded them and the template project runs at 8.5 FPS with prebuilt SDK in same ipad simulator, which is much lower than the samples with approximately the same triangle count. Both in debug, both in 1024x768. Sample #16(lighting) with same ogre head and around 4800 triangle runs at 40. I have seen in forum posts that the performance for template project when deployed is ok, but the difference between samples and template in simulator confuses me.
is this normal? What am I missing?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: IOS Templete project performance compared to samples

Post by masterfalcon »

Well, the simulator cannot be used to judge device performance. Apple makes no guarantees that it will be the same as on a device and make it pretty clear in some of their docs that you shouldn't expect it to be.

That being said, I should update the template to dispatch the render call with a block like the samples do. For example, here is renderOneFrame from the samples.

Code: Select all

- (void)renderOneFrame:(id)sender
{
    [sb.mGestureView becomeFirstResponder];

    // NSTimeInterval is a simple typedef for double
    NSTimeInterval currentFrameTime = -[mDate timeIntervalSinceNow];
    NSTimeInterval differenceInSeconds = currentFrameTime - mLastFrameTime;
    mLastFrameTime = currentFrameTime;

    dispatch_async(dispatch_get_main_queue(), ^(void)
    {
        Root::getSingleton().renderOneFrame((Real)differenceInSeconds);
    });
}
htone
Gnoblar
Posts: 2
Joined: Sat Jul 06, 2013 7:56 pm

Re: IOS Templete project performance compared to samples

Post by htone »

Thanks a lot, I tried to change one of the samples with the same scene from template to see how it goes but Xcode is playing tricks on me. No matter what I put in the samples it keeps running the old sample and ignores my changes. I tried cleaning the build, cleaning Xcode cache, deleting the binaries... still runs the same old sample. I'm using Xcode 4.6.3 by the way.
Then I tried to run samples from the SDK package (ios 1.8.2) and couldn't build them:

Code: Select all

PhaseScriptExecution "CMake Rules" OGRE.build/Debug-iphonesimulator/ZERO_CHECK.build/Script-341BF9DACEC84C85BC989B1E.sh
    cd /Users/hamish/Documents/edumat_ios/OgreSDK
    /bin/sh -c /Users/hamish/Documents/edumat_ios/OgreSDK/OGRE.build/Debug-iphonesimulator/ZERO_CHECK.build/Script-341BF9DACEC84C85BC989B1E.sh


echo ""


make -f /Users/hamish/Documents/edumat_ios/OgreSDK/CMakeScripts/ReRunCMake.make
make[1]: *** No rule to make target `/opt/local/share/cmake-2.8/Modules/CMakeCCompiler.cmake.in', needed by `CMakeFiles/cmake.check_cache'.  Stop.
make: *** [/Users/hamish/Documents/edumat_ios/OgreSDK/CMakeFiles/ZERO_CHECK] Error 2
Command /bin/sh failed with exit code 2


Appreciate your help.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: IOS Templete project performance compared to samples

Post by masterfalcon »

If you look around the forums you'd find the answer many times over. Cmake hardcodes paths to its own files. So in this case a version installed with MacPorts was used so the scripts are trying to reference files installed under /opt.
Post Reply