summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2012-11-20 18:58:05 +0000
committerRobert Bragg <robert@linux.intel.com>2013-01-21 14:20:39 +0000
commit092a5f4c78dea969a30ff2633c908947d796c8d8 (patch)
tree9cb92717c962746dbbb33eec7144cccff8bcb5b4
parentbf69cfa582e8e7c241fbfa969e8577a1b8b927cb (diff)
downloadcogl-092a5f4c78dea969a30ff2633c908947d796c8d8.tar.gz
Remove cogl-internal.h
This remove cogl-internal.h in favour of using cogl-private.h. Some things in cogl-internal.h were moved to driver/gl/cogl-util-gl-private.h and the _cogl_gl_error_to_string function whose prototype was moved from cogl-internal.h to cogl-util-gl-private.h has had its implementation moved from cogl.c to cogl-util-gl.c Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 01cc82ece091aa3bec4c07fdd6bc9e5135fca573)
-rw-r--r--cogl/Makefile.am1
-rw-r--r--cogl/cogl-atlas-texture.c1
-rw-r--r--cogl/cogl-bitmap-pixbuf.c1
-rw-r--r--cogl/cogl-blend-string.c1
-rw-r--r--cogl/cogl-boxed-value.c1
-rw-r--r--cogl/cogl-buffer.c1
-rw-r--r--cogl/cogl-clip-stack.c1
-rw-r--r--cogl/cogl-clip-state.c1
-rw-r--r--cogl/cogl-context-private.h1
-rw-r--r--cogl/cogl-context.c2
-rw-r--r--cogl/cogl-display-private.h1
-rw-r--r--cogl/cogl-display.c1
-rw-r--r--cogl/cogl-driver.h12
-rw-r--r--cogl/cogl-feature-private.h1
-rw-r--r--cogl/cogl-framebuffer.c2
-rw-r--r--cogl/cogl-glsl-shader.c2
-rw-r--r--cogl/cogl-internal.h133
-rw-r--r--cogl/cogl-journal.c1
-rw-r--r--cogl/cogl-matrix-stack.c2
-rw-r--r--cogl/cogl-path.c2
-rw-r--r--cogl/cogl-pipeline-layer-private.h2
-rw-r--r--cogl/cogl-pipeline-private.h2
-rw-r--r--cogl/cogl-pipeline.c1
-rw-r--r--cogl/cogl-primitives.c1
-rw-r--r--cogl/cogl-private.h44
-rw-r--r--cogl/cogl-program-private.h1
-rw-r--r--cogl/cogl-program.c2
-rw-r--r--cogl/cogl-renderer-private.h1
-rw-r--r--cogl/cogl-renderer.c2
-rw-r--r--cogl/cogl-sampler-cache.c1
-rw-r--r--cogl/cogl-shader.c2
-rw-r--r--cogl/cogl-spans.c1
-rw-r--r--cogl/cogl-sub-texture.c1
-rw-r--r--cogl/cogl-texture.c1
-rw-r--r--cogl/cogl-vertex-buffer.c1
-rw-r--r--cogl/cogl-xlib-renderer.c1
-rw-r--r--cogl/cogl-xlib.c1
-rw-r--r--cogl/cogl.c39
-rw-r--r--cogl/cogl2-path.c1
-rw-r--r--cogl/driver/gl/cogl-attribute-gl.c1
-rw-r--r--cogl/driver/gl/cogl-clip-stack-gl.c1
-rw-r--r--cogl/driver/gl/cogl-framebuffer-gl.c1
-rw-r--r--cogl/driver/gl/cogl-pipeline-fragend-fixed.c2
-rw-r--r--cogl/driver/gl/cogl-pipeline-fragend-glsl.c2
-rw-r--r--cogl/driver/gl/cogl-pipeline-opengl.c1
-rw-r--r--cogl/driver/gl/cogl-pipeline-progend-glsl.c2
-rw-r--r--cogl/driver/gl/cogl-pipeline-vertend-fixed.c2
-rw-r--r--cogl/driver/gl/cogl-pipeline-vertend-glsl.c2
-rw-r--r--cogl/driver/gl/cogl-texture-gl.c2
-rw-r--r--cogl/driver/gl/cogl-util-gl-private.h36
-rw-r--r--cogl/driver/gl/cogl-util-gl.c39
-rw-r--r--cogl/driver/gl/gl/cogl-driver-gl.c2
-rw-r--r--cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c2
-rw-r--r--cogl/driver/gl/gles/cogl-driver-gles.c2
-rw-r--r--cogl/driver/nop/cogl-driver-nop.c1
-rw-r--r--cogl/winsys/cogl-texture-pixmap-x11.c1
-rw-r--r--doc/reference/cogl-2.0-experimental/Makefile.am1
57 files changed, 155 insertions, 218 deletions
diff --git a/cogl/Makefile.am b/cogl/Makefile.am
index 3b9a6acc..84982cbc 100644
--- a/cogl/Makefile.am
+++ b/cogl/Makefile.am
@@ -272,7 +272,6 @@ cogl_sources_c = \
$(srcdir)/cogl-display-private.h \
$(srcdir)/cogl-display.h \
$(srcdir)/cogl-display.c \
- $(srcdir)/cogl-internal.h \
$(srcdir)/cogl-driver.h \
$(srcdir)/cogl.c \
$(srcdir)/cogl-object-private.h \
diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
index da4041fb..1f296be1 100644
--- a/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl-atlas-texture.c
@@ -29,7 +29,6 @@
#endif
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-texture-private.h"
#include "cogl-atlas-texture-private.h"
diff --git a/cogl/cogl-bitmap-pixbuf.c b/cogl/cogl-bitmap-pixbuf.c
index 855c997f..a02b253c 100644
--- a/cogl/cogl-bitmap-pixbuf.c
+++ b/cogl/cogl-bitmap-pixbuf.c
@@ -26,7 +26,6 @@
#endif
#include "cogl-util.h"
-#include "cogl-internal.h"
#include "cogl-bitmap-private.h"
#include "cogl-context-private.h"
#include "cogl-private.h"
diff --git a/cogl/cogl-blend-string.c b/cogl/cogl-blend-string.c
index 4313ab9d..0d90b66a 100644
--- a/cogl/cogl-blend-string.c
+++ b/cogl/cogl-blend-string.c
@@ -33,7 +33,6 @@
#include <glib.h>
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-debug.h"
#include "cogl-blend-string.h"
diff --git a/cogl/cogl-boxed-value.c b/cogl/cogl-boxed-value.c
index 59ff3b6b..f82f78b9 100644
--- a/cogl/cogl-boxed-value.c
+++ b/cogl/cogl-boxed-value.c
@@ -29,6 +29,7 @@
#include "cogl-boxed-value.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
CoglBool
_cogl_boxed_value_equal (const CoglBoxedValue *bva,
diff --git a/cogl/cogl-buffer.c b/cogl/cogl-buffer.c
index 2a6a7b1f..0600e01b 100644
--- a/cogl/cogl-buffer.c
+++ b/cogl/cogl-buffer.c
@@ -38,7 +38,6 @@
#include <string.h>
#include <glib.h>
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/cogl-clip-stack.c b/cogl/cogl-clip-stack.c
index a6b0d04b..eb0df198 100644
--- a/cogl/cogl-clip-stack.c
+++ b/cogl/cogl-clip-stack.c
@@ -34,7 +34,6 @@
#include "cogl-clip-stack.h"
#include "cogl-primitives.h"
#include "cogl-context-private.h"
-#include "cogl-internal.h"
#include "cogl-framebuffer-private.h"
#include "cogl-journal-private.h"
#include "cogl-util.h"
diff --git a/cogl/cogl-clip-state.c b/cogl/cogl-clip-state.c
index 9d1af9a3..cbf5599b 100644
--- a/cogl/cogl-clip-state.c
+++ b/cogl/cogl-clip-state.c
@@ -33,7 +33,6 @@
#include "cogl-clip-stack.h"
#include "cogl-clip-state-private.h"
#include "cogl-context-private.h"
-#include "cogl-internal.h"
#include "cogl-framebuffer-private.h"
#include "cogl-journal-private.h"
#include "cogl-util.h"
diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h
index 63400026..2780a59d 100644
--- a/cogl/cogl-context-private.h
+++ b/cogl/cogl-context-private.h
@@ -24,7 +24,6 @@
#ifndef __COGL_CONTEXT_PRIVATE_H
#define __COGL_CONTEXT_PRIVATE_H
-#include "cogl-internal.h"
#include "cogl-context.h"
#include "cogl-winsys-private.h"
#include "cogl-flags.h"
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index 3922cb13..6dff50cc 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -26,13 +26,13 @@
#endif
#include "cogl-object.h"
-#include "cogl-internal.h"
#include "cogl-private.h"
#include "cogl-winsys-private.h"
#include "winsys/cogl-winsys-stub-private.h"
#include "cogl-profile.h"
#include "cogl-util.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-display-private.h"
#include "cogl-renderer-private.h"
#include "cogl-journal-private.h"
diff --git a/cogl/cogl-display-private.h b/cogl/cogl-display-private.h
index 850cd631..04e3d328 100644
--- a/cogl/cogl-display-private.h
+++ b/cogl/cogl-display-private.h
@@ -29,7 +29,6 @@
#include "cogl-display.h"
#include "cogl-renderer.h"
#include "cogl-onscreen-template.h"
-#include "cogl-internal.h"
#ifdef COGL_HAS_WAYLAND_EGL_SERVER_SUPPORT
#include <wayland-server.h>
#endif
diff --git a/cogl/cogl-display.c b/cogl/cogl-display.c
index ec5f88a0..d943c2c6 100644
--- a/cogl/cogl-display.c
+++ b/cogl/cogl-display.c
@@ -32,7 +32,6 @@
#include "cogl-private.h"
#include "cogl-object.h"
-#include "cogl-internal.h"
#include "cogl-display-private.h"
#include "cogl-renderer-private.h"
diff --git a/cogl/cogl-driver.h b/cogl/cogl-driver.h
index ba6e0304..b857d561 100644
--- a/cogl/cogl-driver.h
+++ b/cogl/cogl-driver.h
@@ -267,5 +267,17 @@ struct _CoglDriverVtable
CoglError **error);
};
+#define COGL_DRIVER_ERROR (_cogl_driver_error_quark ())
+
+typedef enum { /*< prefix=COGL_DRIVER_ERROR >*/
+ COGL_DRIVER_ERROR_UNKNOWN_VERSION,
+ COGL_DRIVER_ERROR_INVALID_VERSION,
+ COGL_DRIVER_ERROR_NO_SUITABLE_DRIVER_FOUND,
+ COGL_DRIVER_ERROR_FAILED_TO_LOAD_LIBRARY
+} CoglDriverError;
+
+uint32_t
+_cogl_driver_error_quark (void);
+
#endif /* __COGL_DRIVER_H */
diff --git a/cogl/cogl-feature-private.h b/cogl/cogl-feature-private.h
index e6f895d5..4db05a29 100644
--- a/cogl/cogl-feature-private.h
+++ b/cogl/cogl-feature-private.h
@@ -26,7 +26,6 @@
#include <glib.h>
-#include "cogl-internal.h"
#define COGL_CHECK_GL_VERSION(driver_major, driver_minor, \
target_major, target_minor) \
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 704410ec..48f1e174 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -29,8 +29,8 @@
#include <string.h>
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-display-private.h"
#include "cogl-renderer-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/cogl-glsl-shader.c b/cogl/cogl-glsl-shader.c
index 894bafdf..3b2764ac 100644
--- a/cogl/cogl-glsl-shader.c
+++ b/cogl/cogl-glsl-shader.c
@@ -31,9 +31,9 @@
#endif
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-glsl-shader-private.h"
#include "cogl-glsl-shader-boilerplate.h"
-#include "cogl-internal.h"
#include <string.h>
diff --git a/cogl/cogl-internal.h b/cogl/cogl-internal.h
deleted file mode 100644
index fa921a65..00000000
--- a/cogl/cogl-internal.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Cogl
- *
- * An object oriented GL/GLES Abstraction/Utility Layer
- *
- * Copyright (C) 2007,2008,2009,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_INTERNAL_H
-#define __COGL_INTERNAL_H
-
-#include "cogl-bitmask.h"
-#include "cogl-gl-header.h"
-
-#ifdef COGL_HAS_XLIB_SUPPORT
-#include <X11/Xutil.h>
-#endif
-
-#ifdef COGL_GL_DEBUG
-
-const char *
-_cogl_gl_error_to_string (GLenum error_code);
-
-#define GE(ctx, x) G_STMT_START { \
- GLenum __err; \
- (ctx)->x; \
- while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
- { \
- g_warning ("%s: GL error (%d): %s\n", \
- G_STRLOC, \
- __err, \
- _cogl_gl_error_to_string (__err)); \
- } } G_STMT_END
-
-#define GE_RET(ret, ctx, x) G_STMT_START { \
- GLenum __err; \
- ret = (ctx)->x; \
- while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
- { \
- g_warning ("%s: GL error (%d): %s\n", \
- G_STRLOC, \
- __err, \
- _cogl_gl_error_to_string (__err)); \
- } } G_STMT_END
-
-#else /* !COGL_GL_DEBUG */
-
-#define GE(ctx, x) ((ctx)->x)
-#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
-
-#endif /* COGL_GL_DEBUG */
-
-#define COGL_ENABLE_ALPHA_TEST (1<<1)
-#define COGL_ENABLE_VERTEX_ARRAY (1<<2)
-#define COGL_ENABLE_COLOR_ARRAY (1<<3)
-
-void
-_cogl_enable (unsigned long flags);
-
-unsigned long
-_cogl_get_enable (void);
-
-void
-_cogl_transform_point (const CoglMatrix *matrix_mv,
- const CoglMatrix *matrix_p,
- const float *viewport,
- float *x,
- float *y);
-
-#define COGL_DRIVER_ERROR (_cogl_driver_error_domain ())
-
-typedef enum { /*< prefix=COGL_DRIVER_ERROR >*/
- COGL_DRIVER_ERROR_UNKNOWN_VERSION,
- COGL_DRIVER_ERROR_INVALID_VERSION,
- COGL_DRIVER_ERROR_NO_SUITABLE_DRIVER_FOUND,
- COGL_DRIVER_ERROR_FAILED_TO_LOAD_LIBRARY
-} CoglDriverError;
-
-typedef enum
-{
- COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
- COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1,
- COGL_PRIVATE_FEATURE_STENCIL_BUFFER = 1L<<2,
- COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3,
- COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES = 1L<<4,
- COGL_PRIVATE_FEATURE_PBOS = 1L<<5,
- COGL_PRIVATE_FEATURE_VBOS = 1L<<6,
- COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL = 1L<<7,
- COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL = 1L<<8,
- COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888 = 1L<<9,
- COGL_PRIVATE_FEATURE_UNPACK_SUBIMAGE = 1L<<10,
- COGL_PRIVATE_FEATURE_SAMPLER_OBJECTS = 1L<<11,
- COGL_PRIVATE_FEATURE_FIXED_FUNCTION = 1L<<12,
- COGL_PRIVATE_FEATURE_READ_PIXELS_ANY_FORMAT = 1L<<13,
- COGL_PRIVATE_FEATURE_ANY_GL = 1L<<14,
- COGL_PRIVATE_FEATURE_ALPHA_TEST = 1L<<15,
- COGL_PRIVATE_FEATURE_FORMAT_CONVERSION = 1L<<16,
- COGL_PRIVATE_FEATURE_QUADS = 1L<<17,
- COGL_PRIVATE_FEATURE_BLEND_CONSTANT = 1L<<18,
- COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS = 1L<<19,
- COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM = 1L<<20,
- COGL_PRIVATE_FEATURE_QUERY_TEXTURE_PARAMETERS = 1L<<21,
- COGL_PRIVATE_FEATURE_ALPHA_TEXTURES = 1L<<22,
- COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE = 1L<<23
-} CoglPrivateFeatureFlags;
-
-/* Sometimes when evaluating pipelines, either during comparisons or
- * if calculating a hash value we need to tweak the evaluation
- * semantics */
-typedef enum _CoglPipelineEvalFlags
-{
- COGL_PIPELINE_EVAL_FLAG_NONE = 0
-} CoglPipelineEvalFlags;
-
-uint32_t
-_cogl_driver_error_domain (void);
-
-#endif /* __COGL_INTERNAL_H */
diff --git a/cogl/cogl-journal.c b/cogl/cogl-journal.c
index fef4383e..95d7fc60 100644
--- a/cogl/cogl-journal.c
+++ b/cogl/cogl-journal.c
@@ -26,7 +26,6 @@
#endif
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-journal-private.h"
#include "cogl-texture-private.h"
diff --git a/cogl/cogl-matrix-stack.c b/cogl/cogl-matrix-stack.c
index 15933cd9..37cf0c6f 100644
--- a/cogl/cogl-matrix-stack.c
+++ b/cogl/cogl-matrix-stack.c
@@ -30,7 +30,7 @@
#endif
#include "cogl-context-private.h"
-#include "cogl-internal.h"
+#include "cogl-util-gl-private.h"
#include "cogl-matrix-stack.h"
#include "cogl-framebuffer-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/cogl-path.c b/cogl/cogl-path.c
index d940b7a8..8c19e8db 100644
--- a/cogl/cogl-path.c
+++ b/cogl/cogl-path.c
@@ -28,7 +28,7 @@
#endif
#include "cogl-util.h"
-#include "cogl-internal.h"
+#include "cogl-object.h"
#include "cogl-context-private.h"
#include "cogl2-path.h"
diff --git a/cogl/cogl-pipeline-layer-private.h b/cogl/cogl-pipeline-layer-private.h
index 84ccd9d6..7b047507 100644
--- a/cogl/cogl-pipeline-layer-private.h
+++ b/cogl/cogl-pipeline-layer-private.h
@@ -28,12 +28,12 @@
#ifndef __COGL_PIPELINE_LAYER_PRIVATE_H
#define __COGL_PIPELINE_LAYER_PRIVATE_H
+#include "cogl-private.h"
#include "cogl-pipeline.h"
#include "cogl-node-private.h"
#include "cogl-texture.h"
#include "cogl-matrix.h"
#include "cogl-pipeline-layer-state.h"
-#include "cogl-internal.h"
#include "cogl-pipeline-snippet-private.h"
#include "cogl-sampler-cache-private.h"
diff --git a/cogl/cogl-pipeline-private.h b/cogl/cogl-pipeline-private.h
index 74a5fd5a..0682e744 100644
--- a/cogl/cogl-pipeline-private.h
+++ b/cogl/cogl-pipeline-private.h
@@ -35,11 +35,11 @@
#include "cogl-object-private.h"
#include "cogl-profile.h"
#include "cogl-queue.h"
-#include "cogl-internal.h"
#include "cogl-boxed-value.h"
#include "cogl-pipeline-snippet-private.h"
#include "cogl-pipeline-state.h"
#include "cogl-framebuffer.h"
+#include "cogl-bitmask.h"
#include <glib.h>
diff --git a/cogl/cogl-pipeline.c b/cogl/cogl-pipeline.c
index ef2d933c..253707b5 100644
--- a/cogl/cogl-pipeline.c
+++ b/cogl/cogl-pipeline.c
@@ -30,7 +30,6 @@
#endif
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object.h"
diff --git a/cogl/cogl-primitives.c b/cogl/cogl-primitives.c
index a7bc6ada..18740247 100644
--- a/cogl/cogl-primitives.c
+++ b/cogl/cogl-primitives.c
@@ -26,7 +26,6 @@
#endif
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-journal-private.h"
#include "cogl-texture-private.h"
diff --git a/cogl/cogl-private.h b/cogl/cogl-private.h
index 6644bd8c..eb104dc5 100644
--- a/cogl/cogl-private.h
+++ b/cogl/cogl-private.h
@@ -28,8 +28,52 @@
#include "cogl-context.h"
+
COGL_BEGIN_DECLS
+typedef enum
+{
+ COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE = 1L<<0,
+ COGL_PRIVATE_FEATURE_MESA_PACK_INVERT = 1L<<1,
+ COGL_PRIVATE_FEATURE_STENCIL_BUFFER = 1L<<2,
+ COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT = 1L<<3,
+ COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES = 1L<<4,
+ COGL_PRIVATE_FEATURE_PBOS = 1L<<5,
+ COGL_PRIVATE_FEATURE_VBOS = 1L<<6,
+ COGL_PRIVATE_FEATURE_EXT_PACKED_DEPTH_STENCIL = 1L<<7,
+ COGL_PRIVATE_FEATURE_OES_PACKED_DEPTH_STENCIL = 1L<<8,
+ COGL_PRIVATE_FEATURE_TEXTURE_FORMAT_BGRA8888 = 1L<<9,
+ COGL_PRIVATE_FEATURE_UNPACK_SUBIMAGE = 1L<<10,
+ COGL_PRIVATE_FEATURE_SAMPLER_OBJECTS = 1L<<11,
+ COGL_PRIVATE_FEATURE_FIXED_FUNCTION = 1L<<12,
+ COGL_PRIVATE_FEATURE_READ_PIXELS_ANY_FORMAT = 1L<<13,
+ COGL_PRIVATE_FEATURE_ANY_GL = 1L<<14,
+ COGL_PRIVATE_FEATURE_ALPHA_TEST = 1L<<15,
+ COGL_PRIVATE_FEATURE_FORMAT_CONVERSION = 1L<<16,
+ COGL_PRIVATE_FEATURE_QUADS = 1L<<17,
+ COGL_PRIVATE_FEATURE_BLEND_CONSTANT = 1L<<18,
+ COGL_PRIVATE_FEATURE_QUERY_FRAMEBUFFER_BITS = 1L<<19,
+ COGL_PRIVATE_FEATURE_BUILTIN_POINT_SIZE_UNIFORM = 1L<<20,
+ COGL_PRIVATE_FEATURE_QUERY_TEXTURE_PARAMETERS = 1L<<21,
+ COGL_PRIVATE_FEATURE_ALPHA_TEXTURES = 1L<<22,
+ COGL_PRIVATE_FEATURE_TEXTURE_SWIZZLE = 1L<<23
+} CoglPrivateFeatureFlags;
+
+/* Sometimes when evaluating pipelines, either during comparisons or
+ * if calculating a hash value we need to tweak the evaluation
+ * semantics */
+typedef enum _CoglPipelineEvalFlags
+{
+ COGL_PIPELINE_EVAL_FLAG_NONE = 0
+} CoglPipelineEvalFlags;
+
+void
+_cogl_transform_point (const CoglMatrix *matrix_mv,
+ const CoglMatrix *matrix_p,
+ const float *viewport,
+ float *x,
+ float *y);
+
CoglBool
_cogl_check_extension (const char *name, char * const *ext);
diff --git a/cogl/cogl-program-private.h b/cogl/cogl-program-private.h
index 369db6dd..989f6795 100644
--- a/cogl/cogl-program-private.h
+++ b/cogl/cogl-program-private.h
@@ -25,7 +25,6 @@
#define __COGL_PROGRAM_H
#include "cogl-object-private.h"
-#include "cogl-internal.h"
#include "cogl-shader-private.h"
typedef struct _CoglProgram CoglProgram;
diff --git a/cogl/cogl-program.c b/cogl/cogl-program.c
index 5f70c0a4..70a94b34 100644
--- a/cogl/cogl-program.c
+++ b/cogl/cogl-program.c
@@ -27,7 +27,7 @@
#include "cogl-util.h"
-#include "cogl-internal.h"
+#include "cogl-util-gl-private.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/cogl-renderer-private.h b/cogl/cogl-renderer-private.h
index 565d2c96..ac6effdb 100644
--- a/cogl/cogl-renderer-private.h
+++ b/cogl/cogl-renderer-private.h
@@ -28,7 +28,6 @@
#include "cogl-object-private.h"
#include "cogl-winsys-private.h"
-#include "cogl-internal.h"
#include "cogl-driver.h"
#include "cogl-texture-driver.h"
diff --git a/cogl/cogl-renderer.c b/cogl/cogl-renderer.c
index ec675cac..86869354 100644
--- a/cogl/cogl-renderer.c
+++ b/cogl/cogl-renderer.c
@@ -32,10 +32,10 @@
#include <string.h>
#include "cogl-util.h"
-#include "cogl-internal.h"
#include "cogl-private.h"
#include "cogl-object.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-renderer.h"
#include "cogl-renderer-private.h"
diff --git a/cogl/cogl-sampler-cache.c b/cogl/cogl-sampler-cache.c
index f91983c5..84bb81d3 100644
--- a/cogl/cogl-sampler-cache.c
+++ b/cogl/cogl-sampler-cache.c
@@ -30,6 +30,7 @@
#include "cogl-sampler-cache-private.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#ifndef GL_TEXTURE_WRAP_R
#define GL_TEXTURE_WRAP_R 0x8072
diff --git a/cogl/cogl-shader.c b/cogl/cogl-shader.c
index 629575ad..31674e34 100644
--- a/cogl/cogl-shader.c
+++ b/cogl/cogl-shader.c
@@ -26,7 +26,7 @@
#endif
#include "cogl-shader-private.h"
-#include "cogl-internal.h"
+#include "cogl-util-gl-private.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
#include "cogl-glsl-shader-private.h"
diff --git a/cogl/cogl-spans.c b/cogl/cogl-spans.c
index d2c51298..0ab61ca7 100644
--- a/cogl/cogl-spans.c
+++ b/cogl/cogl-spans.c
@@ -28,7 +28,6 @@
#include "math.h"
#include "cogl-util.h"
-#include "cogl-internal.h"
#include "cogl-spans.h"
void
diff --git a/cogl/cogl-sub-texture.c b/cogl/cogl-sub-texture.c
index 62632455..2866f237 100644
--- a/cogl/cogl-sub-texture.c
+++ b/cogl/cogl-sub-texture.c
@@ -28,7 +28,6 @@
#include "config.h"
#endif
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-texture-private.h"
#include "cogl-sub-texture-private.h"
diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index 2fbd5bae..6f75423e 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -31,7 +31,6 @@
#include "config.h"
#endif
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-bitmap.h"
#include "cogl-bitmap-private.h"
diff --git a/cogl/cogl-vertex-buffer.c b/cogl/cogl-vertex-buffer.c
index 6b7630dc..74b31333 100644
--- a/cogl/cogl-vertex-buffer.c
+++ b/cogl/cogl-vertex-buffer.c
@@ -96,7 +96,6 @@
#include <string.h>
#include <glib.h>
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/cogl-xlib-renderer.c b/cogl/cogl-xlib-renderer.c
index 713df7f2..1116332a 100644
--- a/cogl/cogl-xlib-renderer.c
+++ b/cogl/cogl-xlib-renderer.c
@@ -30,7 +30,6 @@
#include "cogl-xlib-renderer.h"
#include "cogl-util.h"
-#include "cogl-internal.h"
#include "cogl-object.h"
#include "cogl-renderer-private.h"
diff --git a/cogl/cogl-xlib.c b/cogl/cogl-xlib.c
index f68dd2d0..a0bd599e 100644
--- a/cogl/cogl-xlib.c
+++ b/cogl/cogl-xlib.c
@@ -31,7 +31,6 @@
#include <cogl-xlib.h>
-#include <cogl-internal.h>
#include <cogl-object-private.h>
#include <cogl-context-private.h>
#include <cogl-framebuffer-private.h>
diff --git a/cogl/cogl.c b/cogl/cogl.c
index 8cd82a3a..d7938e9b 100644
--- a/cogl/cogl.c
+++ b/cogl/cogl.c
@@ -31,7 +31,6 @@
#include <glib/gi18n-lib.h>
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-context-private.h"
#include "cogl-pipeline-private.h"
@@ -53,44 +52,6 @@
#include "cogl-attribute-gl-private.h"
#include "cogl-clutter.h"
-#ifdef COGL_GL_DEBUG
-/* GL error to string conversion */
-static const struct {
- GLuint error_code;
- const char *error_string;
-} gl_errors[] = {
- { GL_NO_ERROR, "No error" },
- { GL_INVALID_ENUM, "Invalid enumeration value" },
- { GL_INVALID_VALUE, "Invalid value" },
- { GL_INVALID_OPERATION, "Invalid operation" },
-#ifdef HAVE_COGL_GL
- { GL_STACK_OVERFLOW, "Stack overflow" },
- { GL_STACK_UNDERFLOW, "Stack underflow" },
-#endif
- { GL_OUT_OF_MEMORY, "Out of memory" },
-
-#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
- { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "Invalid framebuffer operation" }
-#endif
-};
-
-static const unsigned int n_gl_errors = G_N_ELEMENTS (gl_errors);
-
-const char *
-_cogl_gl_error_to_string (GLenum error_code)
-{
- int i;
-
- for (i = 0; i < n_gl_errors; i++)
- {
- if (gl_errors[i].error_code == error_code)
- return gl_errors[i].error_string;
- }
-
- return "Unknown GL error";
-}
-#endif /* COGL_GL_DEBUG */
-
CoglFuncPtr
cogl_get_proc_address (const char* name)
{
diff --git a/cogl/cogl2-path.c b/cogl/cogl2-path.c
index 122447fb..aa06c401 100644
--- a/cogl/cogl2-path.c
+++ b/cogl/cogl2-path.c
@@ -32,7 +32,6 @@
#include "cogl-util.h"
#include "cogl-object.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-journal-private.h"
#include "cogl-pipeline-private.h"
diff --git a/cogl/driver/gl/cogl-attribute-gl.c b/cogl/driver/gl/cogl-attribute-gl.c
index 2fa1ec2a..ba7e6273 100644
--- a/cogl/driver/gl/cogl-attribute-gl.c
+++ b/cogl/driver/gl/cogl-attribute-gl.c
@@ -32,6 +32,7 @@
#include <string.h>
#include "cogl-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-opengl-private.h"
#include "cogl-error-private.h"
#include "cogl-context-private.h"
diff --git a/cogl/driver/gl/cogl-clip-stack-gl.c b/cogl/driver/gl/cogl-clip-stack-gl.c
index 6a336db2..e8722676 100644
--- a/cogl/driver/gl/cogl-clip-stack-gl.c
+++ b/cogl/driver/gl/cogl-clip-stack-gl.c
@@ -30,6 +30,7 @@
#endif
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-primitives-private.h"
#include "cogl-pipeline-opengl-private.h"
#include "cogl-path-private.h"
diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
index 23cf1a74..1e8139ca 100644
--- a/cogl/driver/gl/cogl-framebuffer-gl.c
+++ b/cogl/driver/gl/cogl-framebuffer-gl.c
@@ -27,6 +27,7 @@
#endif
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-framebuffer-private.h"
#include "cogl-framebuffer-gl-private.h"
#include "cogl-buffer-gl-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
index 4968e906..bcedec39 100644
--- a/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
+++ b/cogl/driver/gl/cogl-pipeline-fragend-fixed.c
@@ -30,13 +30,13 @@
#endif
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-state-private.h"
#include "cogl-pipeline-opengl-private.h"
#ifdef COGL_PIPELINE_FRAGEND_FIXED
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-fragend-glsl.c b/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
index ef6f0c14..07e1d6fa 100644
--- a/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-fragend-glsl.c
@@ -33,6 +33,7 @@
#include <string.h>
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-layer-private.h"
#include "cogl-blend-string.h"
@@ -40,7 +41,6 @@
#ifdef COGL_PIPELINE_FRAGEND_GLSL
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
#include "cogl-shader-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/driver/gl/cogl-pipeline-opengl.c
index fa78a7c5..166cffbf 100644
--- a/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -30,6 +30,7 @@
#endif
#include "cogl-debug.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-opengl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-context-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-progend-glsl.c b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
index 54e7293f..d695f2d1 100644
--- a/cogl/driver/gl/cogl-pipeline-progend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-progend-glsl.c
@@ -33,13 +33,13 @@
#include "cogl-util.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-opengl-private.h"
#include "cogl-offscreen.h"
#ifdef COGL_PIPELINE_PROGEND_GLSL
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
#include "cogl-program-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
index 8ebbec43..be171353 100644
--- a/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
+++ b/cogl/driver/gl/cogl-pipeline-vertend-fixed.c
@@ -30,6 +30,7 @@
#endif
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-state-private.h"
#include "cogl-pipeline-opengl-private.h"
@@ -37,7 +38,6 @@
#ifdef COGL_PIPELINE_VERTEND_FIXED
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
#include "cogl-program-private.h"
diff --git a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
index 8aea1eb9..142f698f 100644
--- a/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
+++ b/cogl/driver/gl/cogl-pipeline-vertend-glsl.c
@@ -32,12 +32,12 @@
#include <string.h>
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-opengl-private.h"
#ifdef COGL_PIPELINE_VERTEND_GLSL
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
#include "cogl-program-private.h"
diff --git a/cogl/driver/gl/cogl-texture-gl.c b/cogl/driver/gl/cogl-texture-gl.c
index 7572fcbb..55e4a8ca 100644
--- a/cogl/driver/gl/cogl-texture-gl.c
+++ b/cogl/driver/gl/cogl-texture-gl.c
@@ -26,8 +26,8 @@
#include <strings.h>
-#include "cogl-internal.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-texture-gl-private.h"
#include "cogl-texture-3d-private.h"
#include "cogl-util.h"
diff --git a/cogl/driver/gl/cogl-util-gl-private.h b/cogl/driver/gl/cogl-util-gl-private.h
index 332df4fa..2abd6cb2 100644
--- a/cogl/driver/gl/cogl-util-gl-private.h
+++ b/cogl/driver/gl/cogl-util-gl-private.h
@@ -26,6 +26,42 @@
#ifndef _COGL_UTIL_GL_PRIVATE_H_
#include "cogl-types.h"
+#include "cogl-context.h"
+#include "cogl-gl-header.h"
+
+#ifdef COGL_GL_DEBUG
+
+const char *
+_cogl_gl_error_to_string (GLenum error_code);
+
+#define GE(ctx, x) G_STMT_START { \
+ GLenum __err; \
+ (ctx)->x; \
+ while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
+ { \
+ g_warning ("%s: GL error (%d): %s\n", \
+ G_STRLOC, \
+ __err, \
+ _cogl_gl_error_to_string (__err)); \
+ } } G_STMT_END
+
+#define GE_RET(ret, ctx, x) G_STMT_START { \
+ GLenum __err; \
+ ret = (ctx)->x; \
+ while ((__err = (ctx)->glGetError ()) != GL_NO_ERROR) \
+ { \
+ g_warning ("%s: GL error (%d): %s\n", \
+ G_STRLOC, \
+ __err, \
+ _cogl_gl_error_to_string (__err)); \
+ } } G_STMT_END
+
+#else /* !COGL_GL_DEBUG */
+
+#define GE(ctx, x) ((ctx)->x)
+#define GE_RET(ret, ctx, x) (ret = ((ctx)->x))
+
+#endif /* COGL_GL_DEBUG */
CoglBool
_cogl_gl_util_catch_out_of_memory (CoglContext *ctx, CoglError **error);
diff --git a/cogl/driver/gl/cogl-util-gl.c b/cogl/driver/gl/cogl-util-gl.c
index b0033c15..aadfb54a 100644
--- a/cogl/driver/gl/cogl-util-gl.c
+++ b/cogl/driver/gl/cogl-util-gl.c
@@ -30,9 +30,46 @@
#include "cogl-types.h"
#include "cogl-context-private.h"
#include "cogl-error-private.h"
-#include "cogl-internal.h"
#include "cogl-util-gl-private.h"
+#ifdef COGL_GL_DEBUG
+/* GL error to string conversion */
+static const struct {
+ GLuint error_code;
+ const char *error_string;
+} gl_errors[] = {
+ { GL_NO_ERROR, "No error" },
+ { GL_INVALID_ENUM, "Invalid enumeration value" },
+ { GL_INVALID_VALUE, "Invalid value" },
+ { GL_INVALID_OPERATION, "Invalid operation" },
+#ifdef HAVE_COGL_GL
+ { GL_STACK_OVERFLOW, "Stack overflow" },
+ { GL_STACK_UNDERFLOW, "Stack underflow" },
+#endif
+ { GL_OUT_OF_MEMORY, "Out of memory" },
+
+#ifdef GL_INVALID_FRAMEBUFFER_OPERATION_EXT
+ { GL_INVALID_FRAMEBUFFER_OPERATION_EXT, "Invalid framebuffer operation" }
+#endif
+};
+
+static const unsigned int n_gl_errors = G_N_ELEMENTS (gl_errors);
+
+const char *
+_cogl_gl_error_to_string (GLenum error_code)
+{
+ int i;
+
+ for (i = 0; i < n_gl_errors; i++)
+ {
+ if (gl_errors[i].error_code == error_code)
+ return gl_errors[i].error_string;
+ }
+
+ return "Unknown GL error";
+}
+#endif /* COGL_GL_DEBUG */
+
CoglBool
_cogl_gl_util_catch_out_of_memory (CoglContext *ctx, CoglError **error)
{
diff --git a/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/driver/gl/gl/cogl-driver-gl.c
index 6887fb83..b7536801 100644
--- a/cogl/driver/gl/gl/cogl-driver-gl.c
+++ b/cogl/driver/gl/gl/cogl-driver-gl.c
@@ -28,8 +28,8 @@
#include <string.h>
#include "cogl-private.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-feature-private.h"
#include "cogl-renderer-private.h"
#include "cogl-error-private.h"
diff --git a/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c b/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c
index fc2f9cbf..b2bcc5ad 100644
--- a/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c
+++ b/cogl/driver/gl/gl/cogl-pipeline-fragend-arbfp.c
@@ -31,13 +31,13 @@
#include "cogl-debug.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-pipeline-private.h"
#include "cogl-pipeline-state-private.h"
#include "cogl-pipeline-layer-private.h"
#ifdef COGL_PIPELINE_FRAGEND_ARBFP
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-object-private.h"
diff --git a/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/driver/gl/gles/cogl-driver-gles.c
index 414e3f90..e013acb7 100644
--- a/cogl/driver/gl/gles/cogl-driver-gles.c
+++ b/cogl/driver/gl/gles/cogl-driver-gles.c
@@ -27,8 +27,8 @@
#include <string.h>
-#include "cogl-internal.h"
#include "cogl-context-private.h"
+#include "cogl-util-gl-private.h"
#include "cogl-feature-private.h"
#include "cogl-renderer-private.h"
#include "cogl-private.h"
diff --git a/cogl/driver/nop/cogl-driver-nop.c b/cogl/driver/nop/cogl-driver-nop.c
index 9753cff9..a9e7c841 100644
--- a/cogl/driver/nop/cogl-driver-nop.c
+++ b/cogl/driver/nop/cogl-driver-nop.c
@@ -28,7 +28,6 @@
#include <string.h>
#include "cogl-private.h"
-#include "cogl-internal.h"
#include "cogl-context-private.h"
#include "cogl-feature-private.h"
#include "cogl-renderer-private.h"
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c
index f20b5c42..a4425b00 100644
--- a/cogl/winsys/cogl-texture-pixmap-x11.c
+++ b/cogl/winsys/cogl-texture-pixmap-x11.c
@@ -31,7 +31,6 @@
#endif
#include "cogl-debug.h"
-#include "cogl-internal.h"
#include "cogl-util.h"
#include "cogl-texture-pixmap-x11.h"
#include "cogl-texture-pixmap-x11-private.h"
diff --git a/doc/reference/cogl-2.0-experimental/Makefile.am b/doc/reference/cogl-2.0-experimental/Makefile.am
index ea36eac8..1e415cd6 100644
--- a/doc/reference/cogl-2.0-experimental/Makefile.am
+++ b/doc/reference/cogl-2.0-experimental/Makefile.am
@@ -81,7 +81,6 @@ IGNORE_HFILES=\
cogl-gl-header.h \
cogl-glsl-shader-boilerplate.h \
cogl-deprecated.h \
- cogl-internal.h \
cogl-profile.h \
cogl-queue.h \
cogl-rectangle-map.h \