 |
 |
|
 |
07-04-2009, 01:44 AM
|
#1 (permalink)
|
|
New Member
Join Date: Jul 2009
Posts: 4
|
CoreGraphics takes so poor fps, can anyone can tell me a faster one?
I use CoreGraphics to flip my virtual 2d canvas to screen, but fps < 10.
If don't blit anything to the canvas, just flip a blank canvas to screen, fps < 20.
My code like the below, anyone can tell me a way to get faster fps? Thank you very much!
- (CGImageRef)createImage void*)adata width int)width height int)height{
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, adata, 320*480*4, NULL);
CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB();
CGImageRef ir = CGImageCreate(
width,
height,
8,
32,
4 * width,
colorSpaceRef,
kCGImageAlphaNoneSkipLast,
provider,
NULL,
NO,
kCGRenderingIntentDefault
);
CGColorSpaceRelease(colorSpaceRef);
CGDataProviderRelease(provider);
return ir;
}
- (void)drawRect CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
//CGContextTranslateCTM(context, 0, 480);
//CGContextScaleCTM(context, 1, -1);
CGContextDrawImage(context, CGRectMake(0, 0, 320, 480), imageRef);
}
|
|
|
07-04-2009, 01:57 AM
|
#2 (permalink)
|
|
Registered Member
Join Date: May 2009
Posts: 184
|
how's your eyesight?
|
|
|
07-04-2009, 03:48 AM
|
#3 (permalink)
|
|
FasterThanMonkeys.com
Join Date: Mar 2009
Location: Southern California
Posts: 523
|
@fish - lol
@liangsai - You can check out cocos2d for iphone to get better FPS performance for 2d game type applications.
|
|
|
07-04-2009, 07:23 PM
|
#4 (permalink)
|
|
New Member
Join Date: Jul 2009
Posts: 4
|
Thanks, but My memory render buffer is ready code.
Quote:
Originally Posted by ftm
@fish - lol
@liangsai - You can check out cocos2d for iphone to get better FPS performance for 2d game type applications.
|
Thanks, but My memory render buffer is ready code. I just, just want to blit the memory buffer to screen, with high fps.
Thanks a lot. Any new solution can help me?
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 279 |
| 26 members and 253 guests |
| ADY, AragornSG, Bertrand21, Dani77, Dattee, fkmtc, HDshot, HemiMG, iDifferent, IphoneSdk, jakerocheleau, JasonR, jimbo, macquitzon216, mer10, NSeven, prchn4christ, Rudy, sacha1996, silverwiz, sneaky, spiderguy84, Sunny46, theone8one |
| Most users ever online was 1,187, 10-11-2011 at 08:09 AM. |
» Stats |
Members: 158,885
Threads: 89,230
Posts: 380,767
Top Poster: BrianSlick (7,129)
|
| Welcome to our newest member, bookesp |
|