summaryrefslogtreecommitdiff
path: root/cogl/cogl-private.h
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2010-11-02 17:15:06 +0000
committerNeil Roberts <neil@linux.intel.com>2010-11-04 18:10:08 +0000
commitcaa991d7a1b9b3ee34a04b54db6adcf99ed0d72d (patch)
treefbdc9512ee72759d236c6a846489b032e55c64ca /cogl/cogl-private.h
parentdb86a5a4867b4a31a9f18a3486cdbd3ff1758502 (diff)
downloadcogl-caa991d7a1b9b3ee34a04b54db6adcf99ed0d72d.tar.gz
cogl: Don't flush the journal when flushing clip state
Flushing the clip state no longer does anything that would cause the journal to flush. The clip state is only flushed when flushing the framebuffer state and in all cases this ends up flushing the journal in one way or another anyway. Avoiding flushing the journal will make it easier to log the clip state in the journal. Previously when trying to set up a rectangle clip that can't be scissored or when using a path clip the code would use cogl_rectangle as part of the process to fill the stencil buffer. This is now changed to use a new internal _cogl_rectangle_immediate function which directly uses the vertex array API to draw a triangle strip without affecting the journal. This should be just as efficient as the previous journalled code because these places would end up flushing the journal immediately before and after submitting the single rectangle anyway and flushing the journal always creates a new vbo so it would effectively do the same thing. Similarly there is also a new internal _cogl_clear function that does not flush the journal.
Diffstat (limited to 'cogl/cogl-private.h')
-rw-r--r--cogl/cogl-private.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/cogl/cogl-private.h b/cogl/cogl-private.h
new file mode 100644
index 00000000..c2f6947a
--- /dev/null
+++ b/cogl/cogl-private.h
@@ -0,0 +1,34 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2010 Intel Corporation.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ */
+
+#ifndef __COGL_PRIVATE_H__
+#define __COGL_PRIVATE_H__
+
+G_BEGIN_DECLS
+
+void
+_cogl_clear (const CoglColor *color, unsigned long buffers);
+
+G_END_DECLS
+
+#endif /* __COGL_PRIVATE_H__ */