Rotate Texture by 90 degrees

From AwkwardTV
Revision as of 17:03, 8 June 2007 by Axxr (talk | contribs)
Jump to: navigation, search


Because I needed a Vertical Progressbar, I had to get images of the stock Progress graphics rotate by 90 degrees. With some help from alan, this is the result.

Texture Cache

Since we don't want to have to do this stuff everytime our plugin loads, we'll use the Texture cache.

- (BRTexture*)loadImageAndRotate:(NSString*)path
  NSString* cacheName = [NSString stringWithFormat:@"%iROT_%@", 
                                                 [ [path lastPathComponent] 
                                                        stringByDeletingPathExtension] ]; 
  BRTexture* texture = [[self scene] cachedTextureForKey: cacheName];