[484/906] libvisual_gl: correctly setup depth and blend functions

This commit is contained in:
Julien Isorce 2011-12-15 18:08:48 +01:00 committed by Matthew Waters
parent 5091066426
commit c298f99b5d

View file

@ -764,6 +764,16 @@ render_frame (gint width, gint height, guint texture, GstVisualGL * visual)
actor_negotiate (visual->display, visual);
if (visual->is_enabled_gl_depth_test) {
glEnable (GL_DEPTH_TEST);
glDepthFunc (visual->gl_depth_func);
}
if (visual->is_enabled_gl_blend) {
glEnable (GL_BLEND);
glBlendFunc (visual->gl_blend_src_alpha, GL_ZERO);
}
glMatrixMode (GL_MODELVIEW);
glScaled (1.0, -1.0, 1.0);
@ -777,6 +787,9 @@ render_frame (gint width, gint height, guint texture, GstVisualGL * visual)
glPopAttrib ();
glDisable (GL_DEPTH_TEST);
glDisable (GL_BLEND);
GST_DEBUG_OBJECT (visual, "rendered one frame");
}