From b3fe1b8a8a663fc8ac5e2388c7dbc7aa20929bce Mon Sep 17 00:00:00 2001 From: Neil Roberts <neil@linux.intel.com> Date: Fri, 22 May 2009 11:41:02 +0100 Subject: [PATCH] [cogl-vertex-buffer] Ensure the clip state before rendering Before any rendering is done by Cogl it needs to ensure the clip stack is set up correctly by calling cogl_clip_ensure. This was not being done for the Cogl vertex buffer so it would still use the clip from the previous render. --- clutter/cogl/common/cogl-vertex-buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clutter/cogl/common/cogl-vertex-buffer.c b/clutter/cogl/common/cogl-vertex-buffer.c index 28c9df46b..f6fa6ba89 100644 --- a/clutter/cogl/common/cogl-vertex-buffer.c +++ b/clutter/cogl/common/cogl-vertex-buffer.c @@ -1726,6 +1726,8 @@ cogl_vertex_buffer_draw (CoglHandle handle, if (!cogl_is_vertex_buffer (handle)) return; + cogl_clip_ensure (); + buffer = _cogl_vertex_buffer_pointer_from_handle (handle); enable_state_for_drawing_buffer (buffer); @@ -1754,6 +1756,8 @@ cogl_vertex_buffer_draw_elements (CoglHandle handle, if (!cogl_is_vertex_buffer (handle)) return; + cogl_clip_ensure (); + buffer = _cogl_vertex_buffer_pointer_from_handle (handle); enable_state_for_drawing_buffer (buffer);