Is there a way to list all CVPixelBuffer formats for CVPixelBufferCreate() that will not generate error -6683: kCVReturnPixelBufferNotOpenGLCompatible when used with CVOpenGLESTextureCacheCreateTextureFromImage()?
This lists all the supported CVPixelBuffer formats for CVPixelBufferCreate(), but does not guarantee that CVOpenGLESTextureCacheCreateTextureFromImage() will not return the error above.
I guess my desired list should be a subset of this one.
Based on the answer from Adi Shavit above, here's a full code snippet (Objective-C) that you can use to print all the current OpenGL ES compatible pixel formats:
You can put this snippet anywhere in a Objective-C category or class to print which pixel format are compatible and which aren't. For completeness purposes, here are all the pixel formats currently compatible with OpenGL ES as of iOS 10.2.1:
L5655551L5552vuyyuvsyuvfL008L0162C082C16BGRA420v420f420e411v411f422v422f444v444fL00hL00f2C0h2C0fRGhARGfA