Pixel formats, CVPixelBufferRefs and glReadPixels

后端 未结 5 2044
太阳男子
太阳男子 2020-12-15 13:16

I\'m using glReadPixels to read data into a CVPixelBufferRef. I use the CVPixelBufferRef as the input into an AVAssetWriter

5条回答
  •  悲&欢浪女
    2020-12-15 14:19

    glReadPixels(0, 0, w*s, h*s, GL_BGRA, GL_UNSIGNED_BYTE, buffer);

    Use GL_BGRA in glReadPixels. It works, just tried it myself.

提交回复
热议问题