Well, first of all let me say that PixelWave is pretty darn fast. I may just be doing something wrong.
Use PXTextureData:
PXTextureData* cachedData = [[[PXTextureData alloc] initWithWidth: w height: h transparency: YES fillColor: 0] autorelease]; [cachedData drawDisplayObject: obj]; PXTexture* cachedImage = [PXTexture textureWithTextureData: cachedData]; |
drawRect is really intended for objects whose contents are expected to change often (perhaps even every frame).
Okay, If replaced everything in my game with textures.
Hmm, are you creating a different PXTextureData for each object on screen? That could cost you the performance. You could instead have all the PXTexture objects share a single PXTextureData
PXShape *shape = [[PXShape alloc] init]; [shape.graphics beginFill:0x00FF00 alpha:1.0f]; [shape.graphics drawRectWithX:0 y:0 width:100.0f height:100.0f];
Well, actually, I was using PXSprites with the same code you have there using [sprite.graphics drawRectWithX:y:width:height:] and it was chugging. So, I just switched to PXTexture to test and it was slower.
Yeah, I definitely see the difference. Seems really odd. The touch performance is so laggy (I've done more complex things with it and haven't seen it go this slow) that I have to assume something is really wrong. Just not sure what.
Well that kind of makes sense if the total framerate is 9 the dragging would lag.
It looks like you're new here. If you want to get involved, click one of these buttons!