我正在使用GLKTextureLoader
将图像纹理加载到精灵中。
当我运行以下代码并加载两个精灵时......
NSString *pathToImage = [NSString stringWithFormat:@"%@/defaultProject/images/%@", [Util applicationDocumentsDirectory], fileName];
NSLog(@"path: %@", pathToImage);
self.textureInfo = [GLKTextureLoader textureWithContentsOfFile:pathToImage options:options error:&error];
if (self.textureInfo == nil)
{
NSLog(@"Error loading file: %@", [error localizedDescription]);
return;
}
...第一张图片失败,但第二张图片失败。
错误是:
Error loading file: The operation couldn’t be completed. (GLKTextureLoaderErrorDomain error 12.).
有谁知道这个错误是什么意思?我还没有找到关于代码 12 的任何信息。
提前致谢!