[484/906] libvisual_gl: correctly setup depth and blend functions
This commit is contained in:
parent
5091066426
commit
c298f99b5d
@ -764,6 +764,16 @@ render_frame (gint width, gint height, guint texture, GstVisualGL * visual)
|
|||||||
|
|
||||||
actor_negotiate (visual->display, 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);
|
glMatrixMode (GL_MODELVIEW);
|
||||||
glScaled (1.0, -1.0, 1.0);
|
glScaled (1.0, -1.0, 1.0);
|
||||||
|
|
||||||
@ -777,6 +787,9 @@ render_frame (gint width, gint height, guint texture, GstVisualGL * visual)
|
|||||||
|
|
||||||
glPopAttrib ();
|
glPopAttrib ();
|
||||||
|
|
||||||
|
glDisable (GL_DEPTH_TEST);
|
||||||
|
glDisable (GL_BLEND);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (visual, "rendered one frame");
|
GST_DEBUG_OBJECT (visual, "rendered one frame");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user