更新时间:2023-11-13 10:16:10
解决了。 iOS上的glReadPixels不支持RGBA到BGRA转换。
更改
Solved. RGBA to BGRA conversion is not supported by glReadPixels on iOS. Changing
glReadPixels(0, 0, _videoDimensions.width, _videoDimensions.height, GL_BGRA_EXT, GL_UNSIGNED_BYTE, CVPixelBufferGetBaseAddress(outPixelBuffer));
到
glReadPixels(0, 0, _videoDimensions.width, _videoDimensions.height, GL_RGBA, GL_UNSIGNED_BYTE, CVPixelBufferGetBaseAddress(outPixelBuffer));
解决问题。 glGetError是我的新朋友;)
Solves the problem. glGetError is my new friend ;)