summaryrefslogtreecommitdiff
path: root/cogl/cogl-journal-private.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2010-11-02 17:35:17 +0000
committerNeil Roberts <neil@linux.intel.com>2010-11-04 18:10:09 +0000
commit3c8c1951151f16bedc7e298e2f0a8af536643617 (patch)
tree8e802d686f9508670032ea3b16acbfbd32f38155 /cogl/cogl-journal-private.h
parent6cf01ff0f49f085e7fc90e0263246ec070bb0e0c (diff)
downloadcogl-3c8c1951151f16bedc7e298e2f0a8af536643617.tar.gz
cogl-journal: Log the clip state in the journal
When adding a new entry to the journal a reference is now taken on the current clip stack. Modifying the current clip state no longer causes a journal flush. The journal flushing code now has an extra stage to compare the clip state of each entry. The comparison can simply be done by comparing the pointers. Although different clip states will still end up with multiple draw calls this at leasts allows a scene comprising of multiple different clips to be upload with one vbo. It also lays the groundwork to do certain tricks when drawing clipped rectangles such as modifying the geometry instead of setting a clip state.
Diffstat (limited to 'cogl/cogl-journal-private.h')
-rw-r--r--cogl/cogl-journal-private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cogl/cogl-journal-private.h b/cogl/cogl-journal-private.h
index a38fa801..977866eb 100644
--- a/cogl/cogl-journal-private.h
+++ b/cogl/cogl-journal-private.h
@@ -25,6 +25,7 @@
#define __COGL_JOURNAL_PRIVATE_H
#include "cogl-handle.h"
+#include "cogl-clip-stack.h"
/* To improve batching of geometry when submitting vertices to OpenGL we
* log the texture rectangles we want to draw to a journal, so when we
@@ -34,6 +35,7 @@ typedef struct _CoglJournalEntry
CoglPipeline *pipeline;
int n_layers;
CoglMatrix model_view;
+ CoglClipStack *clip_stack;
/* XXX: These entries are pretty big now considering the padding in
* CoglPipelineFlushOptions and CoglMatrix, so we might need to optimize this
* later. */