summaryrefslogtreecommitdiff
path: root/cogl/cogl-framebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'cogl/cogl-framebuffer.c')
-rw-r--r--cogl/cogl-framebuffer.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 43971c2c..8865ba9d 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -3245,7 +3245,8 @@ draw_wireframe (CoglContext *ctx,
int n_vertices,
CoglAttribute **attributes,
int n_attributes,
- CoglIndices *indices)
+ CoglIndices *indices,
+ CoglDrawFlags flags)
{
CoglIndices *wire_indices;
CoglPipeline *wire_pipeline;
@@ -3294,7 +3295,7 @@ draw_wireframe (CoglContext *ctx,
}
/* temporarily disable the wireframe to avoid recursion! */
- COGL_DEBUG_CLEAR_FLAG (COGL_DEBUG_WIREFRAME);
+ flags |= COGL_DRAW_SKIP_DEBUG_WIREFRAME;
_cogl_framebuffer_draw_indexed_attributes (
framebuffer,
wire_pipeline,
@@ -3304,10 +3305,7 @@ draw_wireframe (CoglContext *ctx,
wire_indices,
attributes,
n_attributes,
- COGL_DRAW_SKIP_JOURNAL_FLUSH |
- COGL_DRAW_SKIP_PIPELINE_VALIDATION |
- COGL_DRAW_SKIP_FRAMEBUFFER_FLUSH |
- COGL_DRAW_SKIP_LEGACY_STATE);
+ flags);
COGL_DEBUG_SET_FLAG (COGL_DEBUG_WIREFRAME);
cogl_object_unref (wire_indices);
@@ -3328,11 +3326,13 @@ _cogl_framebuffer_draw_attributes (CoglFramebuffer *framebuffer,
CoglDrawFlags flags)
{
#ifdef COGL_ENABLE_DEBUG
- if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME)))
+ if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME) &&
+ (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0))
draw_wireframe (framebuffer->context,
framebuffer, pipeline,
mode, first_vertex, n_vertices,
- attributes, n_attributes, NULL);
+ attributes, n_attributes, NULL,
+ flags);
else
#endif
{
@@ -3422,11 +3422,13 @@ _cogl_framebuffer_draw_indexed_attributes (CoglFramebuffer *framebuffer,
CoglDrawFlags flags)
{
#ifdef COGL_ENABLE_DEBUG
- if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME)))
+ if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_WIREFRAME) &&
+ (flags & COGL_DRAW_SKIP_DEBUG_WIREFRAME) == 0))
draw_wireframe (framebuffer->context,
framebuffer, pipeline,
mode, first_vertex, n_vertices,
- attributes, n_attributes, indices);
+ attributes, n_attributes, indices,
+ flags);
else
#endif
{