[649/906] effects: fixes for mirror(1) and squeeze(2) producing black

This commit is contained in:
Matthew Waters 2013-01-16 22:27:10 +11:00
parent 792db73013
commit 5b88246a05
2 changed files with 14 additions and 6 deletions

View file

@ -79,11 +79,15 @@ gst_gl_effects_mirror_callback (gint width, gint height, guint texture,
return;
}
gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity ();
}
#endif
}
#if GST_GL_HAVE_OPENGL
if (USING_OPENGL (display)) {
gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity ();
}
#endif
gst_gl_shader_use (shader);

View file

@ -78,11 +78,15 @@ gst_gl_effects_squeeze_callback (gint width, gint height, guint texture,
GST_GL_DISPLAY_ERR_MSG (display), (NULL));
return;
}
gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity ();
}
#endif
}
#if GST_GL_HAVE_OPENGL
if (USING_OPENGL (display)) {
gl->MatrixMode (GL_PROJECTION);
gl->LoadIdentity ();
}
#endif
gst_gl_shader_use (shader);
@ -92,8 +96,8 @@ gst_gl_effects_squeeze_callback (gint width, gint height, guint texture,
gst_gl_shader_set_uniform_1i (shader, "tex", 0);
#if GST_GL_HAVE_GLES2
if (USING_GLES2 (filter->display)) {
#if GST_GL_HAVE_OPENGL
if (USING_OPENGL (filter->display)) {
gst_gl_shader_set_uniform_1f (shader, "width", (gfloat) width / 2.0f);
gst_gl_shader_set_uniform_1f (shader, "height", (gfloat) height / 2.0f);
}