Frame rate issues

Member
Posts: 117
Joined: 2010.09
Post: #1
Hi all,

I'm trying to find out exactly where the problem is in my app that causes the frame-rate to drop.
I assume perhaps I am not using instruments correctly.
Currently most of my textures are direct outputs from gimp as .png's which I assume are therefore 8888 format.
I briefly tried texture packer's conversion to 1555; but the effect wasn't noticeable (BTW; where can I get a good mac texture format conversion util from?; Imagemagic seems to be the one but no nice gui, and no pre-mac built dmg).
Currently (it's a 2D scroller) I have GL_DEPTH_TEST disabled.
So I assume although I draw front to back *everything* gets drawn regardless of whether it's visible or not.
Currently (as it's 2d) all sprites just have an x/y coord. Do I need to add a Z just so I can use the depth buffer and adjust my vertex draw to take that into account. Would this give a significant speed boost?
Don't really want to go down the PVR root as the texture quality will degrade (and as they are sprites I assume it will be noticeable).

Any other suggestions, or perhaps things to check in instruments appreciated

Cheers
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
If you're in the iOS paid dev program, you have access to the Xcode 4 betas, which include improved OpenGL ES performance tools.
Quote this message in a reply
Member
Posts: 117
Joined: 2010.09
Post: #3
I am! :-)))
Presumably I just need to 'check for updates' in Xcode and grab the new version?
What improved things do you actually get??

Cheers
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
You need to download the new version from the developer portal. The changes should be described in the release notes or documentation, but are currently under NDA.
Quote this message in a reply
Member
Posts: 117
Joined: 2010.09
Post: #5
It would seem any alpha (and I mean like 1555 not 4444) cripples my iphone 3g (not 's').
I mean the frame rate dives!
Any advice from anyone as I try foolishly to try and stay at 60fps.?!?!?

Cheers
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
turn off blending if you don't need it...
Quote this message in a reply
Member
Posts: 117
Joined: 2010.09
Post: #7
I set GL_BLEND to FALSE is this all I need?

//Not sure if this helps or makes no difference either??
glDisable(GL_ALPHA_TEST);
Quote this message in a reply
Member
Posts: 117
Joined: 2010.09
Post: #8
In my quest for 60 fps I took out the z buffer creation from eagle thus:


//glGenRenderbuffersOES(1, &depthRenderbuffer);
//glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
//glRenderbufferStorageOES(GL_RENDERBUFFER_OES, GL_DEPTH_COMPONENT16_OES, backingWidth, backingHeight);
//glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);


Firstly; is this safe??? (obviously I don't use the z buffer lol).
Secondly; now at a firm 60fps!!!!!!!!!!!!!!!!!!!!!!!

Anyone care to support my method?!? :-)

Cheers

p.s I am guessing as no z-buffer is allocated there is more texture ram; and texture thrashing occurs less?????

p.s.s if this is true then the theory of putting say all player animation frames into 1 texture atlas may be flawed. (i.e. the texture could be quite large). Would it not possibly be better to put all 'walking left' in 1 atlas; walking up' in another etc. etc.
then you will only require a smaller texture per call for the player.
Can anyone confirm or deny my logic(!)??? :-)

p.s.s.s CRUMBS!, my render utilization is down from 95% to 57%!!!

Cheers
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Frame Rate Consistency daveh84 4 3,708 May 4, 2010 12:19 PM
Last Post: AnotherJake
  limiting frame rate NelsonMandella 14 5,961 Sep 16, 2009 02:57 PM
Last Post: bmantzey
  iPod low upgrade rate to 3.0 jjslay 4 3,133 Jul 31, 2009 09:38 AM
Last Post: bruss14
  frame rate for a Quartz game? aerospaceman 2 4,003 Jun 22, 2009 10:56 AM
Last Post: longjumper
  mac mini simulator - slow frame rate sumiguchi 3 3,880 Dec 18, 2008 08:56 AM
Last Post: SafariAl