mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +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
b83d2df47d
commit
9062658bc7
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;
|
guint out_width, out_height;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
|
GLint viewport_dim[4];
|
||||||
|
|
||||||
const GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
|
const GLfloat vVertices[] = { 1.0f, -1.0f, 0.0f,
|
||||||
1.0f, 0.0f,
|
1.0f, 0.0f,
|
||||||
-1.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)
|
else if (gl->DrawBuffer)
|
||||||
gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
|
gl->DrawBuffer (GL_COLOR_ATTACHMENT0);
|
||||||
|
|
||||||
|
gl->GetIntegerv (GL_VIEWPORT, viewport_dim);
|
||||||
|
|
||||||
gl->Viewport (0, 0, out_width, out_height);
|
gl->Viewport (0, 0, out_width, out_height);
|
||||||
|
|
||||||
gl->ClearColor (0.0, 0.0, 0.0, 0.0);
|
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 */
|
/* we are done with the shader */
|
||||||
gst_gl_context_clear_shader (context);
|
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);
|
gst_gl_context_check_framebuffer_status (context);
|
||||||
|
|
||||||
gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
|
gl->BindFramebuffer (GL_FRAMEBUFFER, 0);
|
||||||
|
|
Loading…
Reference in a new issue