A question about glDeleteTextures

Member
Posts: 34
Joined: 2009.01
Post: #4
Actually it seems like loading a texture with :

spriteImage = [UIImage imageNamed:name].CGImage;

is caching the file, and using memory.

It's better to use :

NSData *texData = [[NSData alloc] initWithContentsOfFile:path];
UIImage *image = [[UIImage alloc] initWithData:texData];
spriteImage = image.CGImage;

My first game on AppStore : here
Quote this message in a reply
Post Reply 


Messages In This Thread
A question about glDeleteTextures - ShiftZ - Jun 4, 2009, 02:57 AM
A question about glDeleteTextures - Fred9000 - Jun 22, 2009 01:55 AM