GLKTextureLoader memory pointer

117 views Asked by At

I'm loading a texture atlas [XCode 5.1.1, IOS 6.1], using GLKTextureLoader, as per quite a few articles online, thus:

    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];

    if (self.textureInfo == nil) {
        NSLog(@"Error loading file: %@ %@",fileName, [error localizedDescription]);
        return nil;
    }

I've searched and searched, but cannot find out how to get a pointer to the actually pixel data. I want to use glReadPixels to overwrite some of the pixel data from an offscreen framebuffer.

Max

0

There are 0 answers