mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
[484/906] libvisual_gl: correctly setup depth and blend functions
This commit is contained in:
parent
5091066426
commit
c298f99b5d
1 changed files with 13 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue