Since the Cogl 1.18 branch is actively maintained in parallel with the
master branch; this is a counter part to commit 1b83ef938fc16b which
re-licensed the master branch to use the MIT license.
This re-licensing is a follow up to the proposal that was sent to the
Cogl mailing list:
http://lists.freedesktop.org/archives/cogl/2013-December/001465.html
Note: there was a copyright assignment policy in place for Clutter (and
therefore Cogl which was part of Clutter at the time) until the 11th of
June 2010 and so we only checked the details after that point (commit
0bbf50f905)
For each file, authors were identified via this Git command:
$ git blame -p -C -C -C20 -M -M10 0bbf50f905..HEAD
We received blanket approvals for re-licensing all Red Hat and Collabora
contributions which reduced how many people needed to be contacted
individually:
- http://lists.freedesktop.org/archives/cogl/2013-December/001470.html
- http://lists.freedesktop.org/archives/cogl/2014-January/001536.html
Individual approval requests were sent to all the other identified authors
who all confirmed the re-license on the Cogl mailinglist:
http://lists.freedesktop.org/archives/cogl/2014-January
As well as updating the copyright header in all sources files, the
COPYING file has been updated to reflect the license change and also
document the other licenses used in Cogl such as the SGI Free Software
License B, version 2.0 and the 3-clause BSD license.
This patch was not simply cherry-picked from master; but the same
methodology was used to check the source files.
This fixes some problems which were stopping --disable-glib from
working properly:
• A lot of the public headers were including glib.h. This shouldn't be
necessary because the API doesn't expose any glib types. Otherwise
any apps would require glib in order to get the header.
• The public headers were using G_BEGIN_DECLS. There is now a
replacement macro called COGL_BEGIN_DECLS which is defined in
cogl-types.h.
• A similar fix has been done for G_GNUC_NULL_TERMINATED and
G_GNUC_DEPRECATED.
• The CFLAGS were not including $(builddir)/deps/glib which was
preventing it finding the generated glibconfig.h when building out
of tree.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 4138b3141c2f39cddaea3d72bfc04342ed5092d0)
The version number macros were using the @COGL_VERSION_*@
substitutions. These are always defined to 2.0.0 in the 1.x releases
so we need to use the Cogl @COGL_1_VERSION_*@ substitutions instead to
get the real version number.
Otherwise, X11 identifiers may leak and cause havoc in big applications
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit ed0cdca0eca815543619fe72fbd42d662d53f92d)
This adds a version header which contains macros to define which
version of Cogl the application is being compiled against. This helps
applications that want to support multiple incompatible versions of
Cogl at compile time.
The macros are called COGL_VERSION_{MAJOR,MINOR,MICRO}. This does not
match Clutter which names them CLUTTER_{MAJOR,MINOR,MICRO}_VERSION but
I think the former is nicer and it at least matches Cairo and Pango.
The values of the macro are defined to COGL_VERSION_*_INTERNAL which
is generated by the configure script into cogl-defines.h.
There is also a macro for the entire version as a string called
COGL_VERSION_STRING.
The internal utility macros for encoding a 3 part version number into
a single integer have been moved into the new header so they can be
used publicly as a convenient way to check if the version is within a
particular range. There is also a COGL_VERSION_CHECK macro for the
very common case that a feature will be used since a particular
version of Cogl. There is a macro called COGL_VERSION which contains
the pre-encoded version of Cogl being compiled against for
convenience.
Unlike in Clutter this patch does not add any runtime version
identification mechanism.
A test case is also added which just contains static asserts to sanity
check the macros.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 3480cf140dc355fa87ab3fbcf0aeeb0124798a8f)
This splits the GL header inclusion from cogl-defines.h into a
separate headear called cogl-gl-header.h which we will only include
internally. That way we don't leak GL declarations out of our public
headers. The texture functions that were using GLenum and GLuint in
the public header have now changed to just use unsigned int. Note
however that if an EGL winsys is enabled then it will still publicly
include an EGL header. This is a bit more awkward to fix because we
have public API which returns an EGLDisplay and we can't determine
what type that is.
There is also a conformance test which just verifies that no GL header
has been included while compiling. The test isn't added to
test-conform-main because it doesn't actually test anything at
runtime.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit ef5680d3fda5df929dbd0b420c8f598ded58dfee)
This adds an internal texture_2d constructor that can wrap an EGLImage
as a CoglTexture2D. The plan is to utilize this for texture-from-pixmap
support with EGL as well as creating textures from wayland buffers.
Early implementations provided only a GLES/egl.h while Khronos's
implementer guide now states EGL/egl.h is the One. Some implementations
keep a GLES/egl.h wrapper around EGL/egl.h for backward compatibility
while others provide EGL/egl.h only.
Also took the opportunity to factorize a bit this inclusion in
cogl-defines.h.
Under big GL, glext.h is included automatically by gl.h. However under
GLES this doesn't appear to happen so it has to be included explicitly
to get the defines for extensions. This patch changes the
clutter_gl_header to be called cogl_gl_headers and it can now take a
space seperated list of multiple headers. This is then later converted
to a list of #include lines which ends up cogl-defines.h. The gles2
and gles1 backends now add their respective ext header to this list.
This will be defined in cogl-defines.h whenever Cogl is built using a
winsys that supports X11. This implies CoglTexturePixmapX11 will be
available.
To make this work the two separate cogl-defines.h.in files have been
merged into one. The configure script now makes a @COGL_DEFINES@
substitution variable which contains the #define lines to put in
rather than directly having them in the seperate files.