mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(iOS Camera) Create CVEAGLContext pointer and pass it to CVOpenGLESTextureCacheCreate
This commit is contained in:
parent
c1173388c2
commit
ca41ad224d
@ -60,18 +60,23 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
|
||||
event_process_camera_frame(pixelBuffer);
|
||||
}
|
||||
|
||||
/* TODO - add void param to onCameraInit so we can pass g_context. */
|
||||
- (void) onCameraInit
|
||||
{
|
||||
NSError *error;
|
||||
AVCaptureVideoDataOutput * dataOutput;
|
||||
AVCaptureDeviceInput *input;
|
||||
AVCaptureDevice *videoDevice;
|
||||
CVEAGLContext egl_context = (CVEAGLContext)g_context;
|
||||
|
||||
if (!egl_context)
|
||||
return;
|
||||
|
||||
#if COREVIDEO_USE_EAGLCONTEXT_CLASS_IN_API
|
||||
CVReturn ret = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, g_context, NULL, &textureCache);
|
||||
CVReturn ret = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, (CVEAGLContext)egl_context, NULL, &textureCache);
|
||||
|
||||
#else
|
||||
CVReturn ret = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, (__bridge void *)g_context, NULL, &textureCache);
|
||||
CVReturn ret = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, (__bridge void *)egl_context, NULL, &textureCache);
|
||||
#endif
|
||||
(void)ret;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user