我正在尝试使用MetalKit应用程序接口newTextureWithContentsOfURL来创建cow的纹理。
MTKTextureLoader *texture_loader = [[MTKTextureLoader alloc] initWithDevice:device];
NSURL *cow_image = [[NSBundle mainBundle] URLForResource:@"spot_texture" withExtension:@"png"];
NSError *error;
diffuse_texture = [texture_loader newTextureWithContentsOfURL:cow_image options:nil error:&error];这是示例母牛和我的母牛外观。
我不知道这样做的原因,但我认为这个选择可能会有所帮助。
如何使用NSDictionary设置此选项?
https://stackoverflow.com/questions/51298701
复制相似问题