[cogl/cogl-1.12] debug: ignore wireframe debug drawing for line primitives



commit 71f20064ab8185921ea95a4920d20c60dd7ad13d
Author: Robert Bragg <robert linux intel com>
Date:   Mon Jul 9 18:03:33 2012 +0100

    debug: ignore wireframe debug drawing for line primitives
    
    If a primitive is already line based then we don't need to do anything
    special to draw it in wireframe mode.
    
    Reviewed-by: Neil Roberts <neil linux intel com>
    
    (cherry picked from commit fb575a42c308739a7185311a613b1a5f49dbfb39)

 cogl/cogl-framebuffer.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 83b1b3a..f94bd00 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -3336,7 +3336,10 @@ _cogl_framebuffer_draw_attributes (CoglFramebuffer *framebuffer,
 {
 #ifdef COGL_ENABLE_DEBUG
   if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME) &&
-                  (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0))
+                  (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0) &&
+      mode != COGL_VERTICES_MODE_LINES &&
+      mode != COGL_VERTICES_MODE_LINE_LOOP &&
+      mode != COGL_VERTICES_MODE_LINE_STRIP)
     draw_wireframe (framebuffer->context,
                     framebuffer, pipeline,
                     mode, first_vertex, n_vertices,
@@ -3432,7 +3435,10 @@ _cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
 {
 #ifdef COGL_ENABLE_DEBUG
   if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME) &&
-                  (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0))
+                  (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0) &&
+      mode != COGL_VERTICES_MODE_LINES &&
+      mode != COGL_VERTICES_MODE_LINE_LOOP &&
+      mode != COGL_VERTICES_MODE_LINE_STRIP)
     draw_wireframe (framebuffer->context,
                     framebuffer, pipeline,
                     mode, first_vertex, n_vertices,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]