mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gl/color: restore viewport dimensions when fbo done
Regression introduced by 95abfda139
.
It caused to display the wrong frame size when resizing the window.
This commit is contained in:
parent
47f7bf269a
commit
0586e49726
1 changed files with 7 additions and 0 deletions
|
@ -1257,6 +1257,8 @@ _do_convert_draw (GstGLContext * context, GstGLColorConvert * convert)
|
|||
guint out_width, out_height;
|
||||
gint i;
|
||||
|
||||
GLint viewport_dim[4];
|
||||
|
||||
const GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
|
||||
1.0f, 0.0f,
|
||||
-1.0f, -1.0f, 0.0f,
|
||||
|
@ -1303,6 +1305,8 @@ _do_convert_draw (GstGLContext * context, GstGLColorConvert * convert)
|
|||
else if (gl->DrawBuffer)
|
||||
gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
|
||||
|
||||
gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
|
||||
|
||||
gl->Viewport (0, 0, out_width, out_height);
|
||||
|
||||
gl->ClearColor (0.0, 0.0, 0.0, 0.0);
|
||||
|
@ -1344,6 +1348,9 @@ _do_convert_draw (GstGLContext * context, GstGLColorConvert * convert)
|
|||
/* we are done with the shader */
|
||||
gst_gl_context_clear_shader (context);
|
||||
|
||||
gl->Viewport (viewport_dim[0], viewport_dim[1], viewport_dim[2],
|
||||
viewport_dim[3]);
|
||||
|
||||
gst_gl_context_check_framebuffer_status (context);
|
||||
|
||||
gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
|
||||
|
|
Loading…
Reference in a new issue