0

I seem to be a little restricted by openGLs GLKTextureLoader. I'm trying to get sprite animation working so I'm trying to load a texture atlas. The texture loader doesn't seem to allow me to break the image into pieces.

This is the relevant code

    NSDictionary * options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES],
                              GLKTextureLoaderOriginBottomLeft, nil];

    NSError * error;
    NSString *path = [[NSBundle mainBundle] pathForResource:filename ofType:nil];

    self.textureInfo = [GLKTextureLoader textureWithContentsOfFile:path options:options error:&error];

any thoughts?

Shekhar Gupta
  • 6,206
  • 3
  • 30
  • 50
user2577959
  • 285
  • 1
  • 2
  • 6

1 Answers1

0

Why would you need to break the image into pieces? The whole point of a texture atlas is that you can use bits of it just by choosing appropriate texture coordinates to only show part of it.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131