From c73d3404483c67b2d15eac17ef95cb9cabadf29f Mon Sep 17 00:00:00 2001 From: Neil Roberts 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. --- common/cogl-vertex-buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/cogl-vertex-buffer.c b/common/cogl-vertex-buffer.c index 28c9df46b..f6fa6ba89 100644 --- a/common/cogl-vertex-buffer.c +++ b/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);