对金属中IOSurface的未定义引用

时间:2018-12-09 16:56:09

标签: ios objective-c metal

我正在尝试初始化IOSurface,并且获得对所有属性的未定义引用。

 NSDictionary* dict = @{
                           IOSurfacePropertyKeyWidth: [NSNumber numberWithInt:textureWidth],
                           IOSurfacePropertyKeyHeight: [NSNumber numberWithInt:textureHeight],
                           IOSurfacePropertyKeyBytesPerElement: [NSNumber numberWithInt:4],
                           IOSurfacePropertyKeyPixelFormat: [NSNumber numberWithInt:'BGRA'],
                           (NSString*)kIOSurfaceIsGlobal: [NSNumber numberWithBool:YES]
                        };
IOSurfaceRef surface = IOSurfaceCreate((CFDictionaryRef)dict);

1 个答案:

答案 0 :(得分:-1)

我必须在xcode中包含iosframework。