112 if (CVMetalTextureCacheCreate(
115 (id<MTLDevice>)metal->dev,
118 qWarning() <<
"Metal texture cache creation failed";
127 auto nsGLPixelFormat = nsGLContext.pixelFormat.CGLPixelFormatObj;
130 if (CVOpenGLTextureCacheCreate(
133 reinterpret_cast<CGLContextObj
>(nsGLContext.CGLContextObj),
136 &cvOpenGLTextureCache)) {
137 qWarning() <<
"OpenGL texture cache creation failed";
143 if (CVOpenGLESTextureCacheCreate(
146 [EAGLContext currentContext],
148 &cvOpenGLESTextureCache)) {
149 qWarning() <<
"OpenGL texture cache creation failed";
185 dictionary = @{(NSString *)kCVPixelBufferPixelFormatTypeKey:
186 @(kCVPixelFormatType_32BGRA)
188 , (NSString *)kCVPixelBufferOpenGLCompatibilityKey: @
true
193 dictionary = @{(NSString *)kCVPixelBufferPixelFormatTypeKey:
195 @(kCVPixelFormatType_32BGRA),
196 @(kCVPixelFormatType_32RGBA),
197 @(kCVPixelFormatType_422YpCbCr8),
198 @(kCVPixelFormatType_422YpCbCr8_yuvs),
199 @(kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange),
200 @(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange),
201 @(kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange),
202 @(kCVPixelFormatType_420YpCbCr10BiPlanarFullRange),
203 @(kCVPixelFormatType_OneComponent8),
204 @(kCVPixelFormatType_OneComponent16),
205 @(kCVPixelFormatType_420YpCbCr8Planar),
206 @(kCVPixelFormatType_420YpCbCr8PlanarFullRange)
209 , (NSString *)kCVPixelBufferMetalCompatibilityKey: @
true
Native interface to an NSOpenGLContext on \macos.