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
This commit is contained in:
Julien Isorce 2014-04-24 08:49:54 +01:00 committed by Tim-Philipp Müller
parent e4b832db90
commit 545bed3c7a

View file

@ -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