我正在尝试从金属表面获取纹理id。
我有两个问题1.那个函数没有定义
GLint glTextureID = CGLTexImageIOSurface2D(self.mEAGLContext, GL_TEXTURE_2D, GL_RGBA , textureWidth, textureHeight, GL_RGBA , GL_UNSIGNED_BYTE, ioSurface, 0);我试图包含它#import OpenGL/CGLIOSurface.h,但xcode无法识别它,它不在那里。
在ios,metal中,有没有其他方法可以从iosurface中获取纹理id?
发布于 2021-09-20 19:03:20
在我的软件中,下面这行代码拉入所请求的函数:
#include <OpenGL/CGLIOSurface.h>在我的xcode安装中,这个头文件位于以下位置:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/CGLIOSurface.h
请注意,我使用的是MacOS SDK。也许iOS不支持GL/iOS表面共享?
https://stackoverflow.com/questions/53692226
复制相似问题