From aa4bdcd70742be90a8201d0007b4772218948ebc Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Thu, 24 Apr 2014 08:49:54 +0100 Subject: [PATCH] gl/cocoa: set the view to use for drawing by the context It avoids to draw to an invalid buffer. Withtout this the default frame buffer is undefined: glBindFramebuffer (GL_FRAMEBUFFER, 0) Visually you could see some white frames at the beginning when lunching videotestsrc ! glimagesink With OpenGL Profiler from XCode you could see some GL_INVALID_FRAMEBUFFER_OPERATION for the first frames --- gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m index 023b64147a..c40be80575 100644 --- a/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m +++ b/gst-libs/gst/gl/cocoa/gstglcontext_cocoa.m @@ -261,6 +261,8 @@ gst_gl_context_cocoa_create_context (GstGLContext *context, GstGLAPI gl_api, context_cocoa->priv->gl_context = glContext; + [glContext setView:glView]; + [glView setOpenGLContext:glContext]; #else