summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cogl-color.h12
-rw-r--r--cogl-debug.h23
-rw-r--r--cogl-deprecated.h23
-rw-r--r--cogl-fixed.h14
-rw-r--r--cogl-material.h23
-rw-r--r--cogl-matrix.h26
-rw-r--r--cogl-offscreen.h14
-rw-r--r--cogl-path.h12
-rw-r--r--cogl-shader.h12
-rw-r--r--cogl-texture.h12
-rw-r--r--cogl-types.h21
-rw-r--r--cogl-vertex-buffer.h17
-rw-r--r--cogl.h.in9
-rw-r--r--common/cogl-bitmap-fallback.c52
-rw-r--r--common/cogl-bitmap-pixbuf.c38
-rw-r--r--common/cogl-bitmap.c40
-rw-r--r--common/cogl-clip-stack.c8
-rw-r--r--common/cogl-clip-stack.h8
-rw-r--r--common/cogl-color.c23
-rw-r--r--common/cogl-current-matrix.c11
-rw-r--r--common/cogl-current-matrix.h11
-rw-r--r--common/cogl-debug.c23
-rw-r--r--common/cogl-fixed.c23
-rw-r--r--common/cogl-handle.h8
-rw-r--r--common/cogl-internal.h5
-rw-r--r--common/cogl-material-private.h26
-rw-r--r--common/cogl-material.c25
-rw-r--r--common/cogl-matrix-stack.c11
-rw-r--r--common/cogl-matrix-stack.h11
-rw-r--r--common/cogl-matrix.c26
-rw-r--r--common/cogl-primitives.c122
-rw-r--r--common/cogl-primitives.h8
-rw-r--r--common/cogl-util.c16
-rw-r--r--common/cogl-util.h10
-rw-r--r--common/cogl-vertex-buffer-private.h15
-rw-r--r--common/cogl-vertex-buffer.c17
-rw-r--r--common/cogl.c5
-rw-r--r--gl/cogl-context.c8
-rw-r--r--gl/cogl-context.h8
-rw-r--r--gl/cogl-defines.h.in22
-rw-r--r--gl/cogl-fbo.c84
-rw-r--r--gl/cogl-fbo.h8
-rw-r--r--gl/cogl-internal.h8
-rw-r--r--gl/cogl-primitives.c8
-rw-r--r--gl/cogl-program.c16
-rw-r--r--gl/cogl-program.h8
-rw-r--r--gl/cogl-shader-private.h8
-rw-r--r--gl/cogl-shader.c10
-rw-r--r--gl/cogl-texture-private.h8
-rw-r--r--gl/cogl-texture.c13
-rw-r--r--gl/cogl.c4
-rw-r--r--gles/cogl-context.c8
-rw-r--r--gles/cogl-context.h8
-rw-r--r--gles/cogl-fbo.c8
-rw-r--r--gles/cogl-fbo.h8
-rw-r--r--gles/cogl-gles2-wrapper.c10
-rw-r--r--gles/cogl-gles2-wrapper.h8
-rw-r--r--gles/cogl-internal.h8
-rw-r--r--gles/cogl-primitives.c8
-rw-r--r--gles/cogl-program.c12
-rw-r--r--gles/cogl-program.h8
-rw-r--r--gles/cogl-shader-private.h8
-rw-r--r--gles/cogl-shader.c10
-rw-r--r--gles/cogl-texture-private.h8
-rw-r--r--gles/cogl-texture.c8
-rw-r--r--gles/cogl-util.c10
-rw-r--r--gles/cogl-util.h10
-rw-r--r--gles/cogl.c4
-rw-r--r--gles/stringify.sh30
69 files changed, 684 insertions, 463 deletions
diff --git a/cogl-color.h b/cogl-color.h
index 76be2053..0cbc479a 100644
--- a/cogl-color.h
+++ b/cogl-color.h
@@ -1,7 +1,9 @@
-/* cogl-color.h: Color type for COGL
- * This file is part of Clutter
+/*
+ * Cogl
*
- * Copyright (C) 2008 Intel Corporation.
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
diff --git a/cogl-debug.h b/cogl-debug.h
index 7440831b..79a42528 100644
--- a/cogl-debug.h
+++ b/cogl-debug.h
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifndef __COGL_DEBUG_H__
#define __COGL_DEBUG_H__
diff --git a/cogl-deprecated.h b/cogl-deprecated.h
index 17d1fe4d..2111e48b 100644
--- a/cogl-deprecated.h
+++ b/cogl-deprecated.h
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifndef COGL_DEPRECATED_H
#define cogl_color cogl_color_REPLACED_BY_cogl_set_source_color
diff --git a/cogl-fixed.h b/cogl-fixed.h
index 0e51c358..904913ea 100644
--- a/cogl-fixed.h
+++ b/cogl-fixed.h
@@ -1,7 +1,9 @@
-/* cogl-fixed.h: Fixed point API
- * This file is part of Clutter
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2008 Intel Corporation.
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
@@ -725,7 +729,7 @@ CoglFixed cogl_angle_cos (CoglAngle angle);
/*< private >*/
#if defined (G_CAN_INLINE)
-G_INLINE_FUNC CoglFixed
+G_INLINE_FUNC CoglFixed
cogl_fixed_mul (CoglFixed a,
CoglFixed b)
{
diff --git a/cogl-material.h b/cogl-material.h
index 949daed2..c77b0910 100644
--- a/cogl-material.h
+++ b/cogl-material.h
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
diff --git a/cogl-matrix.h b/cogl-matrix.h
index 9bf0e802..ca643f14 100644
--- a/cogl-matrix.h
+++ b/cogl-matrix.h
@@ -1,3 +1,29 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
+ */
+
#ifndef __COGL_MATRIX_H
#define __COGL_MATRIX_H
diff --git a/cogl-offscreen.h b/cogl-offscreen.h
index a494052a..17d2e54d 100644
--- a/cogl-offscreen.h
+++ b/cogl-offscreen.h
@@ -1,7 +1,9 @@
-/* cogl-offscreen.h: Offscreen objects
- * This file is part of Clutter
+/*
+ * Cogl
*
- * Copyright (C) 2008 Intel Corporation.
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
@@ -48,7 +52,7 @@ CoglHandle cogl_offscreen_new_to_texture (CoglHandle texhandle);
/**
* cogl_offscreen_new_multisample:
- *
+ *
*
* Returns:
*/
diff --git a/cogl-path.h b/cogl-path.h
index 47c46d0a..be5a979e 100644
--- a/cogl-path.h
+++ b/cogl-path.h
@@ -1,7 +1,9 @@
-/* cogl-path.h: Path primitives
- * This file is part of Clutter
+/*
+ * Cogl
*
- * Copyright (C) 2008 Intel Corporation.
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
diff --git a/cogl-shader.h b/cogl-shader.h
index 7678a6e2..4b564826 100644
--- a/cogl-shader.h
+++ b/cogl-shader.h
@@ -1,7 +1,9 @@
-/* cogl-shader.h: Shaders and programmable pipeline
- * This file is part of Clutter
+/*
+ * Cogl
*
- * Copyright (C) 2008 Intel Corporation.
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
diff --git a/cogl-texture.h b/cogl-texture.h
index 4befd811..f75abb3e 100644
--- a/cogl-texture.h
+++ b/cogl-texture.h
@@ -1,7 +1,9 @@
-/* cogl-texture.h: Texture objects
- * This file is part of Clutter
+/*
+ * Cogl
*
- * Copyright (C) 2008 Intel Corporation.
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -14,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
diff --git a/cogl-types.h b/cogl-types.h
index 2773882f..d00da14c 100644
--- a/cogl-types.h
+++ b/cogl-types.h
@@ -1,13 +1,14 @@
-/* cogl-types.h: Shared COGL types
+/*
+ * Cogl
*
- * This file is part of Clutter
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2008 Intel Corporation.
+ * Copyright (C) 2008,2009 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.1 of the License, or (at your option) any later version.
+ * 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
@@ -15,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
@@ -137,7 +140,7 @@ typedef enum
COGL_PIXEL_FORMAT_RGBA_5551 = 6 | COGL_A_BIT,
COGL_PIXEL_FORMAT_YUV = 7,
COGL_PIXEL_FORMAT_G_8 = 8,
-
+
COGL_PIXEL_FORMAT_RGB_888 = COGL_PIXEL_FORMAT_24,
COGL_PIXEL_FORMAT_BGR_888 = (COGL_PIXEL_FORMAT_24 |
@@ -178,7 +181,7 @@ typedef enum
COGL_PREMULT_BIT |
COGL_BGR_BIT |
COGL_AFIRST_BIT),
-
+
COGL_PIXEL_FORMAT_RGBA_4444_PRE = (COGL_PIXEL_FORMAT_RGBA_4444 |
COGL_A_BIT |
COGL_PREMULT_BIT),
@@ -186,8 +189,8 @@ typedef enum
COGL_PIXEL_FORMAT_RGBA_5551_PRE = (COGL_PIXEL_FORMAT_RGBA_5551 |
COGL_A_BIT |
COGL_PREMULT_BIT),
-
-
+
+
} CoglPixelFormat;
#define COGL_TYPE_PIXEL_FORMAT (cogl_pixel_format_get_type ())
diff --git a/cogl-vertex-buffer.h b/cogl-vertex-buffer.h
index 35016daf..717281db 100644
--- a/cogl-vertex-buffer.h
+++ b/cogl-vertex-buffer.h
@@ -1,13 +1,9 @@
/*
- * Cogl.
+ * Cogl
*
- * An OpenGL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Vertex Buffer API: Handle extensible arrays of vertex attributes
- *
- * Copyright (C) 2008 Intel Corporation.
- *
- * Authored by: Robert Bragg <robert@linux.intel.com>
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,7 +16,12 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
*/
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
diff --git a/cogl.h.in b/cogl.h.in
index 134b03df..3e7860a6 100644
--- a/cogl.h.in
+++ b/cogl.h.in
@@ -1,13 +1,12 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2008,2009 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.
diff --git a/common/cogl-bitmap-fallback.c b/common/cogl-bitmap-fallback.c
index cb9b9040..b9ba9b73 100644
--- a/common/cogl-bitmap-fallback.c
+++ b/common/cogl-bitmap-fallback.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -164,7 +162,7 @@ inline static void
_cogl_unpremult_alpha_last (const guchar *src, guchar *dst)
{
guchar alpha = src[3];
-
+
dst[0] = ((((gulong) src[0] >> 16) & 0xff) * 255 ) / alpha;
dst[1] = ((((gulong) src[1] >> 8) & 0xff) * 255 ) / alpha;
dst[2] = ((((gulong) src[2] >> 0) & 0xff) * 255 ) / alpha;
@@ -175,7 +173,7 @@ inline static void
_cogl_unpremult_alpha_first (const guchar *src, guchar *dst)
{
guchar alpha = src[0];
-
+
dst[0] = alpha;
dst[1] = ((((gulong) src[1] >> 16) & 0xff) * 255 ) / alpha;
dst[2] = ((((gulong) src[2] >> 8) & 0xff) * 255 ) / alpha;
@@ -187,23 +185,23 @@ _cogl_bitmap_fallback_can_convert (CoglPixelFormat src, CoglPixelFormat dst)
{
if (src == dst)
return FALSE;
-
+
switch (src & COGL_UNORDERED_MASK)
{
case COGL_PIXEL_FORMAT_G_8:
case COGL_PIXEL_FORMAT_24:
case COGL_PIXEL_FORMAT_32:
-
+
if ((dst & COGL_UNORDERED_MASK) != COGL_PIXEL_FORMAT_24 &&
(dst & COGL_UNORDERED_MASK) != COGL_PIXEL_FORMAT_32 &&
(dst & COGL_UNORDERED_MASK) != COGL_PIXEL_FORMAT_G_8)
return FALSE;
break;
-
+
default:
return FALSE;
}
-
+
return TRUE;
}
@@ -224,11 +222,11 @@ _cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
gint dst_bpp;
gint x,y;
guchar temp_rgba[4] = {0,0,0,0};
-
+
/* Make sure conversion supported */
if (!_cogl_bitmap_fallback_can_convert (bmp->format, dst_format))
return FALSE;
-
+
src_bpp = _cogl_get_format_bpp (bmp->format);
dst_bpp = _cogl_get_format_bpp (dst_format);
@@ -237,18 +235,18 @@ _cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
dst_bmp->rowstride = sizeof(guchar) * dst_bpp * dst_bmp->width;
dst_bmp->format = ((bmp->format & COGL_PREMULT_BIT) |
(dst_format & COGL_UNPREMULT_MASK));
-
+
/* Allocate a new buffer to hold converted data */
dst_bmp->data = g_malloc (sizeof(guchar)
* dst_bmp->height
* dst_bmp->rowstride);
-
+
/* FIXME: Optimize */
for (y = 0; y < bmp->height; y++)
{
src = (guchar*)bmp->data + y * bmp->rowstride;
dst = (guchar*)dst_bmp->data + y * dst_bmp->rowstride;
-
+
for (x = 0; x < bmp->width; x++)
{
/* FIXME: Would be nice to at least remove this inner
@@ -273,7 +271,7 @@ _cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
default:
break;
}
-
+
switch (dst_format & COGL_UNPREMULT_MASK)
{
case COGL_PIXEL_FORMAT_G_8:
@@ -293,12 +291,12 @@ _cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
default:
break;
}
-
+
src += src_bpp;
dst += dst_bpp;
}
}
-
+
return TRUE;
}
@@ -310,28 +308,28 @@ _cogl_bitmap_fallback_unpremult (const CoglBitmap *bmp,
guchar *dst;
gint bpp;
gint x,y;
-
+
/* Make sure format supported for un-premultiplication */
if (!_cogl_bitmap_fallback_can_unpremult (bmp->format))
return FALSE;
-
+
bpp = _cogl_get_format_bpp (bmp->format);
-
+
/* Initialize destination bitmap */
*dst_bmp = *bmp;
dst_bmp->format = (bmp->format & COGL_UNPREMULT_MASK);
-
+
/* Allocate a new buffer to hold converted data */
dst_bmp->data = g_malloc (sizeof(guchar)
* dst_bmp->height
* dst_bmp->rowstride);
-
+
/* FIXME: Optimize */
for (y = 0; y < bmp->height; y++)
{
src = (guchar*)bmp->data + y * bmp->rowstride;
dst = (guchar*)dst_bmp->data + y * dst_bmp->rowstride;
-
+
for (x = 0; x < bmp->width; x++)
{
/* FIXME: Would be nice to at least remove this inner
@@ -351,12 +349,12 @@ _cogl_bitmap_fallback_unpremult (const CoglBitmap *bmp,
else
_cogl_unpremult_alpha_last (src, dst);
}
-
+
src += bpp;
dst += bpp;
}
}
-
+
return TRUE;
}
diff --git a/common/cogl-bitmap-pixbuf.c b/common/cogl-bitmap-pixbuf.c
index 8d86d94e..4108e321 100644
--- a/common/cogl-bitmap-pixbuf.c
+++ b/common/cogl-bitmap-pixbuf.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -222,7 +220,7 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
guchar *out_data;
guchar *out;
gint r;
-
+
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
if (bmp == NULL)
@@ -232,7 +230,7 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
pixbuf = gdk_pixbuf_new_from_file (filename, error);
if (pixbuf == NULL)
return FALSE;
-
+
/* Get pixbuf properties */
has_alpha = gdk_pixbuf_get_has_alpha (pixbuf);
color_space = gdk_pixbuf_get_colorspace (pixbuf);
@@ -241,10 +239,10 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
bits_per_sample = gdk_pixbuf_get_bits_per_sample (pixbuf);
n_channels = gdk_pixbuf_get_n_channels (pixbuf);
-
+
/* The docs say this is the right way */
last_row_size = width * ((n_channels * bits_per_sample + 7) / 8);
-
+
/* According to current docs this should be true and so
* the translation to cogl pixel format below valid */
g_assert (bits_per_sample == 8);
@@ -253,7 +251,7 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
g_assert (n_channels == 4);
else
g_assert (n_channels == 3);
-
+
/* Translate to cogl pixel format */
switch (color_space)
{
@@ -263,19 +261,19 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
COGL_PIXEL_FORMAT_RGBA_8888 :
COGL_PIXEL_FORMAT_RGB_888;
break;
-
+
default:
/* Ouch, spec changed! */
g_object_unref (pixbuf);
return FALSE;
}
-
+
/* FIXME: Any way to destroy pixbuf but retain pixel data? */
-
+
pixels = gdk_pixbuf_get_pixels (pixbuf);
out_data = (guchar*) g_malloc (height * rowstride);
out = out_data;
-
+
/* Copy up to last row */
for (r = 0; r < height-1; ++r)
{
@@ -283,13 +281,13 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
pixels += rowstride;
out += rowstride;
}
-
+
/* Copy last row */
memcpy (out, pixels, last_row_size);
-
+
/* Destroy GdkPixbuf object */
g_object_unref (pixbuf);
-
+
/* Store bitmap info */
bmp->data = out_data; /* The stored data the same alignment constraints as a
* gdkpixbuf but stores a full rowstride in the last
@@ -299,7 +297,7 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
bmp->width = width;
bmp->height = height;
bmp->rowstride = rowstride;
-
+
return TRUE;
}
@@ -335,14 +333,14 @@ _cogl_bitmap_from_file (CoglBitmap *bmp,
if (bmp == NULL)
return FALSE;
-
+
/* Load from file using stb */
pixels = stbi_load (filename,
&width, &height, &stb_pixel_format,
STBI_rgb_alpha);
if (pixels == NULL)
return FALSE;
-
+
/* Store bitmap info */
bmp->data = g_memdup (pixels, height * width * 4);
bmp->format = COGL_PIXEL_FORMAT_RGBA_8888;
diff --git a/common/cogl-bitmap.c b/common/cogl-bitmap.c
index b0a3b713..af3bc53b 100644
--- a/common/cogl-bitmap.c
+++ b/common/cogl-bitmap.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -47,7 +45,7 @@ _cogl_get_format_bpp (CoglPixelFormat format)
2, /* YUV */
1 /* G_8 */
};
-
+
return bpp_lut [format & COGL_UNORDERED_MASK];
}
@@ -59,7 +57,7 @@ _cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
CoglBitmap tmp_bmp = *bmp;
CoglBitmap new_bmp = *bmp;
gboolean new_bmp_owner = FALSE;
-
+
/* Is base format different (not considering premult status)? */
if ((bmp->format & COGL_UNPREMULT_MASK) !=
(dst_format & COGL_UNPREMULT_MASK))
@@ -71,12 +69,12 @@ _cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
if (!_cogl_bitmap_fallback_convert (&new_bmp, &tmp_bmp, dst_format))
return FALSE;
}
-
+
/* Update bitmap with new data */
new_bmp = tmp_bmp;
new_bmp_owner = TRUE;
}
-
+
/* Do we need to unpremultiply */
if ((bmp->format & COGL_PREMULT_BIT) == 0 &&
(dst_format & COGL_PREMULT_BIT) > 0)
@@ -89,19 +87,19 @@ _cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
{
if (new_bmp_owner)
g_free (new_bmp.data);
-
+
return FALSE;
}
}
-
+
/* Update bitmap with new data */
if (new_bmp_owner)
g_free (new_bmp.data);
-
+
new_bmp = tmp_bmp;
new_bmp_owner = TRUE;
}
-
+
/* Do we need to premultiply */
if ((bmp->format & COGL_PREMULT_BIT) > 0 &&
(dst_format & COGL_PREMULT_BIT) == 0)
@@ -109,13 +107,13 @@ _cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
/* FIXME: implement premultiplication */
if (new_bmp_owner)
g_free (new_bmp.data);
-
+
return FALSE;
}
-
+
/* Output new bitmap info */
*dst_bmp = new_bmp;
-
+
return TRUE;
}
@@ -133,14 +131,14 @@ _cogl_bitmap_copy_subregion (CoglBitmap *src,
guchar *dstdata;
gint bpp;
gint line;
-
+
/* Intended only for fast copies when format is equal! */
g_assert (src->format == dst->format);
bpp = _cogl_get_format_bpp (src->format);
-
+
srcdata = src->data + src_y * src->rowstride + src_x * bpp;
dstdata = dst->data + dst_y * dst->rowstride + dst_x * bpp;
-
+
for (line=0; line<height; ++line)
{
memcpy (dstdata, srcdata, width * bpp);
@@ -162,7 +160,7 @@ cogl_bitmap_new_from_file (const gchar *filename,
GError **error)
{
CoglBitmap bmp;
-
+
g_return_val_if_fail (error == NULL || *error == NULL, COGL_INVALID_HANDLE);
/* Try loading with imaging backend */
@@ -177,7 +175,7 @@ cogl_bitmap_new_from_file (const gchar *filename,
*error = NULL;
}
}
-
+
return (CoglBitmap *) g_memdup (&bmp, sizeof (CoglBitmap));
}
diff --git a/common/cogl-clip-stack.c b/common/cogl-clip-stack.c
index b80da0ed..7f3dcdfc 100644
--- a/common/cogl-clip-stack.c
+++ b/common/cogl-clip-stack.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/common/cogl-clip-stack.h b/common/cogl-clip-stack.h
index cbabc738..324097b1 100644
--- a/common/cogl-clip-stack.h
+++ b/common/cogl-clip-stack.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/common/cogl-color.c b/common/cogl-color.c
index 1a9e24e9..306005f2 100644
--- a/common/cogl-color.c
+++ b/common/cogl-color.c
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/common/cogl-current-matrix.c b/common/cogl-current-matrix.c
index 1ccb4c6d..0080af0d 100644
--- a/common/cogl-current-matrix.c
+++ b/common/cogl-current-matrix.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Havoc Pennington <hp@pobox.com> for litl
- *
- * Copyright (C) 2009 OpenedHand
+ * Copyright (C) 2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +19,9 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Havoc Pennington <hp@pobox.com> for litl
*/
#ifdef HAVE_CONFIG_H
diff --git a/common/cogl-current-matrix.h b/common/cogl-current-matrix.h
index 3e271c97..d1b1bdec 100644
--- a/common/cogl-current-matrix.h
+++ b/common/cogl-current-matrix.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Havoc Pennington <hp@pobox.com> for litl
- *
- * Copyright (C) 2009 OpenedHand
+ * Copyright (C) 2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +19,9 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Havoc Pennington <hp@pobox.com> for litl
*/
#ifndef __COGL_CURRENT_MATRIX_H
diff --git a/common/cogl-debug.c b/common/cogl-debug.c
index 2200b1f1..2763314d 100644
--- a/common/cogl-debug.c
+++ b/common/cogl-debug.c
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/common/cogl-fixed.c b/common/cogl-fixed.c
index 846ede80..13a96765 100644
--- a/common/cogl-fixed.c
+++ b/common/cogl-fixed.c
@@ -1,3 +1,26 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2007,2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#define G_IMPLEMENT_INLINES
#ifdef HAVE_CONFIG_H
diff --git a/common/cogl-handle.h b/common/cogl-handle.h
index 95e85e34..8ca3400a 100644
--- a/common/cogl-handle.h
+++ b/common/cogl-handle.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/common/cogl-internal.h b/common/cogl-internal.h
index 559e1faa..59524216 100644
--- a/common/cogl-internal.h
+++ b/common/cogl-internal.h
@@ -1,10 +1,9 @@
/*
* Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2007, 2008 OpenedHand
- * Copyright (C) 2009 Intel Corp.
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/common/cogl-material-private.h b/common/cogl-material-private.h
index 4044894d..05d4242d 100644
--- a/common/cogl-material-private.h
+++ b/common/cogl-material-private.h
@@ -1,3 +1,29 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
+ */
+
#ifndef __COGL_MATERIAL_PRIVATE_H
#define __COGL_MATERIAL_PRIVATE_H
diff --git a/common/cogl-material.c b/common/cogl-material.c
index 498c8597..699ea0a1 100644
--- a/common/cogl-material.c
+++ b/common/cogl-material.c
@@ -1,3 +1,28 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/common/cogl-matrix-stack.c b/common/cogl-matrix-stack.c
index 38429fc6..a72af000 100644
--- a/common/cogl-matrix-stack.c
+++ b/common/cogl-matrix-stack.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Havoc Pennington <hp@pobox.com> for litl
- *
- * Copyright (C) 2009 OpenedHand
+ * Copyright (C) 2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +19,9 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Havoc Pennington <hp@pobox.com> for litl
*/
#ifdef HAVE_CONFIG_H
diff --git a/common/cogl-matrix-stack.h b/common/cogl-matrix-stack.h
index 9f800169..00db5168 100644
--- a/common/cogl-matrix-stack.h
+++ b/common/cogl-matrix-stack.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Havoc Pennington <hp@pobox.com> for litl
- *
- * Copyright (C) 2009 OpenedHand
+ * Copyright (C) 2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +19,9 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Havoc Pennington <hp@pobox.com> for litl
*/
#ifndef __COGL_MATRIX_STACK_H
diff --git a/common/cogl-matrix.c b/common/cogl-matrix.c
index 0a041e7e..6b6f20fa 100644
--- a/common/cogl-matrix.c
+++ b/common/cogl-matrix.c
@@ -1,3 +1,29 @@
+/*
+ * Cogl
+ *
+ * An object oriented GL/GLES Abstraction/Utility Layer
+ *
+ * Copyright (C) 2008,2009 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, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
+ */
+
#include <cogl-matrix.h>
#include <glib.h>
diff --git a/common/cogl-primitives.c b/common/cogl-primitives.c
index a1b0e2bc..deeea562 100644
--- a/common/cogl-primitives.c
+++ b/common/cogl-primitives.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1322,9 +1320,9 @@ cogl_path_fill_preserve (void)
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
cogl_clip_ensure ();
-
+
if (ctx->path_nodes->len == 0)
- return;
+ return;
_cogl_path_fill_nodes ();
}
@@ -1341,12 +1339,12 @@ void
cogl_path_stroke_preserve (void)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
cogl_clip_ensure ();
if (ctx->path_nodes->len == 0)
return;
-
+
_cogl_path_stroke_nodes();
}
@@ -1355,14 +1353,14 @@ cogl_path_move_to (float x,
float y)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
/* FIXME: handle multiple contours maybe? */
-
+
_cogl_path_add_node (TRUE, x, y);
-
+
ctx->path_start.x = x;
ctx->path_start.y = y;
-
+
ctx->path_pen = ctx->path_start;
}
@@ -1371,7 +1369,7 @@ cogl_path_rel_move_to (float x,
float y)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
cogl_path_move_to (ctx->path_pen.x + x,
ctx->path_pen.y + y);
}
@@ -1381,9 +1379,9 @@ cogl_path_line_to (float x,
float y)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
_cogl_path_add_node (FALSE, x, y);
-
+
ctx->path_pen.x = x;
ctx->path_pen.y = y;
}
@@ -1393,7 +1391,7 @@ cogl_path_rel_line_to (float x,
float y)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
cogl_path_line_to (ctx->path_pen.x + x,
ctx->path_pen.y + y);
}
@@ -1402,7 +1400,7 @@ void
cogl_path_close (void)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
_cogl_path_add_node (FALSE, ctx->path_start.x, ctx->path_start.y);
ctx->path_pen = ctx->path_start;
}
@@ -1430,9 +1428,9 @@ cogl_path_polyline (float *coords,
gint num_points)
{
gint c = 0;
-
+
cogl_path_move_to (coords[0], coords[1]);
-
+
for (c = 1; c < num_points; ++c)
cogl_path_line_to (coords[2*c], coords[2*c+1]);
}
@@ -1473,17 +1471,17 @@ _cogl_path_arc (float center_x,
float sina = 0x0;
float px = 0x0;
float py = 0x0;
-
+
/* Fix invalid angles */
-
+
if (angle_1 == angle_2 || angle_step == 0x0)
return;
-
+
if (angle_step < 0x0)
angle_step = -angle_step;
-
+
/* Walk the arc by given step */
-
+
a = angle_1;
while (a != angle_2)
{
@@ -1492,12 +1490,12 @@ _cogl_path_arc (float center_x,
px = center_x + (cosa * radius_x);
py = center_y + (sina * radius_y);
-
+
if (a == angle_1 && move_first)
cogl_path_move_to (px, py);
else
cogl_path_line_to (px, py);
-
+
if (G_LIKELY (angle_2 > angle_1))
{
a += angle_step;
@@ -1513,7 +1511,7 @@ _cogl_path_arc (float center_x,
}
/* Make sure the final point is drawn */
-
+
cosa = cosf (angle_2 * (G_PI/180.0));
sina = sinf (angle_2 * (G_PI/180.0));
@@ -1530,7 +1528,7 @@ cogl_path_arc (float center_x,
float radius_y,
float angle_1,
float angle_2)
-{
+{
float angle_step = 10;
/* it is documented that a move to is needed to create a freestanding
* arc
@@ -1552,7 +1550,7 @@ cogl_path_arc_rel (float center_x,
float angle_step)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
_cogl_path_arc (ctx->path_pen.x + center_x,
ctx->path_pen.y + center_y,
radius_x, radius_y,
@@ -1567,15 +1565,15 @@ cogl_path_ellipse (float center_x,
float radius_y)
{
float angle_step = 10;
-
+
/* FIXME: if shows to be slow might be optimized
* by mirroring just a quarter of it */
-
+
_cogl_path_arc (center_x, center_y,
radius_x, radius_y,
0, 360,
angle_step, 1 /* move first */);
-
+
cogl_path_close();
}
@@ -1589,7 +1587,7 @@ cogl_path_round_rectangle (float x_1,
{
float inner_width = x_2 - x_1 - radius * 2;
float inner_height = y_2 - y_1 - radius * 2;
-
+
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
cogl_path_move_to (x_1, y_1 + radius);
@@ -1598,7 +1596,7 @@ cogl_path_round_rectangle (float x_1,
180,
270,
arc_step);
-
+
cogl_path_line_to (ctx->path_pen.x + inner_width,
ctx->path_pen.y);
cogl_path_arc_rel (0, radius,
@@ -1606,7 +1604,7 @@ cogl_path_round_rectangle (float x_1,
-90,
0,
arc_step);
-
+
cogl_path_line_to (ctx->path_pen.x,
ctx->path_pen.y + inner_height);
@@ -1615,7 +1613,7 @@ cogl_path_round_rectangle (float x_1,
0,
90,
arc_step);
-
+
cogl_path_line_to (ctx->path_pen.x - inner_width,
ctx->path_pen.y);
cogl_path_arc_rel (0, -radius,
@@ -1623,7 +1621,7 @@ cogl_path_round_rectangle (float x_1,
90,
180,
arc_step);
-
+
cogl_path_close ();
}
@@ -1644,16 +1642,16 @@ _cogl_path_bezier3_sub (CoglBezCubic *cubic)
floatVec2 c4;
floatVec2 c5;
gint cindex;
-
+
/* Put first curve on stack */
cubics[0] = *cubic;
cindex = 0;
-
+
while (cindex >= 0)
{
c = &cubics[cindex];
-
-
+
+
/* Calculate distance of control points from their
* counterparts on the line between end points */
dif1.x = (c->p2.x * 3) - (c->p1.x * 2) - c->p4.x;
@@ -1669,12 +1667,12 @@ _cogl_path_bezier3_sub (CoglBezCubic *cubic)
dif2.x = -dif2.x;
if (dif2.y < 0)
dif2.y = -dif2.y;
-
-
+
+
/* Pick the greatest of two distances */
if (dif1.x < dif2.x) dif1.x = dif2.x;
if (dif1.y < dif2.y) dif1.y = dif2.y;
-
+
/* Cancel if the curve is flat enough */
if (dif1.x + dif1.y <= 1.0 ||
cindex == _COGL_MAX_BEZ_RECURSE_DEPTH-1)
@@ -1689,10 +1687,10 @@ _cogl_path_bezier3_sub (CoglBezCubic *cubic)
continue;
}
-
+
/* Left recursion goes on top of stack! */
cright = c; cleft = &cubics[++cindex];
-
+
/* Subdivide into 2 sub-curves */
c1.x = ((c->p1.x + c->p2.x) / 2);
c1.y = ((c->p1.y + c->p2.y) / 2);
@@ -1700,21 +1698,21 @@ _cogl_path_bezier3_sub (CoglBezCubic *cubic)
mm.y = ((c->p2.y + c->p3.y) / 2);
c5.x = ((c->p3.x + c->p4.x) / 2);
c5.y = ((c->p3.y + c->p4.y) / 2);
-
+
c2.x = ((c1.x + mm.x) / 2);
c2.y = ((c1.y + mm.y) / 2);
c4.x = ((mm.x + c5.x) / 2);
c4.y = ((mm.y + c5.y) / 2);
-
+
c3.x = ((c2.x + c4.x) / 2);
c3.y = ((c2.y + c4.y) / 2);
-
+
/* Add left recursion to stack */
cleft->p1 = c->p1;
cleft->p2 = c1;
cleft->p3 = c2;
cleft->p4 = c3;
-
+
/* Add right recursion to stack */
cright->p1 = c3;
cright->p2 = c4;
@@ -1761,7 +1759,7 @@ cogl_path_rel_curve_to (float x_1,
float y_3)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
cogl_path_curve_to (ctx->path_pen.x + x_1,
ctx->path_pen.y + y_1,
ctx->path_pen.x + x_2,
@@ -1789,17 +1787,17 @@ _cogl_path_bezier2_sub (CoglBezQuad *quad)
floatVec2 c2;
floatVec2 c3;
gint qindex;
-
+
/* Put first curve on stack */
quads[0] = *quad;
qindex = 0;
-
+
/* While stack is not empty */
while (qindex >= 0)
{
-
+
q = &quads[qindex];
-
+
/* Calculate distance of control point from its
* counterpart on the line between end points */
mid.x = ((q->p1.x + q->p3.x) / 2);
@@ -1808,7 +1806,7 @@ _cogl_path_bezier2_sub (CoglBezQuad *quad)
dif.y = (q->p2.y - mid.y);
if (dif.x < 0) dif.x = -dif.x;
if (dif.y < 0) dif.y = -dif.y;
-
+
/* Cancel if the curve is flat enough */
if (dif.x + dif.y <= 1.0 ||
qindex == _COGL_MAX_BEZ_RECURSE_DEPTH - 1)
@@ -1818,10 +1816,10 @@ _cogl_path_bezier2_sub (CoglBezQuad *quad)
_cogl_path_add_node (FALSE, q->p3.x, q->p3.y);
--qindex; continue;
}
-
+
/* Left recursion goes on top of stack! */
qright = q; qleft = &quads[++qindex];
-
+
/* Subdivide into 2 sub-curves */
c1.x = ((q->p1.x + q->p2.x) / 2);
c1.y = ((q->p1.y + q->p2.y) / 2);
@@ -1829,12 +1827,12 @@ _cogl_path_bezier2_sub (CoglBezQuad *quad)
c3.y = ((q->p2.y + q->p3.y) / 2);
c2.x = ((c1.x + c3.x) / 2);
c2.y = ((c1.y + c3.y) / 2);
-
+
/* Add left recursion onto stack */
qleft->p1 = q->p1;
qleft->p2 = c1;
qleft->p3 = c2;
-
+
/* Add right recursion onto stack */
qright->p1 = c2;
qright->p2 = c3;
@@ -1861,7 +1859,7 @@ cogl_path_curve2_to (float x_1,
/* Run subdivision */
_cogl_path_bezier2_sub (&quad);
-
+
/* Add last point */
_cogl_path_add_node (FALSE, quad.p3.x, quad.p3.y);
ctx->path_pen = quad.p3;
diff --git a/common/cogl-primitives.h b/common/cogl-primitives.h
index e792432b..268fba3c 100644
--- a/common/cogl-primitives.h
+++ b/common/cogl-primitives.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/common/cogl-util.c b/common/cogl-util.c
index 61b08e22..1eb0db10 100644
--- a/common/cogl-util.c
+++ b/common/cogl-util.c
@@ -1,18 +1,14 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By: Matthew Allum <mallum@openedhand.com>
- * Emmanuele Bassi <ebassi@linux.intel.com>
- *
- * Copyright (C) 2007, 2008 OpenedHand
- * Copyright (C) 2009 Intel Corp.
+ * Copyright (C) 2007,2008,2009 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.1 of the License, or (at your option) any later version.
+ * 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
@@ -20,7 +16,9 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
diff --git a/common/cogl-util.h b/common/cogl-util.h
index 759da8cc..589ddd35 100644
--- a/common/cogl-util.h
+++ b/common/cogl-util.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,7 +24,7 @@
#ifndef __COGL_UTIL_H
#define __COGL_UTIL_H
-int
+int
cogl_util_next_p2 (int a);
#endif /* __COGL_UTIL_H */
diff --git a/common/cogl-vertex-buffer-private.h b/common/cogl-vertex-buffer-private.h
index 79117dd4..68a709b5 100644
--- a/common/cogl-vertex-buffer-private.h
+++ b/common/cogl-vertex-buffer-private.h
@@ -1,11 +1,9 @@
/*
- * Cogl.
+ * Cogl
*
- * An OpenGL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2008 Intel Corporation.
- *
- * Authored By: Robert Bragg <robert@linux.intel.com>
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,7 +16,12 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
*/
#ifndef __COGL_VERTEX_BUFFER_H
diff --git a/common/cogl-vertex-buffer.c b/common/cogl-vertex-buffer.c
index 7f6ed0f5..73e9a1c0 100644
--- a/common/cogl-vertex-buffer.c
+++ b/common/cogl-vertex-buffer.c
@@ -1,13 +1,9 @@
/*
- * Cogl.
+ * Cogl
*
- * An OpenGL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Vertex Buffer API: Handle extensible arrays of vertex attributes
- *
- * Copyright (C) 2008, 2009 Intel Corporation.
- *
- * Authored by: Robert Bragg <robert@linux.intel.com>
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,7 +16,12 @@
* 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/>.
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Robert Bragg <robert@linux.intel.com>
*/
/* XXX: For an overview of the functionality implemented here, please
diff --git a/common/cogl.c b/common/cogl.c
index 34165a57..3e1b33bb 100644
--- a/common/cogl.c
+++ b/common/cogl.c
@@ -1,10 +1,9 @@
/*
* Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2007, 2008 OpenedHand
- * Copyright (C) 2009 Intel Corp.
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-context.c b/gl/cogl-context.c
index 5663e81a..7f757f45 100644
--- a/gl/cogl-context.c
+++ b/gl/cogl-context.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-context.h b/gl/cogl-context.h
index 7d025fc9..60224079 100644
--- a/gl/cogl-context.h
+++ b/gl/cogl-context.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-defines.h.in b/gl/cogl-defines.h.in
index f9a3bced..1c0c1636 100644
--- a/gl/cogl-defines.h.in
+++ b/gl/cogl-defines.h.in
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -865,26 +863,26 @@ typedef void
typedef void
(APIENTRYP COGL_PFNGLBINDBUFFERARBPROC)
- (GLenum target,
+ (GLenum target,
GLuint buffer);
typedef void
(APIENTRYP COGL_PFNGLBUFFERDATAARBPROC)
- (GLenum target,
- GLsizeiptr size,
- const GLvoid *data,
+ (GLenum target,
+ GLsizeiptr size,
+ const GLvoid *data,
GLenum usage);
typedef void
(APIENTRYP COGL_PFNGLBUFFERSUBDATAARBPROC)
- (GLenum target,
- GLintptr offset,
+ (GLenum target,
+ GLintptr offset,
GLsizeiptr size,
const GLvoid *data);
typedef void *
(APIENTRYP COGL_PFNGLMAPBUFFERARBPROC)
- (GLenum target,
+ (GLenum target,
GLenum access);
typedef GLboolean
diff --git a/gl/cogl-fbo.c b/gl/cogl-fbo.c
index 13463d34..ce703d9a 100644
--- a/gl/cogl-fbo.c
+++ b/gl/cogl-fbo.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -71,25 +69,25 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
GLuint fbo_gl_handle;
GLuint gl_stencil_handle;
GLenum status;
-
+
_COGL_GET_CONTEXT (ctx, COGL_INVALID_HANDLE);
-
+
if (!cogl_features_available (COGL_FEATURE_OFFSCREEN))
return COGL_INVALID_HANDLE;
-
+
/* Make texhandle is a valid texture object */
if (!cogl_is_texture (texhandle))
return COGL_INVALID_HANDLE;
-
+
tex = _cogl_texture_pointer_from_handle (texhandle);
-
+
/* The texture must not be sliced */
if (tex->slice_gl_handles == NULL)
return COGL_INVALID_HANDLE;
-
+
if (tex->slice_gl_handles->len != 1)
return COGL_INVALID_HANDLE;
-
+
/* Pick the single texture slice width, height and GL id */
x_span = &g_array_index (tex->slice_x_spans, CoglTexSliceSpan, 0);
y_span = &g_array_index (tex->slice_y_spans, CoglTexSliceSpan, 0);
@@ -111,10 +109,10 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
GE( glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT,
GL_STENCIL_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, gl_stencil_handle) );
-
+
/* Make sure it's complete */
status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT);
-
+
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
{
/* Stencil renderbuffers aren't always supported. Try again
@@ -125,9 +123,9 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
0) );
GE( glDeleteRenderbuffersEXT (1, &gl_stencil_handle) );
gl_stencil_handle = 0;
-
+
status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT);
-
+
if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
{
/* Still failing, so give up */
@@ -136,9 +134,9 @@ cogl_offscreen_new_to_texture (CoglHandle texhandle)
return COGL_INVALID_HANDLE;
}
}
-
+
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0) );
-
+
/* Allocate and init a CoglFbo object (store non-wasted size
for subsequent blits and viewport setup) */
fbo = (CoglFbo*) g_malloc (sizeof (CoglFbo));
@@ -155,7 +153,7 @@ cogl_offscreen_new_multisample ()
{
if (!cogl_features_available (COGL_FEATURE_OFFSCREEN_MULTISAMPLE))
return COGL_INVALID_HANDLE;
-
+
return COGL_INVALID_HANDLE;
}
@@ -186,22 +184,22 @@ cogl_offscreen_blit_region (CoglHandle src_buffer,
{
CoglFbo *src_fbo;
CoglFbo *dst_fbo;
-
+
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_features_available (COGL_FEATURE_OFFSCREEN_BLIT))
return;
-
+
/* Make sure these are valid fbo handles */
if (!cogl_is_offscreen (src_buffer))
return;
-
+
if (!cogl_is_offscreen (dst_buffer))
return;
-
+
src_fbo = _cogl_offscreen_pointer_from_handle (src_buffer);
dst_fbo = _cogl_offscreen_pointer_from_handle (dst_buffer);
-
+
/* Copy (and scale) a region from one to another framebuffer */
GE( glBindFramebufferEXT (GL_READ_FRAMEBUFFER_EXT, src_fbo->gl_handle) );
GE( glBindFramebufferEXT (GL_DRAW_FRAMEBUFFER_EXT, dst_fbo->gl_handle) );
@@ -216,22 +214,22 @@ cogl_offscreen_blit (CoglHandle src_buffer,
{
CoglFbo *src_fbo;
CoglFbo *dst_fbo;
-
+
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_features_available (COGL_FEATURE_OFFSCREEN_BLIT))
return;
-
+
/* Make sure these are valid fbo handles */
if (!cogl_is_offscreen (src_buffer))
return;
-
+
if (!cogl_is_offscreen (dst_buffer))
return;
-
+
src_fbo = _cogl_offscreen_pointer_from_handle (src_buffer);
dst_fbo = _cogl_offscreen_pointer_from_handle (dst_buffer);
-
+
/* Copy (and scale) whole image from one to another framebuffer */
GE( glBindFramebufferEXT (GL_READ_FRAMEBUFFER_EXT, src_fbo->gl_handle) );
GE( glBindFramebufferEXT (GL_DRAW_FRAMEBUFFER_EXT, dst_fbo->gl_handle) );
@@ -244,17 +242,17 @@ void
cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
{
CoglFbo *fbo = NULL;
-
+
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (target == COGL_OFFSCREEN_BUFFER)
{
/* Make sure it is a valid fbo handle */
if (!cogl_is_offscreen (offscreen))
return;
-
+
fbo = _cogl_offscreen_pointer_from_handle (offscreen);
-
+
/* Check current draw buffer target */
if (ctx->draw_buffer != COGL_OFFSCREEN_BUFFER)
{
@@ -280,16 +278,16 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
_cogl_set_current_matrix (COGL_MATRIX_MODELVIEW);
_cogl_current_matrix_identity ();
}
-
+
/* Setup new viewport and matrices */
GE( glViewport (0, 0, fbo->width, fbo->height) );
_cogl_current_matrix_translate (-1.0f, -1.0f, 0.0f);
_cogl_current_matrix_scale (2.0f / fbo->width, 2.0f / fbo->height, 1.0f);
-
+
/* Bind offscreen framebuffer object */
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, fbo->gl_handle) );
GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
-
+
/* Some implementation require a clear before drawing
to an fbo. Luckily it is affected by scissor test. */
/* FIXME: test where exactly this is needed end whether
@@ -299,7 +297,7 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
GE( glEnable (GL_SCISSOR_TEST) );
GE( glClear (GL_COLOR_BUFFER_BIT) );
GE( glPopAttrib () );
-
+
}
else if ((target & COGL_WINDOW_BUFFER) ||
(target & COGL_MASK_BUFFER))
@@ -317,11 +315,11 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
_cogl_set_current_matrix (COGL_MATRIX_MODELVIEW);
_cogl_current_matrix_pop ();
}
-
+
/* Bind window framebuffer object */
GE( glBindFramebufferEXT (GL_FRAMEBUFFER_EXT, 0) );
-
-
+
+
if (target == COGL_WINDOW_BUFFER)
{
/* Draw to RGB channels */
@@ -338,7 +336,7 @@ cogl_draw_buffer (CoglBufferTarget target, CoglHandle offscreen)
GE( glColorMask (GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
}
}
-
+
/* Store new target */
ctx->draw_buffer = target;
}
diff --git a/gl/cogl-fbo.h b/gl/cogl-fbo.h
index 308c1d95..8499f8fb 100644
--- a/gl/cogl-fbo.h
+++ b/gl/cogl-fbo.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-internal.h b/gl/cogl-internal.h
index b4ef91a0..0e83e7a5 100644
--- a/gl/cogl-internal.h
+++ b/gl/cogl-internal.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-primitives.c b/gl/cogl-primitives.c
index 8195a3d6..f3c11c13 100644
--- a/gl/cogl-primitives.c
+++ b/gl/cogl-primitives.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-program.c b/gl/cogl-program.c
index 6ee3775e..1f652c95 100644
--- a/gl/cogl-program.c
+++ b/gl/cogl-program.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -96,7 +94,7 @@ cogl_program_attach_shader (CoglHandle program_handle,
CoglShader *shader;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_is_program (program_handle) || !cogl_is_shader (shader_handle))
return;
@@ -111,7 +109,7 @@ cogl_program_link (CoglHandle handle)
{
CoglProgram *program;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_is_program (handle))
return;
@@ -126,7 +124,7 @@ cogl_program_use (CoglHandle handle)
CoglProgram *program;
GLhandleARB gl_handle;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (handle != COGL_INVALID_HANDLE && !cogl_is_program (handle))
return;
@@ -147,7 +145,7 @@ cogl_program_get_uniform_location (CoglHandle handle,
{
CoglProgram *program;
_COGL_GET_CONTEXT (ctx, 0);
-
+
if (!cogl_is_program (handle))
return 0;
diff --git a/gl/cogl-program.h b/gl/cogl-program.h
index fa75f63b..3a6bdf5b 100644
--- a/gl/cogl-program.h
+++ b/gl/cogl-program.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-shader-private.h b/gl/cogl-shader-private.h
index 4c8fbbb4..f698c6c6 100644
--- a/gl/cogl-shader-private.h
+++ b/gl/cogl-shader-private.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-shader.c b/gl/cogl-shader.c
index 309db01c..0d0896c0 100644
--- a/gl/cogl-shader.c
+++ b/gl/cogl-shader.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -75,7 +73,7 @@ cogl_shader_source (CoglHandle handle,
{
CoglShader *shader;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_is_shader (handle))
return;
diff --git a/gl/cogl-texture-private.h b/gl/cogl-texture-private.h
index 2a3a4a5a..2905175b 100644
--- a/gl/cogl-texture-private.h
+++ b/gl/cogl-texture-private.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gl/cogl-texture.c b/gl/cogl-texture.c
index 1c7b747b..59132c2d 100644
--- a/gl/cogl-texture.c
+++ b/gl/cogl-texture.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -21,6 +19,11 @@
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
+ *
+ * Authors:
+ * Matthew Allum <mallum@openedhand.com>
+ * Neil Roberts <neil@linux.intel.com>
+ * Robert Bragg <robert@linux.intel.com>
*/
#ifdef HAVE_CONFIG_H
diff --git a/gl/cogl.c b/gl/cogl.c
index 47fe9d75..b2c5417e 100644
--- a/gl/cogl.c
+++ b/gl/cogl.c
@@ -1,9 +1,9 @@
/*
* Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2007,2008,2009 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-context.c b/gles/cogl-context.c
index 5630506e..c5bc2e3c 100644
--- a/gles/cogl-context.c
+++ b/gles/cogl-context.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-context.h b/gles/cogl-context.h
index 2a358de9..994b100f 100644
--- a/gles/cogl-context.h
+++ b/gles/cogl-context.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-fbo.c b/gles/cogl-fbo.c
index c3a2cfd9..6f2aef56 100644
--- a/gles/cogl-fbo.c
+++ b/gles/cogl-fbo.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-fbo.h b/gles/cogl-fbo.h
index 308c1d95..8499f8fb 100644
--- a/gles/cogl-fbo.h
+++ b/gles/cogl-fbo.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-gles2-wrapper.c b/gles/cogl-gles2-wrapper.c
index 54a1d8c5..523676dd 100644
--- a/gles/cogl-gles2-wrapper.c
+++ b/gles/cogl-gles2-wrapper.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -356,7 +354,7 @@ cogl_gles2_get_fragment_shader (const CoglGles2WrapperSettings *settings)
g_string_append (shader_source, cogl_fixed_fragment_shader_main_declare);
g_string_append (shader_source, cogl_fixed_fragment_shader_main_start);
-
+
/* This pointless extra variable is needed to work around an
apparent bug in the PowerVR drivers. Without it the alpha
blending seems to stop working */
diff --git a/gles/cogl-gles2-wrapper.h b/gles/cogl-gles2-wrapper.h
index 4d4fd1a4..bd7f6d97 100644
--- a/gles/cogl-gles2-wrapper.h
+++ b/gles/cogl-gles2-wrapper.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-internal.h b/gles/cogl-internal.h
index 5b9c8ab3..6ca9c7a8 100644
--- a/gles/cogl-internal.h
+++ b/gles/cogl-internal.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-primitives.c b/gles/cogl-primitives.c
index ae91aa06..1e03e1ea 100644
--- a/gles/cogl-primitives.c
+++ b/gles/cogl-primitives.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-program.c b/gles/cogl-program.c
index 3c709601..317310c3 100644
--- a/gles/cogl-program.c
+++ b/gles/cogl-program.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -89,7 +87,7 @@ cogl_program_attach_shader (CoglHandle program_handle,
CoglProgram *program;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_is_program (program_handle) || !cogl_is_shader (shader_handle))
return;
@@ -116,7 +114,7 @@ void
cogl_program_use (CoglHandle handle)
{
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (handle != COGL_INVALID_HANDLE && !cogl_is_program (handle))
return;
diff --git a/gles/cogl-program.h b/gles/cogl-program.h
index fdf52cd6..23b7ebeb 100644
--- a/gles/cogl-program.h
+++ b/gles/cogl-program.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-shader-private.h b/gles/cogl-shader-private.h
index e95fcd7d..2b905d89 100644
--- a/gles/cogl-shader-private.h
+++ b/gles/cogl-shader-private.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-shader.c b/gles/cogl-shader.c
index 5ea43840..d261e1a0 100644
--- a/gles/cogl-shader.c
+++ b/gles/cogl-shader.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -69,7 +67,7 @@ cogl_shader_source (CoglHandle handle,
{
CoglShader *shader;
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
-
+
if (!cogl_is_shader (handle))
return;
diff --git a/gles/cogl-texture-private.h b/gles/cogl-texture-private.h
index 2a3a4a5a..2905175b 100644
--- a/gles/cogl-texture-private.h
+++ b/gles/cogl-texture-private.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-texture.c b/gles/cogl-texture.c
index e2a5ec90..66af941c 100644
--- a/gles/cogl-texture.c
+++ b/gles/cogl-texture.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/cogl-util.c b/gles/cogl-util.c
index b024e763..4fc90b8e 100644
--- a/gles/cogl-util.c
+++ b/gles/cogl-util.c
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -44,7 +42,7 @@ cogl_util_next_p2 (int a)
{
int rval=1;
- while(rval < a)
+ while(rval < a)
rval <<= 1;
return rval;
diff --git a/gles/cogl-util.h b/gles/cogl-util.h
index 759da8cc..589ddd35 100644
--- a/gles/cogl-util.h
+++ b/gles/cogl-util.h
@@ -1,11 +1,9 @@
/*
- * Clutter COGL
+ * Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Authored By Matthew Allum <mallum@openedhand.com>
- *
- * Copyright (C) 2007 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -26,7 +24,7 @@
#ifndef __COGL_UTIL_H
#define __COGL_UTIL_H
-int
+int
cogl_util_next_p2 (int a);
#endif /* __COGL_UTIL_H */
diff --git a/gles/cogl.c b/gles/cogl.c
index 5b49a190..0fcf4fc3 100644
--- a/gles/cogl.c
+++ b/gles/cogl.c
@@ -1,9 +1,9 @@
/*
* Cogl
*
- * A basic GL/GLES Abstraction/Utility Layer
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2007,2008,2009 OpenedHand
+ * Copyright (C) 2007,2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/gles/stringify.sh b/gles/stringify.sh
index bb8e7574..a60d28d7 100644
--- a/gles/stringify.sh
+++ b/gles/stringify.sh
@@ -1,16 +1,36 @@
#! /bin/sh
+# Cogl
+#
+# An object oriented GL/GLES Abstraction/Utility Layer
+#
+# Copyright (C) 2008,2009 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, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+
output_copyright ()
{
cat <<EOF > "$1";
/*
- * Clutter COGL
- *
- * A basic GL/GLES Abstraction/Utility Layer
+ * Cogl
*
- * Authored By Matthew Allum <mallum@openedhand.com>
+ * An object oriented GL/GLES Abstraction/Utility Layer
*
- * Copyright (C) 2008 OpenedHand
+ * Copyright (C) 2008,2009 Intel Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public